Retrieval Heads Meet Vision: Uncovering How VLMs Locate and Extract Visual Information

Chanho Park, Daehyeon Choi, Jihyun Lee, Minhyuk Sung

TL;DR

Vision-Language Models (VLMs) rely on a tiny, specialized fraction of attention heads (1.7–2.6%) called Visual Retrieval Heads (VRHs) to map text prompts to specific image regions. Masking just 20 of these heads completely tanks visual grounding accuracy by up to 80 percentage points, leaving the model's text generation perfectly fluent but completely ungrounded from the visual evidence.

What Problem Does This Paper Address?

Vision-Language Models excel at tasks like visual grounding (drawing a bounding box around an object described in text) and visual question answering (VQA). However, how they internally navigate an image to extract the right visual evidence has long been a black box.

In text-only Large Language Models (LLMs), researchers previously discovered "retrieval heads"—a sparse set of attention heads dedicated to finding specific tokens in a long text context (the classic "needle in a haystack" problem). This paper asks a fundamental question: Do VLMs possess an analogous, universal mechanism for visual retrieval?

Methods

The authors formalize a unified design space to evaluate head-scoring methods across three axes:

  1. Query tokens: Input prompt tokens vs. output prediction tokens.
  2. Key aggregation: Checking if the single most-attended token falls in the target region (argmax) vs. summing all attention weights over the target region.
  3. Cross-sample aggregation: Averaging scores across datasets vs. voting based on selection frequency.

Through systematic ablation, they discovered that the most effective way to identify truly causal heads is by scoring attention from output prediction tokens and summing attention weights over the ground-truth referent region. They validate these heads causally by masking the top-ranked heads during inference and measuring the resulting performance drop.

Datasets

  • Visual Grounding (Discovery & Evaluation): RefCOCO, RefCOCO+, RefCOCOg, RefSpatialBench, and Toloka.
  • Cross-Task Generalization (VQA): VAW (attributes), Spatial457 & SpatialRGPT (spatial reasoning), CV-Bench & MMStar (vision-centric understanding), CountBenchQA (counting), and MathVista (visual math).

Key Insights and Ideas

  • The Causal-Sparse-Universal Triad: Much like text retrieval heads, VRHs make up only a tiny fraction (~1.7–2.6%) of all heads (sparse), consistently appear across 11 different VLM families (universal), and directly drive the model's ability to locate visual information (causal).
  • Functional Specificity: Masking VRHs doesn't break the model's output format or syntax; it specifically corrupts localization. For instance, a model will still output a perfectly formatted bounding box coordinate or a fluent sentence, but it will point to the wrong part of the image. This is the visual equivalent of the "fluent-but-not-factual" hallucination mode in LLMs.
  • Cross-Task Generalization: Even though VRHs are discovered using a simple bounding-box task, they are fundamentally responsible for visual reference resolution as a whole. Masking them degrades performance on complex downstream tasks like counting and visual math.
  • Architecturally Shared Circuits: VRHs reside primarily within the LLM backbone. If two different VLMs share the same LLM backbone (e.g., Qwen or Llama), their VRHs are highly aligned and can be cross-masked, even if they use completely different vision encoders, projectors, or instruction-tuning recipes.

Key Results

  • Catastrophic Drops from Minimal Masking: Masking the top 20 VRHs reduced grounding accuracy by up to 80 percentage points, whereas masking 20 random heads had virtually no impact.
  • High Sample Efficiency: VRH detection requires very little data; using as few as 5 to 10 annotated examples can reliably identify the same top-performing VRHs as a full 200-sample set.
  • Visualizing the Disappearance of Attention: As shown in Figure 1, masking VRHs completely erases the model's attention focus on the target object, leading to incorrect bounding boxes or unfaithful VQA answers.
Figure 1: Visual Retrieval Heads mediate visual reference resolution in VLMs. We identify a sparse set of attention heads, Visual Retrieval Heads (VRHs), that are causally necessary for resolving the image region referred to by the text prompt. On visual grounding (left), masking the VRHs redirects prediction-stage attention away from the ground-truth referent and causes the model to output a delocalized bounding box. The same heads, discovered only from grounding, also transfer to visual question answering (right): masking them removes attention to the referred object and leads to a fluent but visually unfaithful answer. Yellow boxes denote ground-truth referents; dashed yellow ellipses indicate regions where attention vanishes after VRH masking.

Limitations and Future Work

  • Attention is Only Routing: Scoring attention weights reveals where the model is looking, but it doesn't explain what information is being read out or how it's transformed. The authors suggest combining VRH detection with activation patching or causal mediation analysis for a deeper mechanistic account.
  • Single-Image Constraint: The study focuses entirely on single-image VLM inputs. Extending VRH analysis to multi-image contexts, video, or interleaved text-image streams remains an open and exciting direction.

Summary updated

BibTeX
@inproceedings{park2026retrieval,
  author = {Chanho Park and Daehyeon Choi and Jihyun Lee and Minhyuk Sung},
  title = {{Retrieval Heads Meet Vision: Uncovering How VLMs Locate and Extract Visual Information}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=7yVqyPZh09},
}
Figure