Image Retrieval Heads in LVLMs: Pointers That Also Write
In multi-image LVLMs, attention to the target image is not enough to call a head an image-retrieval head; the causal signal concentrates in heads that both point to the target image and write target-image information into their outputs.
On this page
A team with 4 open-weight LVLMs must decide which heads to ablate before shipping a multi-image QA pipeline, but ranking heads by attention mass alone can pick the wrong set. The usual advice is to treat a head as an image-retrieval head when its attention lands on the target image's visual tokens. That advice is intuitive, cheap, and consistent with prior retrieval-head work in language models [1]. Yet attention shows where a head reads from, not what its value-weighted output passes to later layers. This paper builds a controlled probe, ICIR-MCQ, to compare the input-side pointer criterion with an output-side writer criterion on InternVL3.5-4B/8B and Qwen3-VL-4B/8B. The headline result is a large disagreement: among the top 100 heads under each criterion, only 35 to 47 overlap. The sections below unpack the probe, the numbers, the causal ablation, and the cases where the method does not apply.
Default Practice: Rank Heads by Attention Mass
Start with the default. In an interleaved multi-image context, a model must ground a question in one image, so the natural check is to ask which attention head sends its attention to which image's tokens. An attention head is a small parallel module inside a transformer that assigns weights over context positions; an image is encoded as a contiguous span of image tokens, much like a passage of text. The paper calls the input-side score the pointer criterion: at the cattok, the last token of the final mention of the queried category, sum a head's attention mass over each image's visual-token span, and call the highest-scoring image the one the head points to [1]. Attention mass is simply the share of the head's attention that lands on that span. Head-level R@1 is the fraction of samples on which the target image ranks first. This check is intuitive and cheap, and it follows the convention used to find retrieval heads in language-only models. The catch is that it answers where a head reads from, not what it writes back to later layers.
The ICIR-MCQ Probe: A Controlled Multi-Image Question
To compare criteria, the authors build ICIR-MCQ. Each sample is an interleaved context: N candidate images, intervening text passages that do not reveal the answer, a queried object category, and four candidate captions; the model must pick the caption describing the image that contains the category. The target image is the only image annotated with that category, and distractor captions come from other COCO images that also contain it, so the category word alone cannot solve the task. The design inherits the interleaved structure and fixed passages of MM-NIAH's image-retrieval task, but substitutes natural MS-COCO images and captions, making the passages independent of the target and answer by construction. Scoring happens at the cattok because the category cue has just appeared in text and all candidate images are in the causal past. The study uses 4 LVLMs from 2 families and 2 scales: InternVL3.5-4B, InternVL3.5-8B, Qwen3-VL-4B, and Qwen3-VL-8B. The 4B pair shares an LLM backbone, as does the 8B pair, which lets the authors check whether head indices reproduce. ICIR-MCQ is a discovery probe, not a downstream benchmark; transfer is tested on Visual Haystacks.
Pointer Heads Are Sparse and Reproducible
Pointer heads are sharply concentrated. In all 4 models, the top pointer head is L21H10, with R@1 between .866 and .922; chance R@1 is .183, and the median head sits at .198 to .217. Table 1 lists the top five per model: the strong heads cluster in a narrow mid-block layer band, and within each shared LLM backbone group, the top (layer, head) indices reproduce. The transfer result is the striking part: on Visual Haystacks, a naturalistic multi-image retrieval benchmark, a single pointer head is competitive with external vision-language retrievers such as CLIP and SigLIP. That means LVLMs contain a strong internal image-retrieval signal, carried by a very sparse set of heads. But this is still input-side evidence. High attention mass says the head reads the target image's tokens; it does not say the head's output preserves target-image information. A head can point cleanly and still write something else into the residual stream.
| Model | Top pointer head | Top-head R@1 | Median-head R@1 |
|---|---|---|---|
| InternVL3.5-8B | L21H10 | .890 | .206 |
| Qwen3-VL-8B | L21H10 | .922 | .198 |
| InternVL3.5-4B | L21H10 | .866 | .217 |
| Qwen3-VL-4B | L21H10 | .905 | .206 |
Writer Heads: Does the Output Carry the Target Image?
The authors add an output-side test. For each head, they take its value-weighted output: the head mixes value vectors according to its attention weights, producing the vector it writes back to the residual stream. They then train a lightweight image retriever on that output and ask whether the target image can be recovered from it. Heads whose outputs carry enough information for the retriever are called writer heads. The key number is the disagreement: among the top 100 heads under the pointer criterion and the top 100 under the writer criterion, only 35 to 47 overlap. The two criteria therefore select substantially different head sets. A head can point cleanly at the target image yet write no recoverable target-image information; conversely, recoverable output information need not come with strong attention mass.
Causal Ablation and Where the Method Stops
The causal test is a set-partition ablation: split heads into the pointer-writer intersection, pointer-only heads, writer-only heads, and random-head controls, then disable one group and measure standard multi-image inference. The model depends most on the intersection; heads selected by only one criterion separate less consistently from random-head controls. In other words, heads that both point and write carry the most consistent causal effect. The boundaries matter too. ICIR-MCQ is a controlled probe built on COCO category annotations and four-way caption matching, scored at a fixed cattok; it is not open-ended multi-image dialogue, long-document image QA, or video retrieval. The study covers 4 LVLMs from 2 families, and the ablation intervenes on head sets rather than full circuits. The writer criterion uses a lightweight retriever to probe outputs, so it shows recoverability, not that the model uses the information in a human-readable form.
- The method fails when the target image has no textual category cue to anchor the cattok score.
- It does not apply when the input is single-image, video, or text-only retrieval rather than interleaved multi-image context.
- It is out of scope when retrieval requires multi-turn dialogue or external knowledge beyond the provided candidates.
The conclusion is not that attention is useless. It is that attention-only ranking systematically misses writer heads; to identify image-retrieval heads, check both where a head points and what it writes.
