Introduction
In the rapidly evolving field of artificial intelligence, "hallucination"—the generation of plausible but factually incorrect information—is often viewed as a transient technical hurdle. The prevailing sentiment suggests that with more high-quality data, larger parameter counts, or refined prompting techniques, these errors can be eliminated. However, recent research challenges this optimistic view by providing a formal mathematical proof that hallucination is an inescapable, structural limitation of Large Language Models (LLMs).
The Theoretical Framework
To move beyond anecdotal evidence, the authors define a "formal world" where truths are represented by computable functions. By treating an LLM as a total computable function, they investigate whether such a model can ever perfectly learn the ground truth of this formal world.
As illustrated in the figure above, existing LLMs represent only a subset of polynomial-time bounded functions. The diagram highlights that "Existing LLMs" are inherently prone to hallucination because they cannot encompass the full breadth of "Total Computable Functions." Even "Ideal LLMs" that are always truthful are shown as a theoretical subset that may not be fully realizable within the constraints of computable models.
Methodology: Proving Inevitability
The researchers employ a rigorous framework based on Learning Theory and Computability Theory:
- Formalization: Hallucination is defined as any inconsistency between an LLM’s output and a ground-truth function $f$.
- Cantor’s Diagonalization: Using a diagonalization argument similar to Turing’s proof of the Halting Problem, the authors show that for any enumerable set of LLMs, a computable truth function can always be constructed that differs from every model in that set on at least one input.
- Complexity Analysis: Since real-world LLMs are constrained to polynomial time ($O(n^k)$), they are mathematically guaranteed to fail on tasks requiring exponential time ($O(2^n)$), such as complex combinatorial problems.
Guaranteed Hallucinations
The study categorizes specific problem domains where hallucination is not just possible, but guaranteed, depending on the model's computational bounds and complexity assumptions.
As shown in the table above, for $O(n^k)$ time-bounded models (which include all existing LLMs), hallucination is guaranteed for NP-complete problems like Subset Sum and Boolean Satisfiability (SAT), assuming $P \neq NP$. For even more powerful models, undecidable problems like the Entailment of First-Order Logic remain insurmountable barriers.
Empirical Validation
To bridge the gap between theory and practice, the authors tested state-of-the-art models like GPT-4 and Llama 3 on synthetic, procedurally generated tasks designed to avoid data memorization:
- Combinatorial Listing: Models were asked to list all possible strings of a certain length. GPT-4-Turbo failed on binary strings of length $m=7$, despite the output being well within its context window.
- Linear Ordering: Models struggled with transitive reasoning when standard symbols (like
<) were replaced with arbitrary ones, indicating a breakdown in structural reasoning.
Key Insights and Conclusion
The most striking takeaway is the Inevitability Theorem: if an LLM is used as a general problem solver, there will always be computable functions it cannot learn. Furthermore, the Self-Correction Paradox suggests that LLMs cannot reliably prevent their own hallucinations; techniques like "Chain of Thought" may mitigate errors but cannot eliminate them entirely.
The research concludes that scaling compute and data is not a silver bullet. Because the "formal world" of logic and math is a subset of the more complex "real world" of language, failure in the former guarantees failure in the latter. The path forward lies in augmenting LLMs with external aids—such as knowledge graphs and verifiable symbolic tools—rather than attempting to "train out" an innate mathematical limitation.
Summary updated