Devils in Middle Layers of Large Vision-Language Models: Interpreting, Detecting and Mitigating Object Hallucinations via Attention Lens

Zhangqi Jiang, Junkai Chen, Beier Zhu, Tingjin Luo, Yankun Shen +1 more
2/9/2026

No official code found. Best implementation: ZhangqiJiang07/middle_layers_indicating_hallucinations (84 stars, last commit 2025-10-09).

Abstract

Hallucinations in Large Vision-Language Models (LVLMs) significantly undermine their reliability, motivating researchers to explore the causes of hallucination. However, most studies primarily focus on the language aspect rather than the visual. In this paper, we address how LVLMs process visual information and whether this process causes hallucination. Firstly, we use the attention lens to identify the stages at which LVLMs handle visual data, discovering that the middle layers are crucial. Moreover, we find that these layers can be further divided into two stages: "visual information enrichment" and "semantic refinement" which respectively propagate visual data to object tokens and interpret it through text. By analyzing attention patterns during the visual information enrichment stage, we find that real tokens consistently receive higher attention weights than hallucinated ones, serving as a strong indicator of hallucination. Further examination of multi-head attention maps reveals that hallucination tokens often result from heads interacting with inconsistent objects. Based on these insights, we propose a simple inference-time method that adjusts visual attention by integrating information across various heads. Extensive experiments demonstrate that this approach effectively mitigates hallucinations in mainstream LVLMs without additional training costs.1

View on arXivView PDF

Code Implementations(1)

[CVPR 2025] Devils in Middle Layers of Large Vision-Language Models: Interpreting, Detecting and Mitigating Object Hallucinations via Attention Lens

8412CSS, HTMLNov 4, 20241 years ago
hallucinationsmechanisms-of-actiontraining-freevision-language-model

Similar Papers

Cite this paper

@article{jiang2026devils,
  title  = {Devils in Middle Layers of Large Vision-Language Models: Interpreting, Detecting and Mitigating Object Hallucinations via Attention Lens},
  author = {Zhangqi Jiang and Junkai Chen and Beier Zhu and Tingjin Luo and Yankun Shen and Xu Yang},
  year   = {2026},
  eprint = {2411.16724},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2411.16724},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.16724.svg)](https://codeofpaper.com/paper/2411.16724)

Discussion