Multimodal Adaptive Retrieval Augmented Generation through Internal Representation Learning

Ruoshuang Du, Xin Sun, Qiang Liu, Bowen Song, Zhongqi Chen, Weiqiang Wang, Liang WangarXiv 2026

TL;DR

Multimodal Retrieval-Augmented Generation (RAG) often stumbles when external image searches return visually similar but semantically incorrect results, leading to model hallucinations. To fix this, the authors introduce MMA-RAG, a framework that analyzes a vision-language model's internal representations to dynamically decide whether to trust external retrieval or rely on its own internal knowledge. By successfully filtering out these "harmful retrievals," MMA-RAG significantly boosts accuracy across multiple knowledge-intensive visual question answering (VQA) benchmarks.

What Problem Does This Paper Address?

While Large Language Models and Vision-Language Models (VLMs) are incredibly powerful, they are notorious for "hallucinating"—generating facts that are incorrect or unsupported by the input. Retrieval-Augmented Generation (RAG) mitigates this by fetching external knowledge. In multimodal settings, this often takes the form of Reverse Image Retrieval (RIR), where the system searches the web for images similar to the query image to provide extra context.

However, visual retrieval introduces a tricky failure mode: visual similarity with semantic mismatch. For instance, if you ask a VLM to identify a rare plant, an external search might return an image of a completely different species that looks visually identical. Standard RAG frameworks blindly feed this misleading image into the model, causing it to override its own correct internal knowledge. The core challenge addressed here is developing an adaptive gating mechanism that knows when to use retrieved images and when to ignore them.

Methods

The authors propose Multimodal Adaptive RAG (MMA-RAG), which treats retrieval utility as a classification problem based on the model's internal states.

Overview of the MMA-RAG framework

The pipeline consists of three main steps:

  1. Reverse Image Retrieval: For a given question and query image ($I_1$), the system fetches visually similar images from Google, capturing a screenshot of the results ($I_2$).
  2. Abstract Feature Extraction: Instead of relying on final text outputs to gauge confidence, MMA-RAG extracts internal hidden states from the VLM. It captures textual features ($T$) from the final decoding step and visual features ($V$) by average-pooling patch embeddings from an intermediate layer. It extracts these for both the baseline input ($T_1, V_1$) and the retrieval-augmented input ($T_2, V_2$), concatenating them into a joint representation ($H_c$).
  3. Adaptive Detection: A 4-class Multi-Layer Perceptron (MLP) classifier is trained on $H_c$ to predict the utility of the retrieval:
  4. $S_1$: Both paths lead to incorrect answers.
  5. $S_2$: Retrieval leads to a correct answer (Helpful).
  6. $S_3$: Retrieval leads to an incorrect answer (Harmful).
  7. $S_4$: Both paths lead to correct answers.

Depending on the nature of the dataset, the framework applies either an RIR-Pessimistic strategy (only retrieve if explicitly predicted to be essential, $S_2$) or an RIR-Optimistic strategy (always retrieve unless explicitly predicted to be harmful, $S_3$).

Datasets

The framework was evaluated using three distinct, knowledge-intensive VQA benchmarks:

  • OK-VQA: A foundational dataset featuring over 14,000 questions that require common-sense reasoning and world knowledge.
  • Encyclopedic-VQA (E-VQA): A large benchmark (221K QA pairs) focusing on fine-grained, instance-level attributes of specific entities, landmarks, or biological species.
  • InfoSeek: A large-scale dataset (approx. 1.3 million questions) designed for visual information search queries mapped to structured knowledge bases like Wikipedia.

Key Insights and Ideas

  • The Primacy of Multimodal Fusion: One of the paper's most striking findings is that error-detection classifiers utilizing both visual and textual internal states consistently outperform text-only classifiers. Visual features are absolutely essential for the model to accurately evaluate its own internal certainty.
  • Early Alignment in Mid-Network Layers: Through a layer-wise analysis, the authors discovered that multimodal features achieve high error-detection accuracy much earlier in the network (layers 2 to 16) than text-only features, which only become effective in the deepest layers. This implies that semantic alignment between vision and text is firmly established at mid-network depths.
Heatmap of classifier accuracy across different layers and tokens
  • Dataset-Driven Gating Strategies: The optimal retrieval strategy is highly dependent on the task. For common-sense tasks (OK-VQA), a pessimistic (retrieval-averse) strategy is superior because external web images often introduce distracting noise. Conversely, for encyclopedic or fine-grained recognition tasks (InfoSeek, E-VQA), an optimistic (retrieval-favoring) strategy shines because external context helps disambiguate highly specific entities.

Key Results

MMA-RAG was validated across three prominent VLM backbones: Qwen2VL-7B, Idefics2-8B, and Idefics3-8B. It consistently outperformed standard RIR and other adaptive baselines (such as Chain-of-Thought, P(true) confidence estimation, and CLIP-based alignment):

  • InfoSeek (with Idefics2): MMA-RAG achieved an accuracy of 20.3%, markedly higher than standard RIR (17.2%) and the few-shot baseline (14.2%).
  • OK-VQA (with Idefics3): MMA-RAG reached 58.3% accuracy, beating standard RIR (56.6%) and the zero-shot baseline (43.2%).
  • Feature Robustness: The framework proved highly resilient to variations in visual feature extraction, maintaining stable performance gains regardless of the specific intermediate layer selected or whether average or max pooling was applied.

Limitations and Future Work

  • Diminishing Returns on Clean Data: In scenarios where the web retrieval mechanism naturally introduces very few harmful or misleading samples, MMA-RAG yields only marginal improvements, as there is little noise to filter out.
  • Manual Strategy Selection: Currently, developers must manually choose between the optimistic or pessimistic gating strategy based on the target dataset's characteristics. A valuable direction for future work would be an automated mechanism that dynamically adjusts this bias on a per-query basis.

Summary updated

BibTeX
@misc{du2026multimodal,
  author = {Ruoshuang Du and Xin Sun and Qiang Liu and Bowen Song and Zhongqi Chen and Weiqiang Wang and Liang Wang},
  title = {{Multimodal Adaptive Retrieval Augmented Generation through Internal Representation Learning}},
  year = {2026},
  eprint = {2603.00511},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.00511},
}
Figure