Correctness Is a Direction: Geometric Answer Selection in Language Models
Organizations: Department of Computer Science University of Houston Houston, TX 77204
Abstract
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 |
| 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 |
| 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 | ||
| MMLU-World History | +13.5 | +22.4 | +6.8 | |
| Coherence | HellaSwag | |||
| Calibration | TruthfulQA (ARC ) | +4.8 | +12.9 | +8.6 |
| 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) | — | |||||||||
| Probe gap (TQA) | — | |||||||||
| Classifier | AUROC | vs Random |
|---|---|---|
| Random baseline | 0.500 | — |
| Zero-shot log-prob | 0.578 | +7.8 pp |
| GRM contrastive | 0.693 | +19.3 pp |
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 |
| 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 |
| 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 |
| 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 |
| 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 |
| Model | Layer | SNR | Acc. (%) | SNR | Acc. (%) |
|---|---|---|---|---|---|
| Standard direction ( ) | |||||
| 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 |
| ARC | Own | |||||
|---|---|---|---|---|---|---|
| Subject | Model | ZS | Acc. | Acc. | ||
| Biology | Llama | 37.7 | 42.7 | +5.0 | 35.0 | |
| Qwen | 40.3 | 60.7 | +20.4 | 40.3 | ||
| Gemma | 41.0 | 60.7 | +19.7 | 48.7 | ||
| Chemistry | Llama | 31.0 | 26.6 | — | — | |
| Qwen | 32.0 | 36.9 | +4.9 | — | — | |
| Threshold | TPR (wrong flagged) | FPR (correct flagged) | Precision |
|---|---|---|---|
| 30.7% | 10.5% | 89.7% | |
| 40.4% | 17.1% | 87.6% | |
| 56.9% | 29.7% | 85.2% | |
| 64.5% | 40.0% | 82.8% | |
| 72.0% | 50.1% | 81.1% |
| Model | Params | Layers | 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 |
Language Model Calibration
Language model calibration studies whether models’ confidence estimates match their actual accuracy across tasks, prompts, and deployment settings.
See all 383 papers