MHSA: A Lightweight Framework for Mitigating Hallucinations via Steered Attention in LVLMs

Wei Ding, Yilin Li, Yudong Zhang, Ruobing Xie, Xingwu Sun, Jiansheng Chen, Yu WangarXiv 2026

TL;DR

MHSA (Mitigating Hallucinations via Steered Attention) is a lightweight, inference-time framework that reduces hallucinations in Large Vision-Language Models (LVLMs) by dynamically steering their cross-modal attention patterns. By training a tiny, three-layer MLP generator to apply sample-adaptive attention corrections, it effectively fixes visual misgrounding without altering a single parameter of the underlying base model.

What Problem Does This Paper Address?

Large Vision-Language Models (LVLMs) are incredibly capable, but they suffer from a persistent flaw: hallucinations. They frequently generate text that describes objects, attributes, or relationships completely absent from the input image.

Existing fixes fall into two camps, both with major drawbacks:

  1. Training-based methods (like RLHF or instruction tuning) require massive computational resources and pristine, annotated datasets.
  2. Inference-time methods alter the model's decoding path on the fly. However, they typically rely on rigid, hand-crafted heuristic rules (e.g., static attention penalties) that fail to adapt to the unique "hallucination signature" of individual images and prompts.

Prior work established that an LVLM's cross-modal attention maps—how text tokens look back at visual tokens—contain distinct signatures when a model is hallucinating. While tools like DHCP could detect these signatures, they couldn't fix them. MHSA bridges this gap, turning attention-based detection into an active, data-driven mitigation strategy.

Methods

MHSA introduces a two-stage "detect-then-correct" pipeline that operates entirely during inference, requiring zero modifications to the base LVLM's weights.

Figure 2: The MHSA method pipeline. Discriminator 𝐷is responsible for detecting hallucinations, while Generator 𝐺is re- sponsible for correcting cross-modal attention, forming a two-stage “hallucination detection–mitigation” framework.

As shown in the pipeline above, the framework consists of two primary components:

  • Discriminator ($D$): A pre-trained, frozen hallucination detector (based on DHCP) that monitors the cross-modal attention tensor ($A$) to determine if the model is hallucinating.
  • Generator ($G$): A lightweight, three-layer Multi-Layer Perceptron (MLP). If the discriminator flags a hallucination, the generator takes the original attention map and predicts a residual correction term ($\Delta A$). The corrected attention map becomes $A' = A + \Delta A$, which replaces the original attention map in the LVLM's forward pass.

To train the generator, the authors use a three-part objective function:

  1. Detector-Guided Loss ($\mathcal{L}_{dg}$): An adversarial loss that forces the generator to steer the attention map toward patterns the discriminator classifies as "non-hallucinatory."
  2. Regularization Loss ($\mathcal{L}_{reg}$): A constraint that keeps $\Delta A$ minimal, ensuring the generator doesn't completely disrupt the model's baseline capabilities.
  3. LVLM Output Quality Loss ($\mathcal{L}_{LVLM}$): A cross-entropy loss based on ground-truth text targets to ensure the corrected attention actually yields accurate text.

While originally designed for discriminative tasks (like Yes/No questions), the authors successfully extended MHSA to token-level correction for autoregressive generative tasks (like image captioning) by evaluating and adjusting attention maps at each individual noun token generation step.

Datasets

The authors evaluated MHSA across several diverse vision-language benchmarks:

  • Discriminative Tasks (POPE Framework): Evaluated using MSCOCO, Objects365, OpenImagesV7, and ImageNet. POPE splits questions into three difficulty tiers (Random, Popular, and Adversarial) to rigorously test object-co-occurrence biases.
  • Generative Tasks (Captioning): Evaluated on MSCOCO and Flickr30k, using the CHAIR metric to quantify sentence-level and instance-level object hallucinations in free-form text.

Key Insights and Ideas

  • Attention Corrections are Sparse and Localized: Statistical analysis revealed that the generator doesn't apply broad, sweeping changes. Instead, it applies highly targeted, sparse corrections concentrated within a few intermediate layers and specific attention heads. Post-correction attention maps show lower entropy, meaning the model's focus becomes more spatially concentrated on the actual task-relevant visual regions.
  • Exceptional Out-of-Distribution (OOD) Generalization: One of the most surprising findings was that an MHSA module trained on one dataset (e.g., Objects365) often outperformed in-domain training when tested on another dataset (e.g., MSCOCO). This strongly implies that the generator learns fundamental, model-specific attention alignment principles rather than just memorizing dataset-specific artifacts.
  • Compute Efficiency via Conditional Triggering: Because the framework only activates the generator when the discriminator detects a hallucination, it avoids wasting compute on correct tokens.

Key Results

  • Discriminative Performance: On the POPE-COCO benchmark using Qwen2.5-VL-7B, MHSA boosted the absolute F1-score by +7.42 points (from 85.55 to 92.97), largely driven by a massive +15.78 point surge in Recall. It consistently improved F1 scores across InternVL2-8B and LLaVA-v1.5-7B as well.
  • Generative Captioning: On Flickr30k, the token-level MHSA extension slashed both sentence-level and instance-level hallucinations (CHAIR metrics) by 44%, with only a negligible 3.9% drop in text recall.
  • Low Latency Overhead: Because hallucinations are relatively rare in standard evaluation settings, the generator is seldom triggered. On POPE-COCO, MHSA only needed to correct 12.3% of samples, resulting in an amortized mean latency increase of just 0.43× compared to the baseline. This is significantly faster than contrastive decoding methods, which require a fixed 1.0× latency penalty due to mandatory dual forward passes for every sample.

Limitations and Future Work

While highly effective, the authors note a few areas for improvement. Currently, the generator is a simple MLP architecture; exploring more expressive architectures (like lightweight transformers) could yield even better steering capabilities. Additionally, future work will focus on scaling MHSA to even larger foundation models and exploring how it can be combined synergistically with complementary decoding-time mitigation strategies.

Summary updated

BibTeX
@misc{ding2026mhsa,
  author = {Wei Ding and Yilin Li and Yudong Zhang and Ruobing Xie and Xingwu Sun and Jiansheng Chen and Yu Wang},
  title = {{MHSA: A Lightweight Framework for Mitigating Hallucinations via Steered Attention in LVLMs}},
  year = {2026},
  eprint = {2605.14966},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.14966},
}
Figure