A lightweight three-layer classifier trained on frozen middle-layer activations predicts whether held-out factual statements are true or false at 82.98% average accuracy on LLaMA2-7b and 70.98% on OPT-6.7b, far ahead of few-shot prompting (53.74%) or normalized sentence probability (55.93%). Amos Azaria and Tom Mitchell (Ariel University and Carnegie Mellon, 2023) named this detector SAPLMA (Statement Accuracy Prediction, based on Language Model Activations) and showed why an autoregressive model can internally represent a falsehood even as it generates one.
Because LLMs commit token by token, a plausible prefix such as "Pluto is the smallest" traps GPT-4 into completing "dwarf planet in our solar system" (false: Pluto is second largest after Eris). Sentence probability fails as a verifier too, because common words and short phrases inflate likelihood independently of truth.
- Peaks in middle layers, not the final head: cross-topic accuracy reaches 82.98% at LLaMA2-7b layer
16(vs. 71.07% at the last layer) and 70.98% at OPT-6.7b layer20(vs. 64.49% at the last layer). - Large margin over prompting and probability baselines: on OPT-6.7b across six topics, SAPLMA (70.98%) beats BERT embeddings (54.34%), 3-shot (53.74%), 5-shot (53.70%), and normalized
"It is true/false that X"likelihoods (55.93%). - Strongest on high-coverage entities: LLaMA2-7b layer-16 SAPLMA reaches 92.23% on Cities, 89.38% on Inventions, and 86.58% on Companies, dropping to 77.74% on Animals and 69.39% on Chemical Elements.
- Self-generated claims require threshold calibration: on 245 greedy-decoded OPT-6.7b statements (
48.6%true,0.9566human-judge kappa), layer28hits 63.62% accuracy (0.7614 AUC) at a0.5cutoff and 71.34% after tuning a 0.8838 threshold on a 30% validation split.
How It Works
Azaria and Mitchell first construct a 6,084-sentence True-False dataset across six disjoint topics: Cities (1,458), Companies (1,200), Animals (1,008), Chemical Elements (930), Inventions (876), and ChatGPT-derived, human-verified Scientific Facts (612). For the five tabular domains, false claims swap a real attribute with a different row’s value (such as "The atomic number of Hydrogen is 34").
SAPLMA feeds each sentence through a frozen 32-layer LLM (OPT-6.7b or LLaMA2-7b), extracts the 4,096-dimensional final-token activation at a candidate layer (16, 20, 24, 28, or 32), and trains a 256-128-64 ReLU MLP with a sigmoid output for 5 Adam epochs. Crucially, probes train on five topics and evaluate on the held-out sixth topic (averaged across three random seeds), forcing the classifier to learn a cross-topic truthfulness signal rather than topic-specific trivia.
Key Findings
- Middle layers hold cleaner veracity signals than output layers: on both
OPT-6.7bandLLaMA2-7b, the final hidden layer underperforms earlier layers by 6.5 to 11.9 points (64.49%vs.70.98%on OPT;71.07%vs.82.98%on LLaMA2-7b), matching the intuition that final layers specialize for next-token sampling rather than abstract truth evaluation. - Activations see through surface likelihood traps: OPT-6.7b assigns higher sentence probability to
"The Earth is flat"(5.27e-7) than"The world is round and rotates"(2.96e-11), and penalizes typos ("Kevin Duarnt",1.52e-21) or unstated truisms ("Jennifer Aniston is a female person",2.78e-14). Layer-28 SAPLMA scores"The Earth is flat"at 0.0342,"The world is round and rotates"at 0.6191,"Kevin Duarnt is a basketball player"at 0.7105, and"Jennifer Aniston is a female person"at 0.6433. - Permuting labels checks probe capacity: scrambling ground-truth labels drops OPT-6.7b layer-20 training accuracy from 86.4% to 62.5%, showing the
256-128-64MLP is not simply memorizing the entire training split. - Open-ended generations shift calibration: when OPT-6.7b generates 245 follow-up claims greedily, SAPLMA trained on curated facts rates ~70% of them true at a
0.5cutoff (yielding 63.62% accuracy at layer28), because generated clauses are often subjective or half-true ("Lima gets an average of 1 hour of sunshine per day"). Raising the cutoff to 0.8838 lifts accuracy to 71.34%, though GPT-4 prompted in batches still scores 84.4%.
Caveats & Builder Takeaway
Two follow-up papers expose the limits of SAPLMA’s setup. First, using an MLP probe (256-128-64) without control-task complexity checks makes it harder to tell whether the probe learned truth or dataset surface cues; indeed, Marks and Tegmark cite work showing SAPLMA fails basic structural shifts such as negated statements containing "not". Second, SAPLMA only classifies isolated English sentences and still reflects whatever factual errors or biases sit inside the base model’s weights.
Practically, SAPLMA confirms that middle-layer residual activations are far better calibrated than token probabilities for flagging suspicious claims, and cheaper than running a second verification model. If you deploy a truth probe in production, train a linear or mass-mean baseline alongside any MLP, test it on negated and paraphrased claims rather than just held-out topics, and calibrate thresholds against real multi-sentence generations.


