Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations

About

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%).

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

Related benchmarks

TaskDatasetResultRank
Multiple-ChoiceTruthfulQA
MC1 Accuracy51.77
83
Instruction FollowingIFEval--
49
Open-ended generationTruthfulQA With All Samples open-ended (full)
Truthfulness71.25
39
Open-ended generationTruthfulQA Without Rejected Samples open-ended (full)
Truthfulness55.34
39
News Headline GenerationLaMP News
RG117.68
36
Knowledge-conflict Question AnsweringPopQA CF-RAG
CF81.08
36
Knowledge-conflict Question AnsweringTriviaQA CF-RAG
Conflict Factor (CF)79.51
36
Knowledge-conflict Question AnsweringNQ-Swap
CF Score79.12
36
Tweet Paraphrasing/GenerationLaMP Tweet
ROUGE-134.7
36
Multiple-choice Question AnsweringTruthfulQA Multiple-choice
MC1 Score51.29
34
Showing 10 of 23 rows

Other info

Follow for update