DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations
Fuente:
arXiv
Gespeichert in:
| Hauptverfasser: | , , , , , , , |
|---|---|
| Format: | Preprint |
| Veröffentlicht: |
2024
|
| Schlagworte: | |
| Online-Zugang: | |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| _version_ | 1866910664994324480 |
|---|---|
| author | Gema, Aryo Pradipta Jin, Chen Abdulaal, Ahmed Diethe, Tom Teare, Philip Alex, Beatrice Minervini, Pasquale Saseendran, Amrutha |
| author_facet | Gema, Aryo Pradipta Jin, Chen Abdulaal, Ahmed Diethe, Tom Teare, Philip Alex, Beatrice Minervini, Pasquale Saseendran, Amrutha |
| contents | 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%). |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2410_18860 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations Gema, Aryo Pradipta Jin, Chen Abdulaal, Ahmed Diethe, Tom Teare, Philip Alex, Beatrice Minervini, Pasquale Saseendran, Amrutha Computation and Language Artificial Intelligence 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%). |
| title | DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations |
| topic | Computation and Language Artificial Intelligence |
| url | https://arxiv.org/abs/2410.18860 |