通过优化注意力掩码减少多模态模型幻觉,提升推理准确性。
Seeing Far and Clearly: Mitigating Hallucinations in MLLMs with Attention Causal Decoding
- 用因果掩码动态调控多模态标记间信息传播,抑制异常标记干扰。
- 在图像和视频任务上显著降低幻觉率,跨模型通用性强。
- 适合关注多模态生成质量与推理可信度的研究者使用。
近期多模态大模型在视觉问答任务中表现优异,但常出现幻觉问题。本文将幻觉分为初始幻觉和雪球式幻觉两类,认为可通过解码过程中的标记交互获取充分上下文。受因果推断启发,提出利用因果掩码建立多模态标记间的信息传播机制。核心假设是:若标记间交互不足,模型易依赖异常标记,忽略密集上下文线索。为此,提出FarSight——一种无需重训练的即插即用解码策略,仅通过优化因果掩码即可缓解异常标记的注意力干扰。方法创新在于在因果掩码的上三角矩阵中设计注意力寄存器,动态捕捉被异常标记分散的注意力;同时引入衰减掩码率的位置感知编码,使模型能关注更早的前序标记,尤其适用于视频序列任务。大量实验表明,FarSight在多个图像与视频基准测试中显著降低幻觉率,且适用于多种多模态大模型,验证了其有效性。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。