arXiv:2611.04903cs.CVNov 2026

Manuscript Offprint

arXiv:2611.04903

Heads That Write, Not Just Point: Image Retrieval Heads in Vision-Language Models

Junsung Park, Sangwon Yu, Donghun Kang, Yeongtak Oh, Jaewon Jeong, Gyeongtae Yoo, Han Cheol Moon, Jungbeom Lee, Sungroh Yoon

Abstract

Large vision-language models (LVLMs) can process interleaved text and multiple images in a single context, but how they internally identify the image relevant to a question remains poorly understood. We study this grounding step as in-context image retrieval and introduce ICIR-MCQ, a controlled probe for head-level analysis of image retrieval. Using each head's attention mass over image-token spans, we first identify sparse pointer heads that reliably point to the target image. These heads transfer beyond the probe: a single pointer head is competitive with external vision-language retrievers on a naturalistic multi-image retrieval benchmark, showing that LVLMs contain a strong internal image retrieval signal. Attention alone, however, shows where a head reads from, not what its output passes on to later layers, so we introduce a complementary output-side analysis. For each head, we train a lightweight image retriever on its value-weighted output and use it to identify writer heads, whose outputs contain enough information to identify the target image. Surprisingly, the pointer and writer criteria select substantially different head sets, with only 35 to 47 heads overlapping among the top-100 heads under each criterion. Targeted set-partition ablations show that the heads most important for standard multi-image inference are concentrated in this pointer-writer intersection, while heads selected by only one criterion show less consistent separation from random-head controls.

The most consistent causal effects arise from heads selected by both the attention-based pointer and output-side writer criteria. Code and data: https://github.com/parkquasar/Image-Retrieval-Heads.

1 Introduction

Modern large vision-language models (LVLMs) [3, 6, 21, 40] can process interleaved text and multiple images in a single context, enabling applications such as document understanding and multi-image question answering. In multi-image contexts, answering an image-grounded question requires more than visual recognition: the model must first identify which image the question refers to. We refer to this image-grounding component as in-context image retrieval. This retrieval step gates downstream computation, since grounding the question in the wrong image conditions the answer on the wrong visual evidence. Recent multi-image benchmarks show that model accuracy drops as the number of candidate images increases, exposing in-context image retrieval as a central behavioral bottleneck [39, 41]. However, they leave open how LVLMs internally perform this image selection, and which components in the model carry the image retrieval signal.

*Corresponding authors: Jungbeom Lee (jbeomlee@korea.ac.kr), Sungroh Yoon (sryoon@snu.ac.kr).

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Attention-pattern analysis has been a standard tool for identifying specialized heads in transformers [10, 27, 37]. Recent retrieval-head analyses and attention-based VLM head analyses likewise identify heads by where they attend in the input context [4, 8, 42]. This approach is intuitive and has been effective in practice: attention patterns expose which tokens or spans a head points to. However, pointing is only one side of the attention operation. Attention patterns do not by themselves determine what information the head writes into the residual stream. A head's output is the value-weighted vector produced by mixing value vectors according to its attention weights, and this output, rather than the attention pattern itself, is what downstream layers consume [20].

We hypothesize that this gap between pointing and writing is especially important for in-context image retrieval in LVLMs, where retrieval is cross-modal: attention points to visual-token spans, but the value-weighted output must carry target-image information in a hidden representation used by later language-generation layers. This creates a mismatch between pointing and writing. A head may point cleanly to the target image without writing target-image information in a form recoverable from its output. Conversely, output-side recoverability and attention-mass strength need not induce the same ranking. Attention-only head discovery may fail to distinguish heads that merely point to the target image from heads that also write target-image information into the residual stream.

We test this hypothesis with a two-sided analysis of head-level retrieval in LVLMs. On the input side, we identify pointer heads using attention mass over image-token spans (§4). On the output side, we identify writer heads by training a lightweight head-specific image retriever on each head's value-weighted output, asking whether the target image can be identified from the information carried by that output (§5). We then use targeted ablations to test which head population the model's answer-generation pathway depends on. Identifying image retrieval heads in LVLMs therefore requires combining where a head points with what it writes.

To carry out this analysis, we introduce ICIR-MCQ (Figure 1; §3.2), a controlled probe that gives each sample a clear target image while keeping the task solvable by standard LVLMs. ICIR-MCQ is designed for controlled head-level discovery rather than as a standalone downstream benchmark; we evaluate transfer and causal relevance on Visual Haystacks [41], a naturalistic multi-image retrieval benchmark. Across four LVLMs spanning two families and scales, only 35–47 of the top-100 heads under the pointer and writer criteria overlap. Targeted set-partition ablations further show that standard multi-image inference depends primarily on this pointer-writer intersection, while heads selected by only one criterion show less consistent separation from random-head controls (§6).

Our contributions are as follows.

  1. A controlled probe for head-level image retrieval. We introduce ICIR-MCQ, a controlled probe with clear target-image labels for head-level retrieval analysis.

  2. Pointer heads as strong implicit image retrievers. We identify sparse pointer heads that reproduce at identical (layer, head) indices within shared LLM backbones. A single pointer head is competitive with external vision-language retrievers like CLIP and SigLIP.

  3. Writer heads via a complementary output-side criterion. We introduce an output-side head discovery method that trains a lightweight image retriever on each head's output, identifying writer heads whose outputs retain recoverable target-image information. This retriever-based ranking differs substantially from the attention-based pointer ranking.

  4. Causal validation: retrieval heads are pointers that write. Set-partition ablations show that standard multi-image inference is most sensitive to heads selected by both criteria.

References (40)