Sources of Hallucination by Large Language Models on Inference Tasks

Nick McKenna, Tianyi Li, Liang Cheng, Mohammad Javad Hosseini, Mark Johnson, Mark Steedman

TL;DR

This paper demonstrates that Large Language Models (LLMs) often rely on statistical shortcuts and memorization rather than robust logical reasoning when performing Natural Language Inference (NLI). By isolating two specific pretraining biases—Attestation Bias (memorized facts) and Relative Frequency Bias (word frequency patterns)—the authors show that LLMs are prone to "hallucinating" entailment whenever a conclusion sounds familiar or uses common terminology, leading to catastrophic performance drops on adversarial tasks.

What Problem Does This Paper Address?

While LLMs like GPT-4 and LLaMA show impressive performance on standard benchmarks, they frequently "hallucinate"—providing incorrect information presented as fact. This is particularly problematic in Natural Language Inference (NLI), where a model must determine if a premise logically entails a hypothesis.

The authors investigate whether these errors are systematic. They hypothesize that LLMs aren't actually "reasoning" through the logic of a statement. Instead, they might be relying on two crutches developed during pretraining:

  1. Memorization: Recognizing a hypothesis because it appeared in the training data.
  2. Corpus Statistics: Predicting entailment based on how frequently certain words appear relative to others.

Understanding these biases is critical for deploying LLMs in high-stakes fields like legal or medical summarization, where "hallucinating" a logical connection that isn't there can have serious consequences.

Methods

The researchers conducted a series of "behavioral studies" across three major model families: LLaMA-65B, GPT-3.5 (text-davinci-003), and PaLM-540B. Their approach involved carefully modifying NLI datasets to isolate the influence of specific biases:

  • Measuring Attestation (Λ): They prompted models to determine if a hypothesis was "True," "False," or "Unknown" without providing a premise. This established the model's "prior knowledge."
  • The Random Premise Task ($I_{RandPrem}$): They replaced the original premise with a random, unrelated one. In a logically sound model, entailment should drop to zero. If the model still predicts "Entail," it is likely hallucinating based on its memory of the hypothesis.
  • Argument Transformations: They replaced named entities (e.g., "Google") with generic placeholders (e.g., "location X") or random entities to see if models use specific names as "indices" to trigger their memory.
  • Relative Frequency Analysis (Φ): Using Google N-grams as a proxy for training data, they checked if models were more likely to predict entailment when the premise predicate was rarer than the hypothesis predicate (a common statistical pattern in natural language).

Datasets

  • Levy/Holt: A targeted dataset focused on directional predicate entailment (e.g., does "A defeated B" entail "A played B"?).
  • RTE-1 (Recognizing Textual Entailment): A classic, more linguistically diverse NLI benchmark used to validate that their findings hold true for general language tasks.
  • NewsCrawl: Used to source random entities for the $I_{RandArg}$ transformations.

Key Insights and Ideas

  • Entities are Memory Keys: LLMs use named entities as "indices" to look up memorized facts. When you strip away specific names and use generic placeholders, the models' ability to "recall" entailment drops significantly. This suggests they aren't learning the logic of the relationship, but rather the fact associated with those specific names.
  • Pretraining is the Root Cause: These biases are present in base models (LLaMA, PaLM) and persist even after instruction tuning and RLHF (GPT-3.5). This indicates that the fundamental objective of predicting the next token in a massive corpus inherently bakes in these statistical shortcuts.
  • The Frequency Fallback: When a model can't rely on a memorized fact, it falls back on frequency. It is significantly more likely to affirm entailment if the premise contains "rarer" words than the hypothesis, regardless of the actual logical connection.
  • Superficial Performance: LLMs look like great reasoners on standard benchmarks because those benchmarks often contain samples that align with these biases. The models are essentially "cheating" using their memory.

Key Results

The quantitative impact of these biases is stark:

  • Hallucination Rates: Models were roughly 2x more likely to falsely predict entailment in the Random Premise task if they already "knew" the hypothesis was true (Attestation Bias). As seen in Figure 2, all three models showed a significant spike in false positives when the hypothesis was attested.
Figure 2: Exp-1. Estimated probability of predicting Entail for Random-Premise entries in Levy/Holt, conditioned on LLMs’ attestation of hypotheses (Λ). Now, predicting Entail is false positive hallucination (lower is better). Models are sensitive to attestation, and hallucinate more when the hypothesis is attested.
  • Recall Degradation: When original entities were replaced with frequent random ones, GPT-3.5's recall on Levy/Holt plummeted from 92.3% to 55.3%.
  • Adversarial Fragility: On subsets where the gold label contradicted the Attestation Bias (e.g., a true-sounding statement that is not logically entailed by the premise), performance collapsed. LLaMA’s normalized AUC dropped from 65.5% (consistent) to a dismal 8.1% (adversarial).

Limitations and Future Work

  • Proxy Measures: The authors used Google N-grams as a proxy for LLM training data frequency; actual training corpora are often proprietary and inaccessible.
  • Residual Performance: Even after controlling for these two biases, there is still some "unexplained" performance. It remains unclear if this is due to actual reasoning or other undiscovered biases.
  • Prompting Ineffectiveness: Preliminary tests showed that simply telling a model to "ignore the veracity of these statements" did not significantly reduce the bias, suggesting these behaviors are deeply ingrained.
  • Future Directions: The authors advocate for new evaluation protocols that explicitly control for these biases to ensure we are measuring actual reasoning, not just sophisticated pattern matching.

Summary updated

Abstract

Large Language Models (LLMs) are claimed to be capable of Natural Language Inference (NLI), necessary for applied tasks like question answering and summarization. We present a series of behavioral studies on several LLM families (LLaMA, GPT-3.5, and PaLM) which probe their behavior using controlled experiments. We establish two biases originating from pretraining which predict much of their behavior, and show that these are major sources of hallucination in generative LLMs. First, memorization at the level of sentences: we show that, regardless of the premise, models falsely label NLI test samples as entailing when the hypothesis is attested in training data, and that entities are used as ``indices'' to access the memorized data. Second, statistical patterns of usage learned at the level of corpora: we further show a similar effect when the premise predicate is less frequent than that of the hypothesis in the training data, a bias following from previous studies. We demonstrate that LLMs perform significantly worse on NLI test samples which do not conform to these biases than those which do, and we offer these as valuable controls for future LLM evaluation.
BibTeX
@inproceedings{mckenna2023sources,
  author = {Nick McKenna and Tianyi Li and Liang Cheng and Mohammad Javad Hosseini and Mark Johnson and Mark Steedman},
  title = {{Sources of Hallucination by Large Language Models on Inference Tasks}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=rJhk7Fpnvh},
}
Figure