Linear Probing & Latent Truthfulness
Does a language model 'know' when it is hallucinating or generating false statements? Linear probing trains simple logistic regression classifiers on the model's residual stream activations across layers to discover whether a linear subspace encodes ground-truth factual correctness independently of the generated surface tokens.
The Internal Truthfulness Subspace
Research (e.g., Geometry of Truth, Burns et al.) demonstrates that factual statements (e.g., 'Paris is in France') and false statements (e.g., 'Paris is in Germany') form linearly separable clusters in activation space.
Distinguishing Ignorance vs Deception
When a model hallucinates, is it genuinely uncertain or is it outputting a false statement despite possessing the correct internal representation? Probes can read out the model's internal belief state before the final softmax layer.
Mass-Mean Probing vs Ridge Regression
Probes can be trained with labeled datasets or discovered via unsupervised contrastive consistency methods (e.g., Discovering Latent Knowledge / CCS) that enforce logical consistency constraints across negated pairs.
Where h_l is the residual stream activation vector at layer l, w_l is the probe weight vector, and b_l is the scalar bias. If P(Truthful) is high but the generated token is false, a hallucination or sycophancy event is detected.
- Train probes on middle layers (e.g., 50% to 75% depth of the network) where factual representations reach peak linear separability.
- Use out-of-distribution evaluation sets to ensure the probe learns genuine truthfulness rather than surface correlation with specific keywords.
- Deploy probes in high-stakes domain serving (medical/legal AI) to attach real-time epistemic confidence scores to each generated claim.