GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
Findings of EMNLP 2023

The Internal State of an LLM Knows When It's Lying

A small classifier on hidden activations tells true from false statements 71% to 83% of the time on unseen topics. On sentences the model wrote itself it reached 71%; GPT-4, prompted, reached 84%.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2023
AUTHORS
Azaria, Mitchell
FROM
Ariel University, Carnegie Mellon University
PUBLISHED
Apr 2023 · Findings of EMNLP 2023
CITED BY
913Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 24% of this breakdown.

01

The paper in one minute

Language models generate one token at a time and commit to each one. The authors argue that this can lead a model into a false statement even when it has the information to recognize it as false afterwards. Their example: having written "Pluto is the smallest", a model is pushed toward "dwarf planet in our solar system", which is wrong. If the model's internal state represents truth or falsehood, that representation could be read out.

They build a dataset of 6,084 true and false statements across six topics: cities, inventions, chemical elements, animals, companies and scientific facts. For the first five, true statements come from reference tables, and false ones swap in a property from a different row ("The atomic number of Hydrogen is 34"). Scientific facts and their negations come from ChatGPT, checked by two annotators.

The method, SAPLMA (Statement Accuracy Prediction based on Language Model Activations), feeds each statement to the model, records the 4,096 activations of one hidden layer at the last token, and trains a small feed-forward network (256, 128 and 64 units) to output the probability the statement is true. Training uses five topics; testing uses the sixth. The authors try five layers in OPT-6.7b and LLaMA2-7b.

Averaged over held-out topics, the best layer reached 71% with OPT-6.7b and 83% with LLaMA2-7b. Few-shot prompting of OPT-6.7b and a classifier on BERT embeddings stayed near 54%. The authors then test on 245 statements that OPT-6.7b generated itself, labeled by three people. There the probe reached 62% to 64% at the default threshold and 71% when the threshold was tuned on 30% of the statements. GPT-4, given the same statements and asked to label them, reached 84.4%.

THE IDEA, VISUALLY
HELD-OUT TOPIC ACCURACY (TABLES 1 AND 2) Cities 92 81 54 Inventions 89 73 48 Elements 69 62 57 Animals 78 61 56 Companies 87 81 55 Facts 82 68 52 50% = chance probe, LLaMA2-7b layer 16 (avg 83%) probe, OPT-6.7b layer 20 (avg 71%) OPT-6.7b 3-shot prompt (avg 54%) STATEMENTS THE MODEL WROTE (245, 48.6% TRUE) label all 'true' 48.6 BERT, tuned threshold 57.0 probe, threshold 0.5 63.6 probe, tuned threshold 71.3 GPT-4, asked to label 84.4 whiskers: 95% intervals (our calculation) At threshold 0.5 the probe called about 70% of these statements true; tuned thresholds were 0.81 to 0.91, fitted on 30% of the same set. Its best AUC, 0.76, allows about 69% accuracy under a binormal model. GPT-4 needs no access to activations. arXiv 2304.13734, Ariel University and CMU
Left: accuracy of the activation probe (SAPLMA) on each held-out topic, using each model's best layer (LLaMA2-7b layer 16, OPT-6.7b layer 20), against few-shot prompting of OPT-6.7b (Tables 1 and 2). Right: the deployment case, 245 statements OPT-6.7b generated itself (48.6% true), with 95% intervals from our calculation; the probe needs a tuned threshold to reach 71%, and GPT-4 asked in a prompt reaches 84%.
Research notes: the problem, approach and results
83%

average held-out-topic accuracy with LLaMA2-7b's middle layer; 71% with OPT-6.7b's 20th layer (Tables 1 and 2)

71%

accuracy on the model's own generated statements after tuning the threshold on 30% of them (Table 4)

84.4%

GPT-4's accuracy on the same generated statements when simply asked to label them (Section 5)

THE PROBLEM

Language models state false things in a confident tone. If the model's internal activations carry a signal about whether a statement is true, a cheap detector could flag false output before a user sees it.

THE IDEA

Record the hidden-layer activations of an LLM as it reads a statement, and train a small feed-forward classifier (SAPLMA) to predict true or false. Train on five topics and test on the sixth, so the classifier cannot learn topic-specific patterns.

THE RESULT

On held-out topics, SAPLMA averaged 71% accuracy with OPT-6.7b and 83% with LLaMA2-7b, where few-shot prompting and BERT embeddings stayed near 54%. On 245 statements OPT-6.7b generated itself, it reached 64% at the default threshold and 71% with a tuned one.

02

Why it matters to an FDE

The signal exists. Hidden activations carry information about truth that a small classifier can pick up, even across topics it was not trained on. This is the starting point for a family of white-box hallucination detectors, and the idea of probing internal states has stayed influential.

The deployment case is the weak one. The headline 71% to 83% comes from template statements like "Oranjestad is a city in Aruba". On statements the model actually generated, the probe reached 64% at its default threshold and 71% only after tuning on part of the test set. A customer evaluating a "hallucination detector" built on this idea should ask for numbers on their own generated outputs.

A prompted checker may beat it. On the same generated statements, GPT-4 asked to label each one reached 84.4%. A probe needs access to model internals, which closed APIs do not give, and a training pipeline. A second model asked to check claims needs neither. Compare both on the customer's data before building either.

Thresholds need calibration. The probe called about 70% of generated statements true at the default 0.5 threshold, and the tuned thresholds were 0.81 to 0.91. Any confidence score from a detector has to be calibrated on data that looks like production before you set an action threshold, and the authors make this point themselves.

Use it as a flag, not a verdict. At 70% accuracy, a probe can prioritize statements for review or for retrieval-based checking. It cannot be the only gate on a high-stakes claim.

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

    Dataset, probe, held-out topics, generated statements, probabilities and two misreadings

    Free account
  2. 04How it works

    Dataset construction, layers probed, the classifier, the baselines and the generated-statement test

    Premium
  3. 05The numbers that matter

    Accuracy by topic and layer, the baselines, generated statements, thresholds and Table 5

    Premium
  4. 06Try it yourself

    Recompute the averages, put intervals on the generated-statement test, read what the AUCs allow

    Premium
  5. 07Where it breaks

    Template statements, best-layer selection, weak generated-text result, small models

    Premium
  6. 08Using it on a deployment

    Where a probe fits, how to evaluate a detector honestly, and when a second model is the better check

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →