Generalizable Probes for Detecting Factual Correctness in LLMs

Smitali Bhandari, Harshith M R, Jayden Koshy Joe, Sharan Keshav, Arsh MathurarXiv 2026

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:

  1. 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.
  2. 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?
  3. 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?"

The four balanced input sequence classes

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 on Gemma-2-2b-it).
Figure 1: Layer-wise test AUROC on TriviaQA T/F activations for Gemma-2-2b-it (MLP band: ±1 SD over 3 seeds), Llama-3.2-3b, and Qwen-2.5-3b. Hollow markers indicate p > 0.001 (n.s.) and dotted vertical lines mark the selected MLP layer. Across all three models, the MLP outperforms every linear baseline at every layer ≥10 and peaks near mid-depth.
  • Zero-shot cross-dataset transfer: Trained solely on TriviaQA, four-class MLPs transfer significantly ($p \le 0.001$) to both HaluEval (0.68–0.74 AUROC) and PopQA (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 Gemma and Llama (e.g., 0.7689 vs. 0.7591 on Gemma), four-class probes win in 5 of 6 OOD settings (e.g., jumping from 0.5413 to 0.6525 on Gemma PopQA, and 0.6536 to 0.7447 on HaluEval).
  • Dimensionality bottleneck: In SVD experiments on Gemma-2-2b-it (full dimension $d=2304$), TriviaQA and HaluEval hold onto most of their signal even when squeezed down to $k=16\text{–}64$ dimensions. Meanwhile, PopQA transfer holds steady down to $k=256$, drops sharply below that, and vanishes into statistical noise by $k=16$.
Figure 2: Test AUROC of SVD-projected MLP probes on Gemma-2-2b-it vs. projection dimension k (trained on TriviaQA T/F, zero-shot on HaluEval and PopQA; 2304 is full space). Hollow markers: n.s. (p > 0.001). TriviaQA and HaluEval retain most signal down to k=16–64, while PopQA collapses below k=256 and vanishes 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

BibTeX
@misc{bhandari2026generalizable,
  author = {Smitali Bhandari and Harshith M R and Jayden Koshy Joe and Sharan Keshav and Arsh Mathur},
  title = {{Generalizable Probes for Detecting Factual Correctness in LLMs}},
  year = {2026},
  eprint = {2611.39659},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.39659},
}
Figure