Source-linked AI summary

Seeing Far and Clearly: Mitigating Hallucinations in MLLMs with Attention Causal Decoding

Feilong Tang, Chengzhi Liu, Zhongxing Xu, Ming Hu, Zelin Peng, Zhiwei Yang, Jionglong Su, Minquan Lin, Yifan Peng, Xuelian Cheng, Imran Razzak, Zongyuan Ge

arXiv:2505.16652v2cs.CVcs.LG

TL;DR

MLLMs frequently hallucinate visual content, including initial errors and snowball errors that build on earlier mistakes, while prior methods leave multimodal token interaction insufficiently analyzed. FarSight intervenes in causal-mask token propagation using attention registers and a diminishing masking rate, and experiments report hallucination-mitigation gains across image and video benchmarks. The method is training-free, but its attention-register design is constrained by preserving the original attention distribution and relative positional encoding.

  • Problem

    MLLMs often generate responses that contradict visual content, while prior approaches have not adequately analyzed multimodal token interactions and snowball hallucinations.

  • Method

    FarSight is a plug-and-play decoding strategy that optimizes causal-mask token propagation with attention registers and a progressively diminishing masking rate.

  • Results

    FarSight outperforms existing state-of-the-art methods across image and video tasks, with reported gains including +2% average Comprehensive and General VQA improvement and +6.4% CHAIRS improvement on LLaVA-1.5.

  • Takeaways & Limitations

    Optimizing causal-mask propagation offers an effective training-free strategy for mitigating hallucinations across different MLLMs and both image and video benchmarks.

  • Takeaways & Limitations

    The attention-register design must avoid interfering with the original attention distribution and remain aligned with relative positional encoding during inference.

Abstract

from arXiv · show

Recent advancements in multimodal large language models (MLLMs) have significantly improved performance in visual question answering. However, they often suffer from hallucinations. In this work, hallucinations are categorized into two main types: initial hallucinations and snowball hallucinations. We argue that adequate contextual information can be extracted directly from the token interaction process. Inspired by causal inference in the decoding strategy, we propose to leverage causal masks to establish information propagation between multimodal tokens. The hypothesis is that insufficient interaction between those tokens may lead the model to rely on outlier tokens, overlooking dense and rich contextual cues. Therefore, we propose to intervene in the propagation process by tackling outlier tokens to enhance in-context inference. With this goal, we present FarSight, a versatile plug-and-play decoding strategy to reduce attention interference from outlier tokens merely by optimizing the causal mask. The heart of our method is effective token propagation. We design an attention register structure within the upper triangular matrix of the causal mask, dynamically allocating attention to capture attention diverted to outlier tokens. Moreover, a positional awareness encoding method with a diminishing masking rate is proposed, allowing the model to attend to further preceding tokens, especially for video sequence tasks. With extensive experiments, FarSight demonstrates significant hallucination-mitigating performance across different MLLMs on both image and video benchmarks, proving its effectiveness.

1. Introduction

MLLM hallucinations include initial errors caused by insufficient information and snowball errors that extend prior mistakes. FarSight addresses attention collapse and positional information decay by optimizing causal-mask token propagation with attention registers and diminishing masking, improving hallucination mitigation across image and video benchmarks.

  • Hallucination Phenomena: MLLM hallucinations comprise initial errors from insufficient information and snowball errors that preserve consistency with previous hallucinations.Snowball hallucinations can add explanatory errors after an initial nonexistent object is asserted.
  • Research Gap: Prior methods use retrieval, instruction fine-tuning, or training-free decoding, but often add cost or lack analysis of multimodal token interactions.Existing approaches had also not effectively reduced snowball hallucinations, particularly in video captioning.
  • Causes of Hallucinations: Attention collapse assigns disproportionate attention to low-information outlier tokens, disrupting propagation among relevant multimodal tokens.Examples include visual backgrounds and textual symbols.
  • Causes of Hallucinations: Positional information decay progressively reduces attention to visual information as text generation advances, contributing to hallucinations.The paper links this issue to insufficient vision-to-text transmission during contextual interactions.
  • FarSight: FarSight optimizes the causal mask with attention registers that capture diverted attention while preserving causal decoding.A dynamic register-attention mechanism optimizes allocation at each decoding step for in-context inference.
  • FarSight: FarSight adds a progressively diminishing masking rate so models attend to more distant preceding tokens, especially in video sequences.The method is presented as a plug-and-play decoding strategy requiring causal-mask adjustment.

2. Related Work

