Retrieval Heads Meet Vision: Uncovering How VLMs Locate and Extract Visual Information
Organizations: KAIST · Independent Researcher
Abstract
Vision-language models (VLMs) can locate an image region referred to by a text prompt and route the corresponding visual evidence to the output, yet the internal mechanism behind this behavior is not understood. Inspired by retrieval heads in large language models, we ask whether VLMs contain an analogous mechanism for visual retrieval. We answer affirmatively by introducing Visual Retrieval Heads (VRHs), a small subset of attention heads (about 1.7-2.6%) that are causally responsible for grounding text descriptions to image regions. To find them, we recast existing head-scoring methods under a unified design space over query tokens, key aggregation, and cross-sample aggregation. We then show that scoring attention from output prediction tokens with a sum over the ground-truth referent region most reliably identifies causal heads. Across eleven VLMs and five referring-expression benchmarks, masking only the top 20 VRHs reduces grounding accuracy by up to 80 percentage points, while masking the same number of random heads has little effect. Beyond replicating the causal-sparse-universal triad established for text retrieval heads, VRHs exhibit several properties not previously reported: they generalize across visual reference tasks, remaining causal on attribute, spatial, counting, and visual-math benchmarks despite being discovered through bounding-box prediction; they are functionally specific, preserving output format while corrupting localization; and they are architecturally shared, transferring causally across VLMs that share an LLM backbone but differ in vision encoder, projector, and instruction tuning.
Figures & tables
| Retrieval Heads [ 1 ] | QRHead [ 20 ] | OCR Heads [ 2 ] | VERA [ 3 ] | Loc. Heads [ 4 ] | VRH (Ours) | |
|---|---|---|---|---|---|---|
| Input Source | Text | Text | Visual document | Visual document | General image | General image |
| Causality | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ |
| Retrieval Heads [ 1 ] | QRHead [ 20 ] | OCR Heads [ 2 ] | VERA [ 3 ] | Loc. Head [ 4 ] | |
|---|---|---|---|---|---|
| Query Token Set | |||||
| Key Aggregation | N/A † | ||||
| Sample Aggregation |
| Model | Condition | VAW | Spatial457 | SpatialRGPT | CV-Bench | MMStar | CountBenchQA | MathVista |
|---|---|---|---|---|---|---|---|---|
| Qwen2.5-VL-7B | Baseline ( ) | 63.8 | 68.2 | 36.1 | 75.1 | 58.3 | 83.9 | 71.5 |
| Random ( ) | 63.7 (-0.1) | 67.2 (-1.0) | 39.5 (+3.4) | 71.9 (-3.2) | 56.8 (-1.5) | 84.1 (+0.2) | 72.0 (+0.5) | |
| VRH ( ) | 40.5 (-23.3) | 36.0 (-32.2) | 21.8 (-14.3) | 53.3 (-21.8) | 47.9 (-10.4) | 61.5 (-22.4) | 61.7 (-9.8) | |
| Qwen3-VL-8B | Baseline ( ) | 74.8 | 78.2 | 50.8 | 87.6 | 63.0 | 88.4 | 66.5 |
| Random ( ) | 74.3 (-0.5) | 76.4 (-1.8) | 46.2 (-4.6) | 87.1 (-0.5) | 63.3 (+0.3) | 89.6 (+1.2) | 69.4 (+2.9) | |
| VRH ( ) | 51.0 (-23.8) | 36.9 (-41.3) | 22.9 (-27.9) | 68.7 (-18.9) | 47.7 (-15.3) | 74.5 (-13.9) | 43.0 (-23.5) |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Method | ||||||
|---|---|---|---|---|---|---|---|
| RefCOCO [ 5 ] | |||||||
| Qwen2.5-VL-7B | Random | 86.2 | 86.2 | 86.4 | 86.2 | 85.9 | 86.1 |
| VRH | 86.2 | 85.1 | 83.5 | 79.3 | 9.7 | 7.5 | |
| Qwen3-VL-8B | Random | 91.3 | 91.3 | 91.2 | 91.3 | 91.1 | 91.1 |
| VRH | 91.3 | 91.0 | 90.4 | 84.1 | 33.4 | 20.4 | |
| InternVL3-8B | Random | 93.6 | 93.6 | 93.7 | 93.3 | 92.9 | 92.5 |
| Model | Top-20 VRH (layer, head) |
|---|---|
| Qwen2.5-VL-7B | (19,17), (16,0), (18,16), (16,20), (19,22), (19,20), (16,1), (19,23), (19,15), (17,18), (16,7), (14,11), (14,16), (16,6), (16,17), (19,26), (19,19), (14,23), (17,14), (18,15) |
| Qwen3-VL-8B | (20,15), (21,10), (18,19), (18,15), (21,11), (21,18), (17,27), (17,4), (19,3), (22,4), (21,8), (20,8), (18,5), (23,13), (20,17), (20,18), (23,30), (21,25), (20,16), (23,10) |
| InternVL3-8B | (16,20), (16,0), (19,22), (16,1), (19,23), (19,17), (19,20), (16,6), (14,11), (19,15), (16,4), (17,24), (18,16), (16,16), (16,17), (20,21), (16,7), (19,19), (14,16), (14,8) |
| InternVL3.5-8B | (21,11), (20,15), (21,10), (19,3), (18,15), (17,4), (21,18), (18,19), (17,27), (20,17), (24,13), (21,8), (20,18), (20,16), (21,25), (20,8), (18,5), (22,4), (18,21), (23,30) |
| Model | Top-20 VRH (layer, head) |
|---|---|
| Qwen2.5-VL-7B | (19,17), (16,0), (16,20), (18,16), (19,22), (19,20), (16,1), (19,15), (19,23), (17,18), (14,11), (16,7), (14,16), (16,6), (16,17), (19,19), (19,26), (17,24), (14,23), (17,14) |
| Qwen3-VL-8B | (20,15), (21,10), (18,19), (18,15), (17,27), (21,11), (21,18), (17,4), (19,3), (20,8), (22,4), (21,8), (20,17), (20,18), (23,13), (21,25), (18,5), (23,30), (20,16), (23,10) |
| InternVL3-8B | (16,0), (16,20), (19,22), (19,23), (16,1), (19,17), (19,20), (16,6), (19,15), (14,11), (16,4), (17,24), (18,16), (20,21), (16,7), (16,16), (16,17), (14,8), (14,16), (19,19) |
| InternVL3.5-8B | (21,11), (21,10), (20,15), (19,3), (18,15), (21,18), (17,4), (18,19), (17,27), (20,17), (21,8), (20,18), (20,16), (24,13), (20,8), (22,4), (21,25), (17,26), (23,30), (23,10) |
| Model | Top-20 VRH (layer, head) |
|---|---|
| Qwen2.5-VL-7B | (19,17), (16,0), (16,20), (19,22), (18,16), (16,1), (19,20), (19,23), (19,15), (14,11), (17,18), (16,7), (14,16), (16,6), (16,17), (19,26), (14,23), (19,19), (17,14), (18,15) |
| Qwen3-VL-8B | (20,15), (18,19), (21,10), (17,27), (18,15), (21,18), (21,11), (17,4), (19,3), (22,4), (21,8), (20,8), (18,5), (20,17), (20,18), (21,25), (23,30), (23,13), (20,16), (17,24) |
| InternVL3-8B | (16,20), (16,0), (16,1), (19,22), (19,17), (19,23), (14,11), (16,6), (19,20), (16,4), (19,15), (18,16), (16,17), (16,16), (17,24), (14,8), (14,16), (16,7), (20,21), (14,14) |
| InternVL3.5-8B | (21,11), (20,15), (21,10), (18,15), (19,3), (17,4), (21,18), (18,19), (17,27), (20,17), (20,18), (20,16), (21,8), (24,13), (19,13), (20,8), (18,21), (17,26), (22,4), (18,5) |
| Model | Top-20 VRH (layer, head) |
|---|---|
| Qwen2.5-VL-7B | (19,17), (16,0), (19,22), (16,20), (19,15), (19,20), (19,23), (16,1), (18,16), (17,18), (19,19), (16,6), (19,26), (14,11), (19,25), (16,17), (16,16), (16,18), (16,4), (20,21) |
| Qwen3-VL-8B | (21,10), (20,15), (18,19), (21,11), (17,4), (18,15), (23,30), (21,8), (23,13), (22,4), (21,18), (20,17), (17,27), (23,10), (20,16), (20,8), (20,18), (19,3), (24,16), (21,31) |
| InternVL3-8B | (16,20), (19,17), (16,1), (19,20), (16,0), (19,15), (19,22), (16,17), (14,11), (19,23), (18,16), (16,16), (16,6), (20,21), (14,8), (19,19), (16,7), (17,24), (16,18), (21,25) |
| InternVL3.5-8B | (18,19), (21,11), (17,27), (21,10), (20,15), (18,15), (20,17), (17,4), (24,13), (23,30), (21,8), (19,3), (20,16), (21,18), (20,8), (23,10), (20,23), (18,21), (19,13), (21,9) |
| Model | Top-20 VRH (layer, head) |
|---|---|
| Qwen2.5-VL-7B | (19,17), (19,22), (19,20), (19,15), (16,0), (16,20), (19,23), (16,1), (19,19), (18,16), (17,18), (19,26), (20,21), (16,16), (16,6), (16,4), (14,11), (19,25), (16,7), (20,23) |
| Qwen3-VL-8B | (21,10), (21,11), (20,15), (21,8), (23,30), (17,4), (18,19), (18,15), (21,18), (23,13), (23,10), (22,4), (20,17), (19,3), (20,16), (17,27), (20,8), (23,14), (25,10), (21,31) |
| InternVL3-8B | (19,17), (16,1), (16,20), (19,22), (19,15), (19,20), (19,23), (16,0), (14,11), (20,21), (17,24), (19,19), (16,6), (18,16), (16,17), (16,7), (16,16), (21,25), (21,5), (16,4) |
| InternVL3.5-8B | (21,11), (21,10), (21,8), (18,15), (19,3), (18,19), (21,18), (20,17), (17,4), (20,15), (17,27), (20,8), (24,13), (23,30), (20,23), (20,16), (21,25), (23,10), (20,21), (21,9) |
| Model | # Layers | # Heads/layer | Total heads | Language backbone | Vision encoder | Projector |
|---|---|---|---|---|---|---|
| Qwen2.5-VL-7B | 28 | 28 | 784 | Qwen2.5-7B | Qwen ViT | MLP merger |
| Qwen3-VL-8B | 36 | 32 | 1152 | Qwen3-8B | Qwen ViT | MLP merger + DeepStack |
| InternVL3-8B | 28 | 28 | 784 | Qwen2.5-7B | InternViT-300M | 2-layer MLP |
| InternVL3.5-8B | 36 | 32 | 1152 | Qwen3-8B | InternViT-300M | 2-layer MLP |
| Qwen2.5-VL-7B | Qwen3-VL-8B | InternVL3-8B | InternVL3.5-8B | |
|---|---|---|---|---|
| Original model | 86.11 | 91.27 | 93.59 | 90.48 |
| w/ Masking VRHs ( ) | 7.14 | 29.85 | 8.98 | 32.94 |
| w/ Masking VRHs ( ; ours) | 7.48 | 20.39 | 8.76 | 32.03 |
| Random heads | VRHs (Ours) | Flipped | Flipped | Flipped | |
| (a) Qwen2.5-VL-7B | |||||
| (original model) | 86.11 | 86.11 | 86.11 | 86.11 | 86.11 |
| 86.16 | 79.29 | 56.08 | 63.28 | 63.14 | |
| 85.79 | 9.63 | 10.52 | 8.87 | 9.63 | |
| 85.97 | 7.48 | 7.68 | 8.13 | 8.01 | |
| 84.67 | 6.63 | 9.85 | 7.21 | 8.70 | |
| Evaluation set | Qwen2.5-VL-7B | Qwen3-VL-8B | InternVL3-8B | InternVL3.5-8B |
|---|---|---|---|---|
| w/ head detection samples ( ) | 7.46 | 20.44 | 8.76 | 32.14 |
| w/o head detection samples ( ) | 7.48 | 20.39 | 8.76 | 32.03 |
| Setting | # Visual tokens | Peak memory (GiB) (Eager / Fused Att.) | Time (s/sample) (Eager / Fused Att.) |
|---|---|---|---|
| Low resolution ( ) | 256 | 15.09 / 14.92 | / |
| Low resolution ( ), 2 images | 512 | 15.55 / 15.01 | / |
| High resolution ( ) | 3,328 | 34.59 / 16.01 | / |
| Condition | Magma-8B [ 27 ] | LLaVA-NeXT- Llama3-8B [ 28 ] | PaliGemma2- 10B [ 29 ] | DeepSeek-VL2- Small [ 30 ] | InternVL2.5- 8B [ 31 ] | GLM-4.6V- Flash [ 32 ] | Phi-4-Reasoning- Vision [ 33 ] |
|---|---|---|---|---|---|---|---|
| Language backbone | Llama-3 | Llama-3 | Gemma 2 | DeepSeekMoE | InternLM2.5 | GLM | Phi |
| Baseline ( ) | 68.8 | 85.8 | 73.6 | 93.0 | 90.0 | 86.4 | 74.2 |
| Random ( ) | 64.0 | 77.8 | 73.2 | 91.6 | 86.8 | 85.8 | 73.8 |
| VRH ( ) | 7.8 | 5.0 | 11.6 | 21.4 | 11.4 | 10.0 | 18.0 |
| Magma-8B | LLaVA-NeXT-Llama3-8B | |
|---|---|---|
| Original model | 68.8 | 85.8 |
| w/ Masking own top-20 VRHs | 7.8 | 5.0 |
| w/ Cross-masking VRHs | 0.0 | 5.8 |
| w/ Masking random heads | 64.0 | 77.8 |
VLM Interpretability
Vision-language model interpretability explains how image and language representations shape predictions, evidence use, and multimodal reasoning.
See all 256 papers