Why Language Models Invent Facts
A survey of research lists several reasons why text-generation systems produce statements that their source does not support.
2 min read · Level 3 · Vidyaa Editorial
In 2023, Ji and colleagues published a survey of hallucination in natural language generation in ACM Computing Surveys.[1] They explain that researchers use the term hallucination for generated text that is nonsensical. They also use it for text that is unfaithful to the source input.[1]
The survey separates two kinds. An intrinsic hallucination contradicts the source. In their example, a summary says that the first Ebola vaccine was approved in 2021.[1] The source says that the FDA approved it in 2019.[1] An extrinsic hallucination cannot be verified from the source. It is not always wrong, but most of the literature treats it with caution.[1]
The causes come from several places. Some datasets pair a source with a target that contains extra information.[1] The model can then learn to produce text that is not grounded.[1] During training and inference, a decoder can attend to the wrong part of the input and mix up facts about similar entities.[1] Sampling methods that add randomness are correlated with more hallucination.[1] Pre-trained models can also favour knowledge stored in their parameters over the input they receive.[1]
The survey warns about safety, for example when a summary of a patient form is wrong.[1] It lists causes from earlier studies and does not give a rate of error for any system.[1]