Related work characterizes multimodal hallucinations as text misaligned with visual content and distinguishes initial hallucinations from snowball hallucinations. The paper focuses its experiments and analyses on image and video benchmarks, including training-free mitigation without additional training, data, or inference time.

  • Hallucinations in MLLMs: Multimodal hallucination is text misaligned with the content of provided images and may reflect model priors, limited comprehension, or ineffective contextualization.The paper distinguishes these causes from the two hallucination types it studies.
  • Hallucinations in MLLMs: Initial hallucinations arise from missing necessary information, whereas snowball hallucinations maintain consistency with earlier hallucinations even when required knowledge is available.The paper primarily evaluates these phenomena on image and video benchmarks.
  • Hallucination Mitigation: The related-work discussion includes hallucination mitigation without additional training, data, or inference time.This scope is stated for the training-free mitigation setting.

3. Preliminary and Motivation

MLLMs generate responses autoregressively from concatenated vision and text tokens, using causal attention to restrict each position to preceding or current tokens. The section identifies attention collapse and positional information decay as mechanisms that can hinder multimodal information propagation and contribute to hallucinations.

  • 3.1. Paradigm of MLLMs Generation: MLLM inputs concatenate vision tokens from an encoded image with tokenized text before autoregressive response generation.Vision tokens are denoted x_v and text tokens x_t, with total sequence length T = N + M.
  • 3.1. Paradigm of MLLMs Generation: Causal attention computes outputs from Q, K, and V while masking future tokens, so each position attends only to preceding or current tokens.The attention weights have nonzero entries through the current position and zeros afterward.
  • 3.2. What Causes Hallucinations: Attention collapse occurs when irrelevant tokens receive disproportionate attention relative to their informational contribution, diffusing focus and hindering semantic-token interaction.Examples include punctuation and background vision tokens; the section links this diffusion to increased perplexity during length extrapolation.
  • 3.2. What Causes Hallucinations: RoPE encodes relative token distance through query-key rotations, but long-term decay can limit multimodal information propagation and contribute to hallucination.The section contrasts this relative-position dependence with maintaining absolute positional focus in generated text.
  • 3.2. What Causes Hallucinations: FarSight’s figure replaces the traditional causal mask around softmax with upper-triangular register attention, then clears residual future-position probabilities to preserve causal decoding.The register matrix P has linear decay above the diagonal and zeros below it.

4. Methodology

FarSight modifies causal-mask attention to absorb outlier-token attention and strengthen multimodal token propagation. Its progressively diminishing masking encodes positional awareness while preserving causal decoding.

  • 4.1. Upper Triangular Metric as Attention Registers: FarSight introduces attention registers in the causal mask to absorb attention diverted to low-information outlier tokens.The registers dynamically guide attention toward contextually rich semantic information.
  • 4.1. Upper Triangular Metric as Attention Registers: The upper-triangular register matrix allocates n−i scores per row while preserving zero values through position i.The construction provides dedicated slots for surplus attention values.
  • 4.1. Upper Triangular Metric as Attention Registers: FarSight combines the register matrix with a lower-triangular causal mask so future-token information remains inaccessible during decoding.Causal masking allows attention only to preceding or current tokens.
  • 4.1. Upper Triangular Metric as Attention Registers: The register scores follow a decay rate σ, aligning their gradual attenuation with the model’s relative positional encoding.The method is designed for training-free inference without interfering with the original attention distribution.
  • 4.2. Positional Awareness Encoding: A progressively diminishing masking rate lets attention distributions vary across positions, incorporating absolute positional information and extending attention to distant preceding tokens.Later positions aggregate increasingly more historical context, reinforcing long-range dependencies.
  • Implementation: Algorithm 1 implements register-score construction, FarSight attention, causal-mask adjustment, softmax normalization, and final value projection.The implementation adds register and decay scores before restoring causal masking and projecting the attended values.

5. Experiments

