Generative Multi-Modal Knowledge Retrieval with Large Language Models

Xinwei Long, Jiali Zeng, Fandong Meng, Zhiyuan Ma, Kaiyan Zhang, Bowen Zhou, Jie Zhou

Introduction

Knowledge-intensive multi-modal tasks, such as Visual Question Answering (VQA), require systems to retrieve relevant information from massive external databases to answer queries that combine text and images. Traditional approaches typically rely on disjointed pipelines, using separate retrievers for text (e.g., BM25) and images (e.g., CLIP). These systems often struggle to capture complex cross-modal interactions and are computationally expensive to train and maintain.

The GeMKR Framework

This paper introduces GeMKR (Generative Multi-Modal Knowledge Retrieval), an end-to-end framework that reimagines retrieval as a generative process. Unlike previous generative retrieval methods that output static Document IDs—which are often too rigid for multi-modal contexts—GeMKR generates dynamic "knowledge clues." These clues are unique text snippets extracted directly from the target documents, allowing the model to flexibly align with either visual or textual cues in the query.

GeMKR compared to traditional retrieval pipelines, illustrating the shift from separate retrievers to a unified generative model.

Methodology

GeMKR leverages the reasoning capabilities of Large Language Models (LLMs), specifically LLaMA-7B, through two primary technical innovations:

  1. Object-Aware Prefix Tuning: To ground the LLM in visual data, GeMKR uses a frozen CLIP backbone enhanced with learnable prefixes. An object detector (YOLOv7) identifies key objects within the image, which are then fed into the model as specific prefixes. A dual-flow attention mechanism ensures these object-level features are integrated without disrupting the pre-trained visual representations.
  2. Knowledge-Guided Constrained Decoding: To prevent the LLM from hallucinating non-existent documents, GeMKR employs an FM-Index database during inference. This constrains the model's output at each step to tokens that form a valid string present in the knowledge base. Once a unique clue is generated, the system retrieves the corresponding document.
The GeMKR architecture, detailing the integration of visual tokens, prefix vectors, and the constrained decoding process using an FM-Index.

Experimental Results and Scalability

GeMKR was evaluated on three major benchmarks: OKVQA-GS112K, OKVQA-WK21M, and ReMuQ. The model achieved state-of-the-art performance, outperforming strong baselines like DPR, SEAL, and ReViz-ICT by 3.0% to 14.6% across various metrics.

Notably, GeMKR demonstrates exceptional scalability. On the OKVQA-WK21M dataset, which contains over 21 million documents, the model achieved a 14.6% absolute improvement in Precision@5 and an 8.9% improvement in Recall@5 over the best baseline. This suggests that generative retrieval, when properly constrained, can effectively manage massive knowledge corpora that typically challenge traditional similarity-search methods.

Ablation studies confirmed that both object-aware prefix tuning and LLM fine-tuning (via LoRA) are critical. Removing object-level attention led to a 2% performance drop, while omitting LLM fine-tuning resulted in a catastrophic decline of over 10%.

Discussion and Limitations

While GeMKR represents a significant step forward, it faces certain limitations. Scaling the LLM from 7B to 13B parameters yielded only marginal gains, suggesting that the current training data volume (20,000 instruction examples) may be a bottleneck. Furthermore, the system relies heavily on the FM-Index for constrained decoding; without these guardrails, the model is prone to hallucination and fails to retrieve valid documents.

Conclusion

GeMKR proves that LLMs can serve as highly effective, scalable multi-modal retrievers by shifting the paradigm from searching for IDs to generating unique knowledge clues. Future work will explore scaling training data and optimizing smaller, fully fine-tuned models to further enhance retrieval efficiency.

Summary updated

BibTeX
@inproceedings{long2024generative,
  author = {Xinwei Long and Jiali Zeng and Fandong Meng and Zhiyuan Ma and Kaiyan Zhang and Bowen Zhou and Jie Zhou},
  title = {{Generative Multi-Modal Knowledge Retrieval with Large Language Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i17.29837},
}
Figure