See Only When Needed: Context-Aware Attention Intervention for Mitigating Hallucinations in LVLMs

Yuqing Lei, Wenbo Lyu, Yingjun Du, Xiantong Zhen, Cees G. M. Snoek, Ling ShaoarXiv 2026

TL;DR

Context-aware Attention Intervention (CAI) is a training-free, inference-time method designed to mitigate object hallucinations in Large Vision-Language Models (LVLMs). By dynamically identifying where to look using early-layer visual grounding and when to intervene using deep-layer predictive entropy gating, CAI applies a targeted attention tilt only when the model experiences uncertainty. This approach achieves state-of-the-art hallucination reduction across multiple benchmarks with negligible computational overhead.

What Problem Does This Paper Address?

Large Vision-Language Models (LVLMs) frequently suffer from "object hallucination"—generating descriptions of objects that are completely absent from the input image. This issue stems from both statistical biases in training data and an over-reliance on strong language priors inherited from the underlying LLM. During autoregressive decoding, early mismatches between text and vision can compound, causing the model to ignore visual evidence in favor of fluent but incorrect text.

Existing training-free remedies try to fix this by uniformly boosting visual signals across all decoding steps and tokens. However, this indiscriminate amplification introduces noise, elevates irrelevant image regions, and can degrade linguistic fluency. The authors argue for a "see only when needed" principle: intervention should be sparse, targeted, and applied only to tokens at risk of hallucinating.

Methods

The authors introduce Context-aware Attention Intervention (CAI), which operates along two selective axes:

  1. Where to look (Token-Specific Relevance): CAI extracts the hidden state of the current token from the 0-th layer of the transformer, where representations remain disentangled from high-level language abstractions and retain strong spatial alignment with the image. It computes a token-image similarity matrix (using an L2-normalized inner product and a sigmoid function) to precisely localize which image patches correspond to the token being generated.
  2. When to intervene (Entropy- and Depth-Gating): Instead of altering attention everywhere, CAI uses a dual-gating mechanism. It restricts intervention to deeper layers (where visual grounding typically degrades) and triggers it only if the predictive entropy of the token exceeds a threshold $\gamma$, signaling high uncertainty.
Fig. 2: Given visual input (a) and the query “Please describe the image in detail”, (b) shows the evolution of token entropy across decoding layers. In deeper layers, hallucination-prone tokens (e.g., “traffic light”) exhibit markedly higher entropy than grounded tokens (e.g., “man”), whereas tokens dominated by language priors (e.g., “The”, “a”, “at”) remain low-entropy.

When both gates are active, CAI applies a multiplicative/additive "attention tilt" to the multi-head self-attention weights, amplifying focus on the semantically relevant image regions. CAI can also be optionally paired with contrastive decoding to further suppress text-only biases.

Datasets

The method was evaluated using three standard benchmarks across three different LVLM backbones (LLaVA-1.5, InstructBLIP, and Qwen-VL):

  • POPE (Plessey Object Presence Evaluation): Evaluates object hallucination via binary (yes/no) queries using random, popular, and adversarial sampling strategies on MS-COCO, A-OKVQA, and GQA.
  • CHAIR (Caption Hallucination Assessment with Image Relevance): Measures sentence-level and instance-level hallucination rates in free-form image captioning.
  • MME: A comprehensive benchmark evaluating general visual reasoning across 14 subtasks (including object existence, count, position, and color).

Key Insights and Ideas

  • Early vs. Late Layer Dynamics: Visual information processing is highly localized in the earliest layers of decoder-style LVLMs. As representations move deeper, they aggregate into abstract lexical concepts and become heavily dominated by language priors. CAI exploits this by extracting the "grounding map" from layer 0 but applying the intervention in deep layers.
Token-image similarity for "woman" vs "motorcycle"
  • Entropy as a Proxy for Hallucination Risk: Hallucination-prone tokens exhibit a distinct spike in predictive entropy in deeper layers, whereas safely grounded tokens or function words (like "the", "a", "at") remain low-entropy.
Token entropy evolution across decoding layers
  • KL-Minimality: The authors mathematically prove that CAI's exponential attention tilt is the optimal way to maximize expected token-image relevance within a fixed Kullback-Leibler (KL) divergence budget, ensuring minimal disruption to the model's natural fluency.

Key Results

  • State-of-the-Art Mitigation: On the POPE adversarial setup with LLaVA-1.5, CAI improved accuracy from 75.87% (Regular) to 82.77%, outperforming other training-free methods like VCD (76.90%) and PAI (76.83%).
  • Free-Form Captioning Improvements: On the CHAIR benchmark (Max Token = 128), CAI reduced sentence-level hallucinations ($\text{CHAIR}_S$) from 56.6% to 39.6% for LLaVA-1.5.
  • High Efficiency: Unlike contrastive decoding methods that require multiple forward passes (e.g., VCD increases latency by 240%), the standalone attention-only variant ($\text{CAI}^\dagger$) incurs only a ~3% latency overhead while still delivering substantial hallucination reduction.

Limitations and Future Work

  • Confident Hallucinations: A primary limitation of uncertainty-gated methods is "confident hallucination," where the model generates an incorrect object but does so with high predictive confidence (low entropy). In these cases, the entropy gate is not triggered, and CAI fails to intervene.
Failure mode of confident hallucination
  • Hybrid Architectures: For newer architectures utilizing alternative attention mechanisms like Gated Linear Attention (GLA) alongside standard Softmax attention (e.g., Qwen3.5), CAI can only modulate the Softmax layers since GLA operates on recurrent states without explicit token-to-token attention maps.

Summary updated

BibTeX
@misc{lei2026see,
  author = {Yuqing Lei and Wenbo Lyu and Yingjun Du and Xiantong Zhen and Cees G. M. Snoek and Ling Shao},
  title = {{See Only When Needed: Context-Aware Attention Intervention for Mitigating Hallucinations in LVLMs}},
  year = {2026},
  eprint = {2606.29847},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.29847},
}
Figure