Abstract
Large Language Models (LLMs) possess vast internal knowledge but often struggle with rare entities and information that is primarily visual in nature. While Retrieval-Augmented Generation (RAG) has successfully addressed these gaps for text-based tasks, open-domain question answering involving visual data remains a significant challenge. We present MuRAG (Multimodal Retrieval-Augmented Generator), a model designed to retrieve and reason over a multimodal external memory containing both images and text. By bridging the "visual gap," MuRAG achieves state-of-the-art performance on complex benchmarks, outperforming previous models by 10-20%.
Introduction
Standard LLMs are limited by their training data; they often fail to recall "long-tail" facts or niche events. Furthermore, a substantial portion of human knowledge is captured in images rather than written descriptions. For instance, specific architectural details or seasonal decorations may be documented in photographs but never explicitly detailed in text.
Existing retrieval models like RAG or RETRO are effectively "blind," limited to searching text-only corpora. MuRAG addresses this by providing the model with a "library card" to a multimodal corpus, allowing it to retrieve relevant image-text pairs or text snippets to inform its generation process.
Methodology
MuRAG is composed of three primary components: a backbone encoder, a retriever, and a generator.
Architecture
- Backbone Encoder: The model utilizes a Vision Transformer (ViT) for image processing and a T5 transformer for text. These inputs are fused into a shared multimodal representation space.
- Retriever: Given a query, MuRAG encodes the prompt and performs a Maximum Inner Product Search (MIPS) against an external multimodal memory. This allows the model to identify the most relevant visual and textual context from millions of potential candidates.
- Generator: The retrieved context—including image patches and text—is passed to a T5 decoder. The generator "reads" the text and "looks" at the image patches to synthesize a coherent natural language answer.
Training Strategy
To optimize both retrieval and generation, the researchers employed a joint loss function consisting of a contrastive loss (to align queries with relevant memory items) and a generative loss (to ensure the final answer is accurate). To manage the computational demands of searching massive datasets, a two-stage fine-tuning process was used: initial training with a small "in-batch" memory followed by a transition to a large, static global memory.
Datasets and Evaluation
MuRAG was pre-trained on a diverse suite of datasets, including LAION (200M image-alt-text pairs), Conceptual Captions, VQA, and PAQ (65M text-only QA pairs). Evaluation was conducted on two primary benchmarks:
- WebQA: A multi-hop dataset requiring reasoning across multiple images or text snippets.
- MultimodalQA: A dataset requiring integrated reasoning across images, tables, and text.
Key Results
MuRAG established new benchmarks for open-domain multimodal QA:
- WebQA: The model achieved a 36.1% overall score, a significant 12% absolute improvement over the previous state-of-the-art (VLP + VinVL at 24.1%).
- MultimodalQA: In the "full-wiki" setting, MuRAG reached 51.4% Exact Match (EM), compared to the 34.7% baseline.
- Retrieval Efficiency: The model demonstrated high precision in information retrieval, achieving 85% Recall@1 from a 4,000-item memory during pre-training.
Discussion and Insights
The Necessity of Visual Memory
The study confirms that many information-seeking queries are unanswerable through text-only retrieval. Visual memory is a fundamental requirement for comprehensive world knowledge. Furthermore, the results suggest that retrieval-based scaling is often more efficient than simply increasing the number of model parameters.
The "Shortcut" Phenomenon
An interesting observation was the model's tendency to take "shortcuts"—relying on textual clues within retrieved captions rather than performing deep reasoning over image pixels. This suggests that while MuRAG is highly effective, there is still progress to be made in ensuring true multimodal reasoning.
Limitations and Future Work
Despite its performance, MuRAG faces several challenges:
- Visual Reasoning: Approximately 52% of errors were attributed to counting difficulties, and 29% to object recognition failures in complex scenes.
- OCR Integration: The model requires improved Optical Character Recognition (OCR) to better interpret text embedded within images, such as signs or documents.
- Computational Complexity: Processing image patches within a transformer remains computationally expensive, limiting the number of images the model can reason over simultaneously.
Future research will focus on mining "hard negatives" during pre-training to sharpen retrieval accuracy and improving the model's ability to handle fine-grained visual details.
Summary updated