TL;DR
Large Language Models (LLMs) often hallucinate, and while lightweight "lie detectors" trained on their internal brainwaves (activations) look promising on single benchmarks, they notoriously fall apart on new datasets. By designing a clever four-class labeling game that strips away surface-level shortcuts—and upgrading from simple linear detectors to tiny neural networks—researchers show that LLMs do carry a generalizable internal signal of factual correctness. Better yet, we can train a detector on just one trivia dataset and have it catch hallucinations zero-shot on entirely unseen benchmarks.
What Problem Does This Paper Address?
When an LLM confidently invents a fact, does some part of its internal machinery "know" it’s wrong? A popular way to check is activation probing: training a tiny classifier on the model’s internal hidden states (the residual stream) as it generates text.
The catch? Probes trained on Dataset A usually flop on Dataset B. The authors investigate three suspects behind this failure to generalize:
- Shortcut learning (Label confounders): In standard setups, probes look at the model's answer and predict "correct" or "wrong." If wrong answers in a specific dataset happen to be longer or phrased differently, the probe memorizes that quirk instead of true factual recall, failing when tested elsewhere.
- Overly simple probes: Following the popular "Linear Representation Hypothesis," most methods assume truthfulness lives along a single straight line in activation space. What if the geometry is curved or multi-dimensional?
- No universal signal: Maybe LLMs just don't have a single, domain-general "I'm making this up" signal.
Methods
To stop probes from cheating via answer-level shortcuts, the authors replace standard binary labeling (reading the End-of-Sequence, or EOS, token) with a balanced four-class labeling scheme.
First, they let an LLM generate free-form answers to questions (sampling 32 times per query to get a natural mix of right and wrong responses) and grade them. Then, they append an evaluation token—either "True" or "False"—to the end of the answer and extract activations right at that appended token. Instead of asking the probe "Is the answer correct?", they ask "Does this appended token agree with reality?"
By strictly balancing all four combinations (Correct+True, Correct+False, Wrong+True, Wrong+False), any surface feature of the answer itself—like length or tone—becomes completely useless on its own, predicting the target at 50/50 chance. The probe is forced to read the interaction between the evaluation token and the LLM's internal belief.
To test probe complexity, they pit a small 3-layer Multi-Layer Perceptron (MLP, non-linear) against strong linear baselines—Logistic Regression, Difference-of-Means, and Linear Discriminant Analysis (LDA, both standard and with covariance shrinkage)—across layers in three open-weight models (Gemma-2-2b-it, Llama-3.2-3B-Instruct, and Qwen2.5-3B-Instruct). They also use Singular Value Decomposition (SVD) to squash the activation space down and see how many dimensions are actually needed for generalization.
Datasets
No new benchmarks were created, but existing Question-Answering (QA) datasets were repurposed into confounder-balanced activation sets:
- TriviaQA (Training & In-Distribution Test): Probes are trained exclusively here (20K train queries, 2K validation, 2K test).
- HaluEval (Zero-Shot OOD Test): QA benchmark tested without accompanying knowledge passages so models must rely on internal memory.
- PopQA (Zero-Shot OOD Test): Tests obscure, "long-tail" entity knowledge, representing a tough distribution shift.
Key Insights and Ideas
- LLMs do have a transferable "truth" signal—if you block shortcuts: Conventional binary EOS probes often look better than four-class probes on the dataset they were trained on, because they happily exploit dataset-specific quirks. Out-of-distribution, the tables turn completely: confounder-controlled probes generalize far better.
- Truth isn't just a single straight line: Even when linear probes (like LDA) are given massive training data and shrinkage tuning so estimation errors can't be blamed, non-linear MLPs consistently beat them across every layer, peaking right around the middle layers of the LLMs.
- Generalization hides in higher dimensions: Compressing activations to a handful of dimensions looks totally fine on your training distribution, lulling you into thinking truth is low-dimensional. However, transferring to hard, long-tail questions (
PopQA) requires hundreds of dimensions—meaning out-of-distribution robustness relies on rich, high-dimensional structure.
Key Results
- Non-linear beats linear: On
TriviaQA, MLP probes beat full-data LDA across all models, boosting validation AUROC by roughly 0.05–0.10 (e.g., reaching 0.7591 test AUROC vs. LDA's 0.7113 onGemma-2-2b-it).
- Zero-shot cross-dataset transfer: Trained solely on
TriviaQA, four-class MLPs transfer significantly ($p \le 0.001$) to bothHaluEval(0.68–0.74 AUROC) andPopQA(0.57–0.68 AUROC), beating linear probes in 5 of 6 out-of-distribution settings. - Four-class vs. Binary EOS reversal: While binary EOS probes win in-distribution on
GemmaandLlama(e.g., 0.7689 vs. 0.7591 onGemma), four-class probes win in 5 of 6 OOD settings (e.g., jumping from 0.5413 to 0.6525 onGemmaPopQA, and 0.6536 to 0.7447 onHaluEval). - Dimensionality bottleneck: In SVD experiments on
Gemma-2-2b-it(full dimension $d=2304$),TriviaQAandHaluEvalhold onto most of their signal even when squeezed down to $k=16\text{–}64$ dimensions. Meanwhile,PopQAtransfer holds steady down to $k=256$, drops sharply below that, and vanishes into statistical noise by $k=16$.
Limitations and Future Work
- Small model scale: All tested models have $\le$3B parameters. Prior research hints that representations might become more cleanly linear in much larger models, making scaling up a natural next test.
- Token position vs. labeling: Comparing four-class T/F probes to binary EOS probes changes both the labeling scheme and which token is read. Training a standard binary probe directly on the evaluation token is needed to isolate the exact impact of the label math alone.
- The "XOR" question: Because the target checks agreement between correctness and the
"True"/"False"token, the authors note it remains an open question whether MLPs win by extracting a deeper truth representation, or by implicitly computing an XOR-like operation that could still harbor subtle confounders. - Fuzzy-matching quirks: On
PopQA's ambiguous questions, models frequently ask for clarification (e.g.,Qwen-2.5-3b), which automated fuzzy string matching grades as "wrong," introducing label shift.
Summary updated