PreprintCited by 17Topic ModelingNatural Language Processing TechniquesMultimodal Machine Learning Applications

Trusting Your Evidence: Hallucinate Less with Context-aware Decoding

Open access
Shi, Weijia, Han, Xiaochuang, Lewis, Mike, Tsvetkov, Yulia, Zettlemoyer, Luke, Yih, Scott Wen-tau·2023·arXiv

Abstract

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.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2305.14739

Cites

32 of 41 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • CAD exploits the difference in logits with and without context.

    “Similarly, CAD (Context-Aware Decoding) [231] exploits the difference in logits with and without context.”

    From Survey of Hallucination in Natural Language Generation (2023) · cites this paper as [231]

  • When prioritizing contextual information, context-aware decoding techniques can be employed to decrease dependence on parametric memory.

    “When prioritizing contextual information, context-aware decoding techniques can be employed to decrease dependence on parametric memory. This approach, detailed by Shi et al. [158], modifies the output probability distribution to accentuate differences when the model uses contextual information in generation versus when it does not.”

    From Human-inspired Perspectives: A Survey on AI Long-term Memory (2024) · cites this paper as [158]

  • Context-aware decoding modifies the output probability distribution to accentuate differences when the model uses contextual information in generation versus when it does not, encouraging the model to rely more heavily on provided context during inference, enhancing accuracy and relevance.

    “This adjustment encourages the model to rely more heavily on the provided context during inference, enhancing its accuracy and relevance.”

    From Human-inspired Perspectives: A Survey on AI Long-term Memory (2024) · cites this paper as [158]

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

5 of the 46 references couldn’t be matched to a known paper.

Research works printed but not linked: 1

  1. Chin-Yew Lin. 2004. ROUGE: A package for auto- matic evaluation of summaries. In Text Summariza- tion Branches Out, pages 74-81, Barcelona, Spain. Association for Computational Linguistics.

Cited by

Sorted by citations

Authors
Shi, W., Han, X., Lewis, M., Tsvetkov, Y., Zettlemoyer, L., & Yih, S. W.-T.
Affiliations
  • University of Washington (US)
  • Meta (United States) (US)
Venue
arXiv
Publisher
arXiv
Published
2023
ISSN
2331-8422 (ISSN-L)
OpenAlex
W4378473839
Cited by
6
References
46
Citations by year
2026: 1 · 2025: 3 · 2024: 1 · 2023: 1
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion, cc-by)
  • arXiv (Cornell University) (cc-by)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Multimodal Machine Learning Applications
Keywords
hallucination mitigation, factuality, summarization, large language models

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review