Answer correctness is encoded as a recoverable geometric direction in the hidden states of language models. We show that the mean displacement from incorrect to correct answer representations, computed at approximately 70% of model depth from fifty labeled examples with no parameter updates, yields a scoring direction that outperforms zero-shot log-probability scoring by up to +32.0 percentage points on factual benchmarks (ARC-Challenge and MMLU) and by +38.1 to +51.8 percentage points on TruthfulQA, across five models spanning 1B to 8B parameters in three architecture families (Llama, Qwen, Gemma). The method requires one forward pass and one dot product per candidate; no generation is performed at inference. Applied as a hallucination detector on individual (question, answer) pairs, the recovered direction achieves 0.693~AUROC versus 0.578 for log-probability scoring. We additionally find that correctness directions for factual reasoning, domain knowledge, and calibrated truthfulness are near-orthogonal in representation space, revealing that language models allocate geometrically independent subspaces to qualitatively distinct notions of correct answer, with architecture-dependent variation in the degree of separation. This structure explains the observed transfer pattern---the direction calibrated on factual questions transfers within task type but not across it---and suggests that LLM calibration failures may reflect a routing problem: the model's internal representation contains more correctness signal than its output behaviour exploits.
Figures & tables
Model
Layer
Zero-shot
Standard δ^
Contrastive δ^
Std SNR
Con SNR
Llama-3.2-1B
0.60
35.0%
26.1% ( − 8.9)
44.7% (+9.7)
43.4 ×
8.1 ×
Qwen-2.5-1.5B
0.65
41.0%
35.1% ( − 5.9)
61.1% (+20.1)
49.4 ×
9.0 ×
Gemma-2-2B
0.70
44.4%
27.6% ( − 16.8)
66.5% (+22.1)
27.2 ×
10.1 ×
Table 1: Standard vs. contrastive direction at the layer selected via held-out validation for each model. Zero-shot log-probability on identical held-out test examples (ARC-Challenge) provides the baseline. Layer selection uses a 20% validation split; all reported accuracies are on the remaining 80% test set. Accuracy changes relative to zero-shot in parentheses.
Figure 1: ARC-Challenge accuracy (%) for standard δ^ (orange, dashed) and contrastive δ^ (blue, solid) across five layer fractions, for all three model families. The zero-shot log-probability baseline is shown as a dotted horizontal line for each model. The faint vertical guide marks fraction 0.70. Contrastive extraction outperforms standard at all tested depths for Qwen and Gemma. For Llama, the directions converge at fraction 0.75 (layer 12 of 16), where the standard direction reaches its global maximum of 58.0%; at all other depths the contrastive direction is superior. Qwen and Gemma peak at fraction 0.70 despite differing architectures, consistent with a universal representational transition near this depth. Llama-3.2-1B points at fractions 0.75 and 0.80 are identical because both map to layer 12 in a 16-layer architecture.
N=50
N=100
Model
Layer
SNR
Acc. (%)
SNR
Acc. (%)
Qwen-2.5-1.5B
0.70
8.4 ×
60.6
8.4 ×
60.6
Gemma-2-2B
0.75
10.0 ×
67.8
9.7 ×
65.6
Table 2: Effect of calibration set size on direction SNR and ARC-Challenge accuracy at the validation-selected optimal layer. SNR and accuracy do not improve with doubled calibration set size. Llama-3.2-1B results omitted from tabular comparison as the N=50 vs. N=100 systematic comparison was conducted at the previously identified 0.75 layer; the general pattern (no improvement with N=100) is consistent across all models and layer configurations tested.
Figure 2: Pairwise cosine similarity between contrastive correctness directions calibrated on ARC-Challenge, MMLU-Biology, and TruthfulQA for all five tested models (rows), across the three task-direction pairs (columns). Warm colours indicate positive alignment; white indicates orthogonality; values are annotated directly in each cell. The dashed line separates sub-3B models (above) from 7B–8B models (below). Near-orthogonality ( ∣cosθ∣<0.16 ) is the dominant pattern: Llama-3.2-1B, Qwen-2.5-1.5B, and Llama-3.1-8B satisfy this across all three pairs, with Llama-8B showing the strongest separation of any tested model (max ∣cosθ∣=0.10 ). Gemma-2-2B shows partial alignment between ARC and TQA ( +0.302 ); Qwen-2.5-7B shows moderate ARC ↔ MMLU alignment ( +0.311 ) and partial ARC ↔ TQA alignment ( +0.166 ), indicating family-specific geometric organisation that can increase with scale.
Category
Task
Qwen-1.5B
Gemma-2B
Llama-1B
Factual MC
ARC-C (source)
+24.3
+20.3
+6.3
MMLU-Biology
+20.4
+19.7
+5.0
MMLU-Chemistry
+4.9
+8.4
−4.4
MMLU-World History
+13.5
+22.4
+6.8
Coherence
HellaSwag
−11.0
−16.7
−26.7
Calibration
TruthfulQA (ARC δ^ )
+4.8
+12.9
+8.6
Table 3: Transfer of ARC-Challenge calibrated δ^ to target tasks ( Δ pp relative to zero-shot log-probability baseline on identical test examples). The bottom row shows TruthfulQA results when recalibrated on TruthfulQA examples (own δ^ ), confirming that calibration source determines performance. Bold entries indicate positive transfer; negative entries indicate the ARC direction actively hurts relative to zero-shot.
Llama-1B
Qwen-1.5B
Gemma-2B
Qwen-7B
Llama-8B
Task
ZS
GRM
Δ
GRM
Δ
GRM
Δ
GRM
Δ
GRM / Δ
ARC-C (35 / 41 / 44 / 48 / 46%)
—
44.7
+9.7
61.1
+20.1
66.5
+22.1
80.0
+32.0
59.0 / +13.4
TruthfulQA (33 / 31 / 39 / 40 / 29%)
—
75.9
+43.4
72.5
+41.9
76.5
+38.0
81.2
+41.7
80.4 / +51.7
Probe gap (ARC)
—
−1.0
+0.2
+0.0
+1.0
−1.0
Probe gap (TQA)
—
−2.1
−1.2
+0.7
−1.6
−0.5
Table 4: Geometric scoring accuracy and improvement over zero-shot log-probability (same held-out test set; layer selected on a 20% validation split). Calibration: ARC δ^ for ARC-Challenge (50 ARC training examples), TQA δ^ for TruthfulQA (50 TQA examples). Probe gap rows show GRM minus a logistic regression probe trained on the identical 200 calibration hidden states (50 questions × 4 candidates); values within ± 3 pp confirm that the mean direction captures the full discriminative information available from fifty examples without optimisation. Improvements above ≈8 pp are statistically significant at α=0.05 (two-proportion z -test).
Figure 3: Improvement in accuracy ( Δ pp) over the zero-shot log-probability baseline on ARC-Challenge (left) and TruthfulQA (right) for all five models. Error bars show 95% confidence intervals (two-proportion z -test). Annotated values above each bar show absolute GRM accuracy. Colours indicate architecture family: blues for Llama (light = 1B, dark = 8B), oranges for Qwen (light = 1.5B, dark = 7B), green for Gemma-2B. On ARC-Challenge, improvements scale with model size within each family: Qwen 1.5B → 7B gains an additional 18.9 pp; Llama 1B → 8B gains 14.3 pp. On TruthfulQA, where zero-shot baselines fall near or below chance (28.7–39.5%), geometric scoring achieves 72.5–81.2% across all five models, with the largest single improvement in the study coming from Llama-3.1-8B (+51.7 pp). MMLU and HellaSwag transfer results are reported in Table 3 .
Classifier
AUROC
Δ vs Random
Random baseline
0.500
—
Zero-shot log-prob
0.578
+7.8 pp
GRM contrastive δ^
0.693
+19.3 pp
Table 5: Hallucination detection AUROC on ARC-Challenge (Qwen-2.5-1.5B, n=1,999 pairs). AUROC measures P(correct score>wrong score) ; 0.5 is random. GRM requires one forward pass and one dot product per pair; no training beyond the 50-example calibration step.
Figure 4: (a) Score distributions of the contrastive GRM projection for correct (blue, solid) and incorrect (orange, dashed) answer representations. Curves are Gaussian approximations fitted to the empirical means and standard deviations; the theoretical AUROC from these fits is 0.691, closely matching the empirical 0.693. The shaded region shows distribution overlap. Vertical dotted lines mark the class means ( μcorrect=+0.0255 , μwrong=−0.0084 ); the separation of 0.034 score units is modest but consistent. (b) ROC curves for GRM (AUROC 0.693, solid blue) and zero-shot log-probability (AUROC 0.578, dashed orange), derived analytically from Gaussian fits to empirical score distributions. The diagonal dotted line represents a random classifier.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Standard δ^
Contrastive δ^
Layer
SNR
ArgMax
ArgMin
SNR
ArgMax
ArgMin
0.60
43.4 ×
29.4
20.8
8.1 ×
44.2
11.2
0.70
38.5 ×
24.0
21.2
7.6 ×
40.2
14.2
0.75 †‡
36.4 ×
58.0
38.0
35.9 ×
53.2
54.0
0.80 †
36.4 ×
58.0
38.0
35.9 ×
53.2
54.0
0.90
35.7 ×
33.6
17.8
7.2 ×
38.4
16.2
Appendix
Table 6: Full layer sweep — Llama-3.2-1B-Instruct (16 layers). Fractions 0.75 and 0.80 map to the same absolute layer (layer 12); results are identical by construction.
Standard δ^
Contrastive δ^
Layer
SNR
ArgMax
ArgMin
SNR
ArgMax
ArgMin
0.60
51.9 ×
36.8
15.2
8.5 ×
53.0
10.4
0.70
49.7 ×
39.0
15.0
8.4 ×
60.6
8.0
0.75
41.0 ×
37.4
18.2
7.7 ×
53.0
8.0
0.80
39.6 ×
35.4
17.0
7.5 ×
48.6
9.2
0.90
32.6 ×
31.2
19.0
6.5 ×
49.0
10.4
Appendix
Table 7: Full layer sweep — Qwen-2.5-1.5B-Instruct (28 layers).
Standard δ^
Contrastive δ^
Layer
SNR
ArgMax
ArgMin
SNR
ArgMax
ArgMin
0.60
30.9 ×
33.2
21.2
11.0 ×
65.0
6.0
0.70
27.2 ×
28.4
24.6
10.1 ×
67.6
6.4
0.75
29.0 ×
33.2
20.8
10.0 ×
67.8
6.4
0.80
28.7 ×
35.4
18.4
9.7 ×
65.6
6.0
0.90
31.7 ×
36.4
16.8
9.9 ×
62.4
6.2
Appendix
Table 8: Full layer sweep — Gemma-2-2B-IT (26 layers).
Layer
Con SNR
Con ArgMax (val)
0.60
12.4 ×
62.8
0.65
13.5 ×
75.2
0.70
14.9 ×
82.5
0.75
15.4 ×
75.2
0.80
14.4 ×
74.8
0.85
13.7 ×
73.1
Appendix
Table 9: Layer sweep — Qwen-2.5-7B-Instruct (32 layers). Contrastive δ^ only; accuracy on 20% validation split used for layer selection. Zero-shot baseline: 48.0%.
Layer
Con SNR
Con ArgMax (val)
0.60
11.2 ×
55.6
0.65
11.1 ×
56.0
0.70
10.8 ×
53.4
0.75
10.5 ×
49.6
0.80
10.4 ×
50.9
0.85
10.1 ×
52.6
Appendix
Table 10: Layer sweep — Llama-3.1-8B-Instruct (32 layers). Contrastive δ^ only; accuracy on 20% validation split used for layer selection. Zero-shot baseline: 45.6%.
N=50
N=100
Model
Layer
SNR
Acc. (%)
SNR
Acc. (%)
Standard direction ( n=200 )
Llama
0.90
35.7 ×
32.0
35.6 ×
26.5
Llama
0.75
36.3 ×
28.0
35.5 ×
31.5
Qwen
0.90
32.6 ×
28.5
30.9 ×
30.0
Qwen
0.75
41.0 ×
39.0
38.5 ×
34.5
Appendix
Table 11: Effect of calibration size on SNR and ARC-Challenge accuracy. Upper section: standard direction at two layer fractions per model ( n=200 test). Lower section: contrastive direction at optimal layer per model ( n=500 test). SNR consistently decreases as N increases; accuracy shows no systematic benefit beyond N=50 .
ARC δ^
Own δ^
Subject
Model
ZS
Acc.
Δ
Acc.
Δ
Biology
Llama
37.7
42.7
+5.0
35.0
−2.7
Qwen
40.3
60.7
+20.4
40.3
+0.0
Gemma
41.0
60.7
+19.7
48.7
+7.7
Chemistry
Llama
31.0
26.6
−4.4
—
—
Qwen
32.0
36.9
+4.9
—
—
Appendix
Table 12: ARC-calibrated contrastive direction on MMLU subjects ( n=300 test examples per subject). “Own” columns show accuracy when the direction is calibrated on the same subject’s validation split ( N≤50 , typically 10–30 examples available). Dashes indicate subject calibration was not separately tested.
Threshold t
TPR (wrong flagged)
FPR (correct flagged)
Precision
−0.04
30.7%
10.5%
89.7%
−0.02
40.4%
17.1%
87.6%
−0.00
56.9%
29.7%
85.2%
+0.02
64.5%
40.0%
82.8%
+0.04
72.0%
50.1%
81.1%
Appendix
Table 13: GRM detector operating points at selected score thresholds. TPR: fraction of wrong answers correctly flagged (high GRM score < threshold flags answer as suspect — note: we flag low-scoring answers, so high TPR requires a high threshold t ). FPR: fraction of correct answers incorrectly flagged.
Model
Params
Layers
d
Opt. frac
Opt. layer
Llama-3.2-1B-Instruct
1.24B
16
2,048
0.60
9
Qwen-2.5-1.5B-Instruct
1.54B
28
1,536
0.65
18
Gemma-2-2B-IT
2.61B
26
2,304
0.70
18
Qwen-2.5-7B-Instruct
7.61B
32
3,584
0.70
22
Llama-3.1-8B-Instruct
8.03B
32
4,096
0.65
20
Appendix
Table 14: Model architectures and optimal extraction layers.
School of Computer Science and Technology, Tiangong University, Tianjin, China. · Center for Quantum Physics and Intelligent Sciences, Department of Physics, Capital Normal University, Beijing, China.