Trusting Your Evidence: Hallucinate Less with Context-aware Decoding
By Weijia Shi, Xiaochuang Han, Michael Lewis, Yulia Tsvetkov, Luke S. Zettlemoyer, Scott Yih. North American Chapter of the Association for Computational Linguistics, 2023
387 citations recorded by the source corpus.
Language models (LMs) often struggle to pay enough attention to the input context, and generate texts that are unfaithful or contain hallucinations. To mitigate this issue, we present context-aware decoding (CAD), which follows a contrastive output distribution that amplifies the difference between the output probabilities when a model is used with and without context. Our experiments show that CAD, without additional training, significantly improves the faithfulness of different LM families, including OPT, GPT, LLaMA, and FLAN-T5 for summarization tasks (e.g., 14.3% gain for LLaMA in factuality metrics). Furthermore, CAD is particularly effective in overriding a model’s prior knowledge when it contradicts the provided context, leading to substantial improvements in tasks where resolving the knowledge conflict is essential. Our code is publicly released at https://github.com/xhan77/context-aware-decoding.
Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition
View Paper: https://www.semanticscholar.org/paper/984d4a1d41bfc8184fb77b8aa0eb8e96d536d048
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Yung-Sung Chuang
- Pengcheng He
- Ziwei Xu
- Yoon Kim
- James R. Glass
- Mohan Kankanhalli
- Hongyin Luo
- Sicong Leng
In Computer Vision and Pattern Recognition
- James R. Glass
- Mohan Kankanhalli
- Hongyin Luo
- Sicong Leng
- Li Bing
- Shijian Lu
- Chunyan Miao
- Guanzheng Chen
Citations in the corpus
- Siren's Song in the AI Ocean: A Survey on Hallucination in Large Language Models (2023, neutral): “Such knowledge is also referred to as context knowledge (Shi et al., 2023b).”
- A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questions (2023, neutral): “Shi et al. (2023b) propose context-aware decoding (CAD), which modifies the output distribution by reducing reliance on prior knowledge, thereby promoting the model’s focus on the contextual information, similar to that presented by (van der Poel et al., 2022).”
- Knowledge Conflicts for LLMs: A Survey (2024, positive): “Decoding techniques like Context-aware Decoding (Shi et al., 2023a) amplify the difference in output probabilities with and without context, prioritizing relevant context over prior knowledge.”
- Hallucination is Inevitable: An Innate Limitation of Large Language Models (2024, background): “During inference, hallucination can also be caused by sampling randomness [1, 14], insufficient context attention [55], and softmax bottleneck [9, 73].”
- DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models (2023, methodology): “Table 1 shows DoLa outperforms baselines by 2-4%, and is more effective than CD, except for 13B on Wiki.”
- Mitigating Object Hallucinations in Large Vision-Language Models through Visual Contrastive Decoding (2023, background): “In the realm of text generation, several studies have also exploited contrastive decoding for more faithful generation [37, 41, 52, 56].”