ChatPaper.aiChatPaper

DeCoRe:通过对比检索头解码以减轻幻觉

DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations

October 24, 2024
作者: Aryo Pradipta Gema, Chen Jin, Ahmed Abdulaal, Tom Diethe, Philip Teare, Beatrice Alex, Pasquale Minervini, Amrutha Saseendran
cs.AI

摘要

大型语言模型(LLMs)经常会产生幻觉,通过错误表达提供的上下文或错误回忆内部知识而产生不忠实或事实不准确的输出。最近的研究已经确定了Transformer架构中的特定注意力头,称为检索头,负责提取相关的上下文信息。我们假设屏蔽这些检索头可能会诱发幻觉,并且对比基础LLM和屏蔽LLM的输出可以减少幻觉。为此,我们提出了一种名为对比检索头解码(DeCoRe)的新型无需训练的解码策略,该策略可以放大上下文和模型参数中找到的信息。DeCoRe通过动态对比基础LLM和屏蔽LLM的输出,使用条件熵作为指导,从而减轻潜在的幻觉响应。我们的广泛实验证实,DeCoRe显著提高了在需要高上下文忠实度的任务上的性能,例如摘要(XSum提高了18.6%)、遵循说明(MemoTrap提高了10.9%)以及开放式问答(NQ-Open提高了2.4%,NQ-Swap提高了5.5%)。
English
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%).

Summary

AI-Generated Summary

PDF113November 16, 2024