When a vision-language model is shown three identical coffee cups and asked about "the cup on the right," it has to tell apart image regions that look the same. The attention mechanism inside these models finds things mostly by what they look like, not by where they are. In text-only language models this weakness is well documented: when a sequence contains repeated identical symbols, attention spreads evenly across all copies, and the model loses track of which one it is supposed to copy, point to, or align. Making the model larger does not fix this. Our claim is that the same failure carries over to images, where repeated objects play the role of repeated words, and that the fix that works in text carries over too: give each copy a unique, explicit index. We propose to test this on duplicate-heavy grounding tasks in a small decoder-only vision-language model, by replacing content-matched "anchor" tokens with index-tagged anchors that are unique by construction.
The concrete starting point is AttAnchor, a recent method that copies a text word into the image part of the input sequence, right next to the image patch it most resembles, so the word and the patch sit close together in the sequence. It decides where to place these copies by content similarity alone, so for three identical cups it has no principled choice of patch. We keep its insertion idea but tag every inserted copy with a short grid coordinate. The copies become distinct tokens ("cup" at row 2 column 1, "cup" at row 2 column 4), and the model answers grounding questions by pointing to coordinates rather than by matching appearance. If the failure really is the text-side locating failure, it should grow with the number of identical copies, persist at larger model size, and largely disappear under index tagging while staying unchanged when the tags are shuffled.
Background and the gap
Three findings about text-only models motivate the proposal. Limitations of Language Models in Arithmetic and Symbolic Induction shows that GPT-3, T5 and DeBERTa fall to near 0% accuracy on copying, reversal and addition once symbols repeat and sequences get longer. Scratchpads and disentangled attention do not help. Only explicit cursor-and-position actions reach 100%. Born a Transformer -- Always a Transformer? studies this within C-RASP[pos], a formal language that characterizes what transformers can compute and length-generalize. It finds that retrieval across non-unique tokens fails at every scale up to 70B. Fine-tuning recovers backward ("anti-induction") retrieval but does not fix the non-uniqueness failure. That paper limits our design: we should not expect more data or parameters to dissolve the problem, and a fix has to change the input so that tokens become unique. Dependency Parsing via Sequence Generation supplies the method we reuse. It injects explicit position IDs into the input and asks for head positions as numbers in the output, which removes ambiguity over repeated words such as "the" and lets an unmodified T5 reach 96.64 UAS on the Penn Treebank. Token-level prompt decomposition (ToPro) isolates each position in a separate forward pass. It works, but it costs roughly 4x compute, and that cost is the reason we prefer in-sequence indexing.
On the multimodal side, work on the gap between image and text representations has mostly improved what features carry, not where they point. MAF builds richer region features and text embeddings that attend to the image, reaching 61.43% on Flickr30k Entities. Its matching is purely inner-product, so two regions with the same class and attributes are indistinguishable to it. UniCode merges image and text into a single discrete vocabulary. This should make uniform image regions into runs of repeated code IDs, which is exactly the regime where the text-side results predict trouble. AMLRIS scores how well each patch matches the text with a position-blind random projection, then masks poorly matching patches during training. Identical distractors receive identical scores under this scheme. Tuning LayerNorm in Attention shows that adapting a text model to images can be handled largely by normalization parameters. This tells us the domain shift itself is cheap to address, which leaves duplicate disambiguation as a separate problem.
The closest prior work sits where the two directions meet. AttAnchor addresses the penalty that rotary position embeddings (RoPE, a scheme that makes attention decay with sequence distance) place on late text attending to early image patches. Its remedy is to duplicate text tokens next to their most similar patches, which lets TinyLLaVA 1B reach 86.63% on POPE, a benchmark for hallucinated objects. AttAnchor treats the problem as one of distance. We treat it as one of identity: an anchor placed by content inherits content ambiguity. MAttNet separates location from appearance in its language parse, but it is a modular network that depends on an external detector. GRES/ReLA introduces gRefCOCO, a referring-expression dataset with multi-target and no-target queries, and reaches 63.60% gIoU with learnable region queries. Neither indexes instances inside the token stream of a generative model. Our proposal is the first we found that makes cross-modal anchors unique by explicit coordinate and tests whether the text-side theory of non-unique retrieval predicts multimodal grounding errors.
Core Claim
Grounding errors on images with identical objects in decoder-only vision-language models are mainly a locating failure caused by non-unique tokens, not a feature-quality failure. Three predictions follow. Error should grow with the number of indistinguishable instances $k$ even when overall scene difficulty is held fixed. Error should persist when the model grows from 1B to 7B. Index-tagged anchors should remove most of the error, while shuffled tags should not, because shuffled tags add the same number of tokens but carry no spatial information. If instead error tracks clutter or feature quality and not $k$, or if shuffled tags help as much as correct ones, the claim is wrong.
Research Program
The method has two parts on top of TinyLLaVA 1B with the AttAnchor insertion code path. The first is a coarse grid of index tokens. The image's patch tokens are grouped into a G×G grid (G of 8 or 12), and a short text index such as "r3c5", built from the existing number vocabulary, is placed before each group. This mirrors the positional prompts of Dependency Parsing via Sequence Generation but in two dimensions. The second part is index-tagged anchors. As in AttAnchor, a text token whose cosine similarity with a patch exceeds a threshold is copied next to that patch. Unlike AttAnchor, when several patches pass the threshold, we place a copy next to every candidate, and each copy carries that candidate's grid index. The copies are therefore distinct tokens. Grounding answers are trained as index pointers ("r2c4", or a set of indices for multi-target queries), following DPSG's numbered outputs. During decoding, outputs are restricted to valid indices, which removes the small rate of invalid pointers DPSG reports.
Training uses LLaVA-Instruct-150K together with the referring-expression training splits of RefCOCO, RefCOCO+, RefCOCOg and gRefCOCO, with answers converted to index pointers. We report both LayerNorm-only tuning, following Tuning LayerNorm in Attention, and full tuning of the connector between the image encoder and the language model plus LayerNorm. Comparing the two shows whether the gain requires changing the input sequence or can be obtained by adjusting the representation alone.
The diagnostic half matters as much as the method. We build a duplicate stress set in three layers. The first is synthetic grids of $k \in \{1,\dots,8\}$ identical rendered objects, asked about with ordinal, relational, counting and "all of" queries. The second is RefCOCO and RefCOCO+ test items stratified by how many same-category distractors they contain. The third is the multi-target subset of gRefCOCO. On these sets we measure accuracy as a function of $k$. We also measure the directional asymmetry that Born a Transformer found in text. Image patches are fed in left-to-right raster order, so the text result predicts that "rightmost" queries resemble forward retrieval and "leftmost" queries resemble backward retrieval. If the multimodal model shows the same asymmetry, that is direct evidence the text phenomenon transfers.
Baselines
The naive reference point is TinyLLaVA 1B fine-tuned on the same data with its standard sequence and no anchors. On the stress set it shows the raw dependence of error on $k$.
The strongest existing method on this exact question is AttAnchor on the same backbone, retrained by us on the same data mix with the same compute and the same threshold search budget. Its reported POPE accuracy is 86.63% for TinyLLaVA 1B (AttAnchor), against 86.60% for LLaVA 7B. Beating it means significantly higher accuracy on the stress items with $k \ge 3$ and on multi-target gRefCOCO, without losing more than half a point on POPE. Matching POPE is a non-regression requirement, not where we expect gains.
For the grounding benchmarks we report specialized systems as external references only, because their training and outputs differ. ReLA reports 63.60% gIoU on gRefCOCO validation, against 58.40% for LAVT (GRES). MAttNet reports about 85% localization accuracy on RefCOCO (MAttNet), and we can rerun it from the official code at lichengunc/MAttNet on our duplicate-stratified splits. Our pointer outputs are coarse grid cells, not masks, so we compute gIoU at grid resolution. We also report the score an oracle choosing the best cells could reach at that resolution, so readers can see how much the comparison is limited by resolution and how much by the method.
Three ablations isolate the key ingredient. The first uses index tokens without anchors, which tests whether the grid indices alone are enough. The second uses multi-candidate anchors without index tags, which tests whether placing a copy at every candidate is enough. The third uses index tags shuffled across grid cells, which keeps token count and sequence length identical but destroys the spatial meaning. Only the full method should beat the shuffled-tag control on $k \ge 3$ items. If the shuffled control matches it, the gain comes from sequence length or regularization, and the claim fails.
Why not just…?
Why not just scale the model? The text evidence says non-unique retrieval fails at every scale up to 70B (Born a Transformer). Images could still behave differently, so we test the claim directly: we rerun the naive baseline and AttAnchor at 7B. If the slope of error against $k$ flattens substantially at 7B, scale is a real answer for this regime, and we would report that as a negative result for our thesis.
Why not just draw numbers on the image, or have the model output box coordinates as text? This is the most serious alternative. Printed marks on the pixels and coordinate outputs both give instances unique identities, which is the same principle we rely on. The difference is where that identity enters. Printed marks must survive the image encoder and then be matched by content again, so marks rendered identically on identical objects could reintroduce the same ambiguity. Coordinate outputs fix only the answer, not the attention path. We include both as baselines under the same data and budget. If the printed-mark variant matches index-tagged anchors, the honest conclusion is that uniqueness matters and how it is delivered does not, and the contribution narrows to the diagnosis.
Why not just use a better 2D position encoding? Position encodings make tokens technically distinct, yet Dependency Parsing via Sequence Generation found T5's relative positions insufficient without explicit IDs. AttAnchor also shows that RoPE's distance decay works against image-text alignment. We still run a 2D-RoPE variant of the backbone as a control, because a large gain from it would mean the problem is how positions are encoded rather than missing identity.
Why not just prompt the model to scan left to right in a scratchpad? Scratchpads did not rescue repeated-symbol tasks in Limitations of Language Models. We include a scan-then-answer prompt on the stress set. Our expectation is that it helps for small $k$ and degrades as $k$ grows.
Why not just fine-tune harder on grounding data? In text, fine-tuning fixed the directional bias but not the non-uniqueness failure (Born a Transformer). Our naive baseline already receives the full grounding data, so any remaining slope against $k$ is the answer to this question.
Decisive Checks
Three results decide the project. The first is the slope of accuracy against $k$ on the synthetic and distractor-stratified sets, for the naive baseline and AttAnchor at 1B and 7B. A steep slope that does not shrink with scale supports the diagnosis. The second is the left-versus-right asymmetry under raster ordering. If it mirrors the forward-versus-backward retrieval gap in text, that is the strongest single piece of evidence that the text phenomenon transfers. The third is the gap between correct and shuffled index tags at $k \ge 3$, together with non-regression on POPE and comparisons at grid resolution on multi-target gRefCOCO. If correct tags clearly beat shuffled tags and AttAnchor while matching the printed-mark baseline only within noise, the result is that uniqueness, delivered in the token stream, is what grounding over identical objects needs.
References
- Limitations of Language Models in Arithmetic and Symbolic Induction
- Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilities
- Dependency Parsing via Sequence Generation
- ToPro: Token-Level Prompt Decomposition for Cross-Lingual Sequence Labeling Tasks
- MAF: Multimodal Alignment Framework for Weakly-Supervised Phrase Grounding
- UniCode: Learning a Unified Codebook for Multimodal Large Language Models
- AMLRIS: Alignment-aware Masked Learning for Referring Image Segmentation
- Tuning LayerNorm in Attention: Towards Efficient Multi-Modal LLM Finetuning
- AttAnchor: Guiding Cross-Modal Token Alignment in VLMs with Attention Anchors
- MAttNet: Modular Attention Network for Referring Expression Comprehension
- GRES: Generalized Referring Expression Segmentation