通过强化浅层注意力聚焦图像,减少多模态大模型幻觉。
Seeing Clearly by Layer Two: Enhancing Attention Heads to Alleviate Hallucination in LVLMs
- 识别浅层注意力中图像聚焦模式,增强其对齐
- 在多个模型和指标上降低幻觉率,效果显著
- 无需训练,适合快速部署到现有模型
多模态大语言模型(MLLMs)的幻觉问题仍普遍存在。尽管图像标记占输入序列多数,但关于图像标记与幻觉关系的研究仍有限。本文分析了各层和注意力头中图像标记的注意力分数分布,发现一个普遍现象:大多数幻觉与图像标记自注意力矩阵中的注意力汇聚模式密切相关——浅层呈现密集汇聚,深层则呈稀疏汇聚。进一步分析表明,浅层具有高密度注意力汇聚的注意力头有助于缓解幻觉。为此,本文提出无需训练的方法EAH(Enhancing Attention Heads),通过识别浅层具有视觉汇聚特性的注意力头并提取其注意力矩阵,广播至同层其他头,强化该层对图像内容的关注。大量实验表明,EAH在不同MLLMs和评估指标下均显著降低幻觉,验证了其有效性和通用性。
原文摘要 · Abstract (English)
The hallucination problem in multimodal large language models (MLLMs) remains a common issue. Although image tokens occupy a majority of the input sequence of MLLMs, there is limited research to explore the relationship between image tokens and hallucinations. In this paper, we analyze the distribution of attention scores for image tokens across each layer and head of the model, revealing an intriguing and common phenomenon: most hallucinations are closely linked to the pattern of attention sinks in the self-attention matrix of image tokens, where shallow layers exhibit dense attention sinks and deeper layers show sparse attention sinks. We further analyze the attention heads of different layers and find that heads with high-density attention sink in the image part play a positive role in alleviating hallucinations. In this paper, we propose a training-free method named \textcolor{red}{\textbf{E}}nhancing \textcolor{red}{\textbf{A}}ttention \textcolor{red}{\textbf{H}}eads (EAH), an approach designed to enhance the convergence of image tokens attention sinks in the shallow layers. EAH identifies the attention head that shows the vision sink in a shallow layer and extracts its attention matrix. This attention map is then broadcast to other heads in the layer, thereby strengthening the layer to pay more attention to the image itself. With extensive experiments, EAH shows significant hallucination-mitigating performance on different MLLMs and metrics, proving its effectiveness and generality.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。