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

DeCoRe:通过对比检索头进行解码以缓解幻觉

DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations

University of Edinburgh(爱丁堡大学);Centre for AI, Data Science & Artificial Intelligence, R&D, AstraZeneca(阿斯利康研发中心人工智能、数据科学与人工智能中心);University College London(伦敦大学学院)

Aryo Pradipta Gema, Chen Jin, Ahmed Abdulaal, Tom Diethe, Philip Teare, Beatrice Alex, Pasquale Minervini, Amrutha Saseendran

AI总结:

本文提出免训练解码方法 DeCoRe,通过条件熵引导动态对比基础 LLM 与遮蔽检索头后的 LLM 输出,以增强上下文与参数信息并显著缓解幻觉。

摘要:

大型语言模型(LLM)经常产生幻觉,即通过错误表达所提供的上下文或不正确地回忆内部知识,生成不忠实或事实错误的输出。近期研究已经识别出 Transformer 架构中被称为检索头(retrieval heads)的特定注意力头,它们负责提取相关的上下文信息。我们假设,遮蔽这些检索头会诱发幻觉,而对比基础 LLM 与被遮蔽 LLM 的输出可以减少幻觉。为此,我们提出 Decoding by Contrasting Retrieval Heads(DeCoRe,通过对比检索头进行解码),这是一种新颖的免训练解码策略,可放大在上下文和模型参数中发现的信息。DeCoRe 以条件熵为引导,通过动态对比基础 LLM 与被遮蔽 LLM 的输出,缓解可能产生幻觉的回答。我们的大量实验证实,DeCoRe 在要求高度上下文忠实性的任务上显著提升了性能,例如摘要(XSum 提升 18.6%)、指令遵循(MemoTrap 提升 10.9%)以及开卷问答(NQ-Open 提升 2.4%,NQ-Swap 提升 5.5%)。

英文摘要:

Large Language Models (LLMs) often hallucinate, producing unfaithful or factually incorrect outputs by misrepresenting the provided context or incorrectly recalling internal knowledge. Recent studies have identified specific attention heads within the Transformer architecture, known as retrieval heads, responsible for extracting relevant contextual information. We hypothesise that masking these retrieval heads can induce hallucinations and that contrasting the outputs of the base LLM and the masked LLM can reduce hallucinations. To this end, we propose Decoding by Contrasting Retrieval Heads (DeCoRe), a novel training-free decoding strategy that amplifies information found in the context and model parameters. DeCoRe mitigates potentially hallucinated responses by dynamically contrasting the outputs of the base LLM and the masked LLM, using conditional entropy as a guide. Our extensive experiments confirm that DeCoRe significantly improves performance on tasks requiring high contextual faithfulness, such as summarisation (XSum by 18.6%), instruction following (MemoTrap by 10.9%), and open-book question answering (NQ-Open by 2.4% and NQ-Swap by 5.5%).

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

↑