Not All Tokens and Heads Are Equally Important: Dual-Level Attention Intervention for Hallucination Mitigation

Lexiang Tang, Xianwei Zhuang, Bang Yang, Zhiyuan Hu, Hongxiang Li, Lu Ma, Jinghan Ru, Yuexian Zou

TL;DR

VisFlow is a training-free, inference-time framework designed to mitigate visual hallucinations in Large Vision-Language Models (LVLMs). By identifying that not all tokens and attention heads contribute equally to grounding, it applies a dual-level intervention—amplifying attention to salient visual regions while suppressing "distractions" from system prompts and linguistic priors—resulting in more accurate descriptions with minimal computational overhead.

What Problem Does This Paper Address?

Large Vision-Language Models (LVLMs) like LLaVA are impressive, but they suffer from a persistent flaw: visual hallucination (VH). They often describe objects or attributes that simply aren't in the image.

The authors identify two primary culprits behind this:

  1. Insufficient Visual Attention: Models often fail to focus on the most informative parts of an image. Interestingly, the authors found that the Rotary Positional Embedding (RoPE) used in many models introduces a "positional bias," where the model disproportionately attends to visual tokens that happen to be physically closer to the text prompt in the sequence, regardless of their actual importance.
  2. Over-reliance on Language Priors: Models sometimes get "locked in" to their internal linguistic logic. They might ignore the image and simply predict the next word based on the system prompt (e.g., "You are a helpful assistant") or the immediately preceding text tokens, leading to generic or biased outputs.

Methods

The authors propose VisFlow, which intervenes in the model's attention mechanism during the decoding process. It consists of two main components:

  • Token-level Attention Intervention (TAI):
    • VisFlow calculates a "reception score" for visual tokens to identify salient tokens (those critical for grounding) and visual sinks (tokens that absorb attention but lack semantic value).
  • It then modifies the attention weights: amplifying attention toward salient regions and attenuating it for sinks. Crucially, it also applies a correction factor to neutralize the bias introduced by RoPE.
  • Head-level Attention Intervention (HAI):
    • The researchers observed that attention heads are specialized. Some are "visual-sensitive," while others are "system-dominant" or "text-dominant."
    • VisFlow identifies these "distracted" heads during the prefill stage and downscales their influence during generation. This prevents the model from over-focusing on the system prompt or getting stuck in a linguistic loop.

Unlike "contrastive decoding" methods that require running the model multiple times per token (which is slow), VisFlow is a single-pass intervention, making it significantly more efficient.

Datasets

The authors evaluated VisFlow across several diverse benchmarks:

  • POPE (Polling-based Object Probing Evaluation): Measures object existence hallucinations (Random, Popular, and Adversarial settings).
  • CHAIR (Caption Hallucination Assessment in Image REcall): Evaluates hallucinations in long-form image captioning at both the instance and sentence level.
  • GPT-4.1 Assisted Benchmarks: A set of 60 nuanced questions where GPT-4.1 acts as a judge to evaluate factual accuracy and descriptive detail.

The models tested included LLaVA-1.5, MiniGPT-4, and mPLUG-Owl2.

Key Insights and Ideas

  • The "Visual Sink" Discovery: Similar to "attention sinks" in text-only LLMs, certain visual tokens aggregate global information but can become "black holes" for attention that don't actually help with grounding. Suppressing these improves focus.
  • RoPE is a Double-Edged Sword: While RoPE helps models handle long sequences, its relative distance bias inadvertently makes the model "lazy," favoring visual tokens near the end of the visual sequence simply because they are closer to the text.
  • Head Specialization: Hallucinations aren't a "whole model" problem; they are often driven by specific attention heads that are too obsessed with the system prompt or the previous word. By "muting" these specific heads, the model is forced to look back at the image.

Key Results

  • Accuracy Gains: On the POPE Adversarial benchmark, VisFlow improved LLaVA-1.5's F1 score from 73.54 to 84.35, outperforming other state-of-the-art methods like VCD and OPERA.
  • Reduced Hallucination Rate: On the CHAIR benchmark, VisFlow reduced the sentence-level hallucination rate ($CHAIR_s$) for LLaVA-1.5 from 20.0 to 15.0.
  • Efficiency: VisFlow maintains a high generation speed. While methods like VCD drop the throughput to ~18.8 Tokens Per Second (TPS), VisFlow stays at 28.6 TPS, nearly as fast as standard greedy decoding (33.6 TPS).
  • Qualitative Improvement: GPT-4.1 evaluations showed that VisFlow produces descriptions that are not only more accurate but also more detailed, effectively correcting object-count errors.

Limitations and Future Work

  • Compressed Visual Tokens: The authors noted that TAI is less effective on models like MiniGPT-4 or mPLUG-Owl2, which use a Q-former to heavily compress visual information. In these cases, the "salient" tokens are harder to distinguish.
  • Hyperparameter Sensitivity: The method relies on several hyperparameters (like the scaling factor $k$ and suppression coefficients $\alpha$). While the authors found robust defaults, these might need tuning for entirely new model architectures.
  • Future Direction: The authors suggest exploring more automated ways to identify critical heads and tokens dynamically, perhaps through reinforcement learning or more complex saliency metrics.

Summary updated

BibTeX
@inproceedings{tang2026not,
  author = {Lexiang Tang and Xianwei Zhuang and Bang Yang and Zhiyuan Hu and Hongxiang Li and Lu Ma and Jinghan Ru and Yuexian Zou},
  title = {{Not All Tokens and Heads Are Equally Important: Dual-Level Attention Intervention for Hallucination Mitigation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i11.37904},
}
Figure