arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.09968cs.CVcs.AI
收藏

通过第二层看清:增强注意力头以缓解LVLMs中的幻觉

Seeing Clearly by Layer Two: Enhancing Attention Heads to Alleviate Hallucination in LVLMs

Shanghai Jiao Tong University(上海交通大学);Beijing Jiaotong University(北京交通大学);Alibaba Group(阿里巴巴集团)

Xiaofeng Zhang, Yihao Quan, Chaochen Gu, Chen Shen, Xiaosong Yuan, Shaotian Yan, Hao Cheng, Kaijie Wu, Jieping Ye

AI总结:

针对多模态大语言模型的幻觉问题,提出免训练方法EAH,通过将浅层视觉汇聚注意力头的注意力矩阵广播至其他头以增强图像注意力,有效缓解了幻觉现象。

摘要:

多模态大语言模型(MLLMs)中的幻觉问题仍然是一个常见问题。尽管图像token占据了MLLMs输入序列的大部分,但探索图像token与幻觉之间关系的研究仍然有限。在本文中,我们分析了模型每一层和每个头的图像token注意力得分分布,揭示了一个有趣且普遍的现象:大多数幻觉与图像token自注意力矩阵中的注意力汇聚模式密切相关,其中浅层表现出密集的注意力汇聚,深层则表现出稀疏的注意力汇聚。我们进一步分析了不同层的注意力头,发现在图像部分具有高密度注意力汇聚的头在缓解幻觉方面发挥着积极作用。在本文中,我们提出了一种名为Enhancing Attention Heads(EAH)的免训练方法,该方法旨在增强浅层中图像token注意力汇聚的收敛。EAH识别在浅层中表现出视觉汇聚的注意力头,并提取其注意力矩阵。然后将该注意力图广播到该层的其他头,从而增强该层对图像本身的注意力。通过大量实验,EAH在不同的MLLMs和指标上均表现出显著的幻觉缓解性能,证明了其有效性和通用性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