FarSight is evaluated across image and video MLLMs using hallucination, question-answering, and generation-quality benchmarks. It improves image and video performance, with gains reported across multiple models and datasets.

  • 5.1. Experimental Setup: The evaluation covers six representative MLLMs across image and video tasks, including models specialized for either modality and models supporting both.The models are InstructBLIP, LLaVA-1.5, VILA, Video-LLaMA2, Chat-UniVi, and Video-LLaVA.
  • 5.2. Ablation Study: +6.4% and +5.4% CHAIRS improvements are achieved by FarSight for LLaVA-1.5 and Video-LLaVA, respectively, under the attention-register study.Causal masking with -∞ reduces accuracy, while zeropadding fails to absorb excess attention effectively.
  • 5.2. Ablation Study: Sequence length 256 produces peak accuracy on both POPE-R and MSRVTT-QA before performance declines at longer lengths.The study examines sequence length through its effect on attention decay and model performance.
  • 5.2. Ablation Study: A decay rate of 0.8 yields optimal attention focus, whereas increasing it to 0.9 causes attention to disperse.The result supports using a moderate decay rate for balanced attention.
  • 5.3. Comparison to State-of-the-Arts: FarSight consistently preserves generated-text quality across perplexity, grammar, fluency, and naturalness evaluations on 600 randomly selected MSCOCO images.PPL1 and PPL2 use GPT-3.5 Turbo, while grammar, fluency, and naturalness are rated by GPT-4o.
  • 5.3. Comparison to State-of-the-Arts: +2% average improvement is reported for LLaVA-1.5 on Comprehensive and General VQA, alongside +6.4% CHAIRS and +3.3% POPE-P gains.FarSight is compared with ICD, VCD, and OPERA and also improves hallucination metrics for other models.
  • 5.3. Comparison to State-of-the-Arts: +3% average accuracy is achieved across multiple models on MSRVTT-QA, reaching 68.9% peak accuracy.FarSight also improves MSVD-QA by +2% and ActivityNet-QA by +0.7%.

6. Conclusion

The paper identifies attention collapse and positional information decay as two causes of MLLM hallucinations and proposes FarSight to mitigate them through optimized causal-mask token propagation.

  • 6. Conclusion: FarSight reduces outlier-token interference using attention registers and a diminishing masking rate within an optimized causal mask.The registers support effective token propagation while preserving causal decoding properties.
  • 6. Conclusion: Extensive image and video experiments show that FarSight outperforms existing state-of-the-art methods.An ablation study also supports the effectiveness of FarSight.

A. Implementation details for Figure 2

The snowball-hallucination analysis uses 500 CHAIR samples and GPT-4o to identify where generated descriptions first diverge from image-grounded prompts.

  • A. Implementation details for Figure 2: 500 randomly selected CHAIR samples are analyzed for snowball hallucinations.The analysis compares ground-truth image descriptions with MLLM-generated text.
  • A. Implementation details for Figure 2: GPT-4o evaluates generated descriptions sentence by sentence against the original prompts and records the first hallucination’s position and content.The procedure is designed to locate the first occurrence in each generated response.

A.1. Image Heatmap Visualization

Image and video visualizations show that FarSight focuses more accurately on task-relevant visual features than baseline methods, supporting its adaptability across both modalities.

  • A.1. Image Heatmap Visualization: FarSight achieves higher attention accuracy for image-related queries than baseline methods.The improvement is attributed to dynamic attention registers prioritizing key visual regions and reducing irrelevant-token interference.
  • A.1. Image Heatmap Visualization: The dynamic attention register mechanism also adapts to video MLLMs, indicating applicability beyond image models.The passage reports this behavior across image and video tasks.

A.2. Video Heatmap Visualization

Video heatmaps show FarSight maintaining focused attention on relevant people, objects, and actions as sequences progress, whereas Video-LLaVA becomes more dispersed over time. Example outputs further illustrate differences between FarSight and baseline descriptions.

  • A.2. Video Heatmap Visualization: FarSight consistently concentrates on key human actions and visual details across video frames, while Video-LLaVA’s attention becomes increasingly dispersed over time.In the chopping-wood example, Video-LLaVA shifts toward surrounding environmental elements in the final three frames, whereas FarSight remains focused on the chopping action.
  • A.2. Video Heatmap Visualization: Progressive positional encoding maintains attention to early visual tokens by dynamically adjusting positional weights across the temporal span.This addresses the decline in attention to earlier frames during sequence generation.
  • A.2. Video Heatmap Visualization: FarSight focuses on the queried boy, his key features, and the man’s interacting body parts more consistently than Video-LLaVA.The qualitative examples contrast FarSight’s concentrated attention with Video-LLaVA’s scattered focus on backgrounds or non-essential objects.
  • A.2. Video Heatmap Visualization: FarSight preserves temporal coherence for the man’s discus-throwing sequence, capturing the complete sequence of events.Video-LLaVA is described as lacking sufficient temporal coherence.
  • A.2. Video Heatmap Visualization: FarSight and baseline outputs differ in descriptions of horses, aircraft, rooms, food, and objects beside a sofa.The examples include both image inputs and generated descriptions from FarSight and baseline systems.
Loading 2505.16652v2…