GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv

Hallucination is Inevitable: An Innate Limitation of Large Language Models

A diagonal proof shows every computable model is wrong on some computable task. The math holds; what it tells you about your own task is far less than the title suggests.

Breakdown by FDE Interviews · 14 min read · Updated

About the original · 2024
AUTHORS
Xu, Jain, Kankanhalli
FROM
National University of Singapore
PUBLISHED
Jan 2024 · arXiv
CITED BY
702Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 23% of this breakdown.

01

The paper in one minute

The paper asks a question that benchmark studies cannot answer: can hallucination in large language models be eliminated entirely? Measuring error rates on test sets can show that a technique helps, but no finite test can show that errors are gone for every possible input.

To make the question precise, the authors define a formal world. Inputs are finite strings over a fixed alphabet. The correct answer to each input is given by a ground truth function f that a computer can calculate. A language model is any computable function from strings to strings that is updated as it sees training pairs (s, f(s)). A model hallucinates with respect to f if, at every stage of training, there is some input where its output differs from f.

With those definitions, the authors adapt a classic argument from computability theory. List every model state, list every input, and build f so that its answer on input i differs from what state i outputs on input i. Every state is then wrong on at least one input, and a stronger construction makes each one wrong on infinitely many inputs. Because a single model is a list of one, the result covers any computable model: for each one there exists a computable task it cannot get fully right. The authors argue that since the formal world is part of the real world, hallucination cannot be eliminated in real systems either.

The paper then lists problem classes that are hard for models with polynomial running time (SAT, subset sum, Presburger arithmetic), discusses which mitigations could escape the theorems (retrieval and external tools can, because they add information beyond training pairs), and reports two small experiments in which current models fail to list all strings of a given length and fail to reason about an unfamiliar ordering relation.

THE IDEA, VISUALLY
THE DIAGONAL (THEOREM 1) input s0 input s1 input s2 input s3 model 0 h0(s0) h0(s1) h0(s2) h0(s3) model 1 h1(s0) h1(s1) h1(s2) h1(s3) model 2 h2(s0) h2(s1) h2(s2) h2(s3) model 3 h3(s0) h3(s1) h3(s2) h3(s3) truth f not h0(s0) not h1(s1) not h2(s2) not h3(s3) f is computable and built from the models: model i is wrong on input i. Theorem 2 makes each model wrong on every input from its own diagonal onward. A model that is f never errs on f. Definition 4 counts any output unlike f(s), including 'I don't know', as a hallucination. arXiv 2401.11817, National University of Singapore LISTING EVERY STRING OF LENGTH m (TABLE C2) full answer to L(m,{a,b}), characters with separators (our count) m = 1 4 5 of 5 solved m = 2 14 5 of 5 solved m = 3 38 4 of 5 solved m = 4 94 3 of 5 solved m = 5 222 3 of 5 solved m = 6 510 2 of 5 solved m = 7 1,150 0 of 5 solved Models: Llama 2 70B, Llama 3 70B (4-bit), GPT-3.5-turbo, GPT-4-0613, GPT-4-turbo. Solved = any of 3 runs perfect. Every answer fits in the smallest context, 4,096 tokens: the failures show unreliable enumeration, not the Omega(2^n) bound, which says nothing about m = 7.
Left: the diagonal construction behind Theorem 1. Each row is a model, each column an input; the ground truth f is built to differ from model i on input i, so every model is wrong somewhere. Right: the listing task from Appendix C. Bars show the full answer to L(m,{a,b}) in characters (our count); markers show the largest m each model solved in Table C2. Every answer fits in the smallest context tested, 4,096 tokens.
Research notes: the problem, approach and results
3

theorems: errors for any enumerable set of models, infinitely many errors, and errors for any computable model (Section 3)

1,150

characters in the full answer to L(7,{a,b}), which every tested model failed; the smallest context was 4,096 tokens (our count)

48 of 48

refusals that Definition 4 counts as hallucinations for a model that abstains outside its training data (our run)

THE PROBLEM

Work on hallucination is mostly empirical: a method lowers an error rate on a benchmark. Can hallucination ever be removed completely, or is there a limit that no architecture, training data or prompt can get past?

THE IDEA

Define a formal world where the ground truth is a computable function and a hallucination is any output that differs from it. Then use diagonalization from learning theory to build, for any computable model, a computable task that model gets wrong.

THE RESULT

Every computable LLM hallucinates on some computable task, and on infinitely many inputs of some task, whatever its training. Small experiments show five models failing to list every string of length 6 or 7 over two letters.

02

Why it matters to an FDE

Design as if errors are permanent. The practical message is the one customers most need to hear before a launch. No model release, prompt or fine-tune will make an open-ended assistant error-free, so the system around the model has to catch, contain and correct mistakes. That means verification steps, citations a user can check, human review where the cost of an error is high, and a clear path for reporting problems.

Know the limits of the proof. The theorem shows that for every model there exists some computable task it fails. It does not say your task is that task, and it does not give an error rate. The ground truth in the proof is built from the model it defeats. When someone cites this paper to argue that a contract-extraction system "will always hallucinate at some rate", the honest reply is that the paper supports the first half (some error will exist somewhere) and says nothing about the rate or where errors fall.

External information changes the picture. The authors note that retrieval, tools and knowledge bases give the model information beyond its training pairs, so their theorems do not apply in the same way. This is the strongest practical argument in the paper for grounding: the model is not asked to compute or remember what a database lookup, a calculator or a search can supply.

Refusal is part of the design. The paper observes that a model that never answers never hallucinates. Its own Definition 4 counts a refusal as a wrong output, which our experiment shows. In production you want the second view: abstention reported as its own outcome, with coverage and accuracy measured separately.

Watch the experiments, not just the theorems. The listing failures happen on answers of about a thousand characters, far from any context limit. Simple, mechanical tasks can fail for reasons unrelated to computational hardness, which is a reason to give such tasks to code.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The definitions, the three theorems, the hard problem classes, the mitigators and two misreadings

    Free account
  2. 04How it works

    Definitions, the diagonal construction, the problem classes, the mitigators and the experiments

    Premium
  3. 05The numbers that matter

    The listing results by model, the ordering task, the answer sizes and the scoring rule

    Premium
  4. 06Try it yourself

    Run the diagonal argument on four toy models, apply Definition 4 to a refuser, size the listing task

    Premium
  5. 07Where it breaks

    Existence without a rate, adversarial ground truth, a refusal-hostile definition, thin experiments

    Premium
  6. 08Using it on a deployment

    Turn "errors are permanent" into design: grounding, tools, abstention and review by stakes

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →