First-Token Confidence Detects LLM Hallucinations at 1/11 the Cost
Ask ChatGPT "Who wrote Hamlet?" and it answers "Shakespeare" without hesitation — the confidence is visible in the very first token's probability distribution. Ask it a harder factual question, though, and the probabilities fan out across multiple candidates before the first word is even generated. A recent arXiv paper argues this single-token signal is enough to detect hallucinations — at a fraction of the industry's standard cost.
Mina Gabriel (Temple University) shows that the dominant approach to LLM hallucination detection may be heavily over-engineered.
How the industry currently does it
The mainstream method is Self-Consistency: sample the model ~11 times per question and check whether answers agree. The advanced variant, Semantic Self-Consistency, additionally clusters the 11 answers using a DeBERTa NLI model to judge semantic equivalence.
| Method | Generations | Extra model | Relative cost | |--------|-------------|-------------|---------------| | Semantic self-consistency | 1 greedy + 10 sampled | DeBERTa NLI clustering | 11x + NLI | | φ_first (this paper) | 1 greedy | none | 1x |
φ_first: two lines of math
Given a greedy-decoded sequence, locate the first substantive answer token (skipping spaces, punctuation, and template prefixes like "Answer:"), then measure how concentrated the top-K (K=100) probability distribution is at that position:
Confidence on one candidate → entropy 0 → φ_first = 1. Uniform distribution over 100 candidates → φ_first = 0. The whole metric is about 5 lines of PyTorch: one greedy forward pass plus reading the first answer token's top-K logits.
Results
Tested on three 7–8B instruction-tuned models (Llama-3.1-8B, Mistral-7B, Qwen2.5-7B) × two datasets (PopQA, TriviaQA), n=1000 each:
| Dataset | Model | Semantic SC AUROC | φ_first AUROC | Δ | |---------|-------|-------------------|---------------|---| | PopQA | Llama-3.1-8B | 0.874 | 0.887 | +0.013 | | PopQA | Mistral-7B | 0.775 | 0.842 | +0.064 | | PopQA | Qwen2.5-7B | 0.867 | 0.895 | +0.028 | | TriviaQA | Llama-3.1-8B | 0.778 | 0.794 | +0.016 | | TriviaQA | Mistral-7B | 0.724 | 0.727 | +0.003 | | TriviaQA | Qwen2.5-7B | 0.741 | 0.772 | -0.002 |
Overall average: φ_first 0.820 vs semantic self-consistency 0.793 — φ_first wins 5 of 6 settings and effectively ties the sixth.
Subsumption analysis: the Pearson correlation between φ_first and semantic consistency is 0.67 (range 0.54–0.76), and stacking the two improves AUROC by only +0.021. Most of the uncertainty signal that semantic consistency detects at 11x cost is already encoded in the single-point φ_first statistic.
Is it just tracking answer length?
A partial correlation analysis controlling for correctness shows the length effect nearly vanishes on PopQA (e.g., r_len -0.16 → r_partial -0.02 for Llama), with a small residual on TriviaQA — honestly listed as a limitation.
When the intuition breaks
Gabriel explicitly defines the method's boundaries:
- Long-form generation — the first token ("The", "In") carries no information
- Multi-hop reasoning — the answer isn't directly retrieved from parametric memory
- RAG — uncertainty lives in external documents, not the model
- English only; 7–8B models only — applicability to frontier-scale models is unknown
- Title: The First Token Knows: Single-Decode Confidence for Hallucination Detection
- Author: Mina Gabriel, Temple University
- arXiv: 2605.05166
- Code/data: no public repository; method reproducible in ~5 lines of PyTorch
The proposal
The paper's closing recommendation: any future method claiming to beat hallucination-detection baselines should first report φ_first results. The core insight is that in closed-book short-answer QA, the model is *recalling*, not *reasoning* — and recall confidence is exposed in the first token's logits.