让视觉语言模型只在必要时看图像,减少幻觉。
See Only When Needed: Context-Aware Attention Intervention for Mitigating Hallucinations in LVLMs

- 根据语义相关性动态选择关注区域和干预时机
- 在不确定时调整注意力,幻觉率降低23.7%以上
- 无需训练,适合所有主流视觉语言模型
大型视觉语言模型(LVLMs)在多模态任务中表现优异,但仍易产生物体幻觉。以往无训练修复方法通常统一增强视觉信号,可能放大无关区域并引入虚假证据,损害语言流畅性。本文提出上下文感知注意力干预(CAI),一种无训练的推理阶段机制,通过双轴选择性实现‘仅在必要时观看’原则:决定看哪里、何时干预。每步解码时,CAI从浅层表示中提取令牌级视觉相关性以定位语义对齐区域,并仅在深层中对不确定性激增的令牌施加保守的熵与深度门控注意力倾斜,保持自信令牌和无关区域不变。该精准干预强化了视觉根基,同时保留语言流畅性,在无需对比解码的情况下仍能持续提升效果,对比解码可作为可选辅助抑制模块。跨多个LVLM主干和基准的大量实验表明,CAI实现了最先进的幻觉缓解性能;分析揭示其为KL最小化的注意力重加权,在门控关闭或倾斜较小时干扰有界。代码已开源:https://github.com/Iris1946/CAI。
原文摘要 · Abstract (English)
Large Vision-Language Models (LVLMs) excel at multimodal tasks but remain prone to object hallucinations. Prior training-free remedies often uniformly strengthen visual signals, which may also amplify irrelevant regions and introduce spurious evidence, harming fluency. We propose Context-aware Attention Intervention (CAI), a training-free inference-time mechanism that enforces a see only when needed principle via two-axis selectivity: where to look and when to intervene. At each decoding step, CAI derives token-specific visual relevance from early-layer representations to localize semantically aligned regions, and applies a conservative, entropy- and depth-gated attention tilt only for uncertainty-spiking tokens in deeper layers where visual grounding degrades, leaving confident tokens and irrelevant regions largely unchanged. This targeted intervention strengthens visual grounding while preserving linguistic fluency, and it yields consistent improvements even without contrastive decoding, which remains optional as an auxiliary bias-suppression module. Extensive experiments across multiple LVLM backbones and benchmarks show that CAI achieves state-of-the-art hallucination mitigation, and our analysis characterizes CAI as a KL-minimal attention reweighting with bounded interference under inactive gates or small tilts. Code is available at https://github.com/Iris1946/CAI.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。