Logit-Attention Divergence: Mitigating Position Bias in Multi-Image Retrieval via Attention-Guided Calibration

Mingtao Xian, Yifeng Yang, Qinying Gu, Xinbing Wang, Nanyang Ye

Multimodal Large Language Models (MLLMs) like LLaVA and Qwen2-VL have demonstrated impressive capabilities in cross-modal tasks. However, when tasked with retrieving a specific image from a large gallery based on a text description, these models exhibit a severe flaw: position bias. Rather than selecting the most semantically relevant image, they disproportionately favor images at specific sequence positions (e.g., the very beginning or end).

This paper identifies the root cause of this phenomenon—termed Logit-Attention Divergence—and introduces a training-free, attention-guided calibration method to resolve it, boosting retrieval accuracy by over 40% with minimal overhead.

The Problem: Conditional Position Bias

Existing solutions to position bias generally fall into two categories: prompt engineering (instructing the model to ignore position) and logit-level calibration (subtracting a static bias score from the output). Both fall short. Prompts are frequently overridden by the model's structural priors, and static calibration fails because position bias is conditional—it shifts dynamically depending on the actual location of the target image within the sequence.

The Discovery: "Look Right, Speak Wrong"

The core breakthrough of this research is the observation of Logit-Attention Divergence. By examining the internal workings of MLLMs, researchers discovered that even when the model's final output (logits) selects the wrong image, its internal attention maps are often correctly focused on the relevant visual evidence.

Essentially, the model "looks" at the right answer but "says" the wrong one. The autoregressive decoder effectively overrides accurate visual perception with biased structural priors during the final decision-making stage.

The Solution: Attention-Guided Debiasing (LAD)

To correct this divergence without expensive retraining, the authors propose Attention-Guided Debiasing (LAD). This framework leverages the model's own accurate internal signals to calibrate its biased outputs at inference time:

  1. Conditional Bias Estimation: Using a minimal calibration set (as few as five samples) and cyclic permutations, LAD estimates how the model's bias shifts based on the target's position.
  2. Adaptive Layer Selection: The system automatically identifies the most "informative" Transformer layers that exhibit the strongest focus on visual regions.
  3. Attention Purification: LAD filters out "attention sinks"—systematic artifacts where models attend to specific tokens regardless of content—yielding a pure visual signal.
  4. Inference-Time Calibration: During runtime, this purified internal attention acts as a trustworthy guide, re-weighting the biased output logits to ensure the final prediction aligns with the model's actual visual perception.

Experimental Setup & Datasets

The framework was rigorously tested across several benchmarks:

  • MS-COCO & Flickr8k: Standard datasets used to evaluate multi-image retrieval and cross-domain generalization (e.g., calibrating on Flickr8k and testing on MS-COCO).
  • Adversarial Benchmark: A newly introduced, highly challenging retrieval task utilizing CLIP embeddings to source "hard negatives"—distractor images visually similar to the target that force the model to use fine-grained reasoning.
  • MMIU: A multi-image Visual Question Answering (VQA) benchmark to verify generalization beyond simple retrieval.

Key Results

  • Massive Accuracy Gains: In an 8-image retrieval task using LLaVA-OneVision, vanilla model accuracy was a dismal 31.56%. With LAD, performance skyrocketed to 94.92%.
  • Permutation Invariance: The order of images should not dictate the answer. LAD improved the "Consistency" metric from near-zero in vanilla models to over 80-90%.
  • High Efficiency: LAD requires only a single forward pass and introduces negligible computational overhead, making it highly practical for real-time deployment.
  • Robust Generalization: Calibration profiles learned on one dataset transferred almost perfectly to others, indicating that position bias is a fundamental structural property of the architecture rather than a dataset-specific artifact.

Limitations and Future Directions

While highly effective, LAD has constraints. It requires "white-box" access to internal attention weights, rendering it incompatible with closed-API models like GPT-4o or Claude 3.5 where only final text outputs are available. Additionally, it is bound by the quality of the underlying visual encoder; if the encoder cannot distinguish between two images, LAD cannot synthesize missing information. Finally, the current framework is optimized for discriminative tasks (multiple-choice selection), and extending it to open-ended generative tasks remains an area for future work.

Summary updated

BibTeX
@inproceedings{xian2026logit,
  author = {Mingtao Xian and Yifeng Yang and Qinying Gu and Xinbing Wang and Nanyang Ye},
  title = {{Logit-Attention Divergence: Mitigating Position Bias in Multi-Image Retrieval via Attention-Guided Calibration}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=xTkYT79CRB},
}
Figure