Gradient-Stable Attention Heads Signal LLM Correctness
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) often generate plausible yet incorrect answers, posing risks in safety-critical settings such as medicine. Human evaluation is expensive, and LLM-as-judge approaches risk introducing hidden errors. Recent single-pass white-box methods detect contextual hallucinations using linear probes over model internals, but their generalization to out-of-domain, out-of-task, and training-free settings remains poorly understood. We introduce HeadEntropy, a method that predicts answer correctness by measuring how susceptible each attention head's pattern is to modification under further gradient updates. The key insight is that the trace of the softmax Jacobian is a monotonic function of 2-Renyi entropy, linking attention spread to gradient stability during training, even without the reference annotation. With no training, HeadEntropy reaches 0.736 AUROC, outperforms every training-free baseline in paired comparison and matches a hidden-state probe out-of-domain, at under 1% of inference cost. We evaluate broadly across 5 instruction-tuned LLMs and 5 datasets spanning general knowledge, multi-hop reasoning, mathematical reasoning, claim verification, and medicine. The code is available at https://github.com/StanfordMIMI/HeadEntropy.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 25 of its 38 references that are in the map. First posted on arXiv 14 Feb 2026.
Builds on
25 of 38 references.
References · 25
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,488
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2022Large Language Models Encode Clinical Knowledgecited by 1,807
- 2022Language Models (Mostly) Know What They Knowcited by 1,783
- 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,362
- 2021A Gentle Introduction to Conformal Prediction and Distribution-Free Uncertainty Quantificationcited by 777
- 2024INSIDE: LLMs' Internal States Retain the Power of Hallucination Detectioncited by 317
- 2024Humans or LLMs as the Judge? A Study on Judgement Biasescited by 314
- 2023A Survey of Confidence Estimation and Calibration in Large Language Modelscited by 253
- 2024Semantic Entropy Probes: Robust and Cheap Hallucination Detection in LLMscited by 246
13 more
- 2024Judging the Judges: Evaluating Alignment and Vulnerabilities in LLMs-as-Judgescited by 197
- 2024Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Mapscited by 140
- 2024LLM Internal States Reveal Hallucination Risk Faced With a Querycited by 80
- 2024Calibrating Language Models with Adaptive Temperature Scalingcited by 57
- 2023On Early Detection of Hallucinations in Factual Question Answeringcited by 54
- 2025Hallucination Detection in LLMs Using Spectral Features of Attention Mapscited by 42
- 2025No Answer Needed: Predicting LLM Answer Accuracy from Question-Only Linear Probescited by 35
- 2025ICR Probe: Tracking Hidden State Dynamics for Reliable Hallucination Detection in LLMscited by 31
- 2024InternalInspector I2: Robust Confidence Estimation in LLMs through Internal Statescited by 29
- 2025Semantic Energy: Detecting LLM Hallucination Beyond Entropycited by 18
- 2025Internal Causal Mechanisms Robustly Predict Language Model Out-of-Distribution Behaviorscited by 11
- 2025Suitability Filter: A Statistical Framework for Classifier Evaluation in Real-World Deployment Settingscited by 4
- 2025AggTruth: Contextual Hallucination Detection using Aggregated Attention Scores in LLMscited by 2
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026</think> Doesn't Stop Reasoning: Analysis of Spurious CoT Terminationcited by 1
- 2026Predicting Task Difficulty Without Rolloutscited by 0
- 2026No Universal Signal Predicts Sample-Level LLM Regression under Version Updatescited by 0
- 2026LongGuard: Mechanistic Analysis and Training-Free Mitigation of Long-Context Failure in Safety Guardrailscited by 0
- 2026From Saliency to Discriminability: Rank-Preserving Visual Token Pruning for VLM Rerankerscited by 0
- 2026</think> Doesn't Stop Reasoning: Analysis of Spurious CoT Termination3 Sep 2026
- 2026From Saliency to Discriminability: Rank-Preserving Visual Token Pruning for VLM Rerankers1 Sep 2026
- 2026LongGuard: Mechanistic Analysis and Training-Free Mitigation of Long-Context Failure in Safety Guardrails27 Aug 2026
- 2026No Universal Signal Predicts Sample-Level LLM Regression under Version Updates11 Aug 2026
- 2026Predicting Task Difficulty Without Rollouts6 Aug 2026
Similar, not cited
Close in wording, no citation either way
- 2026Where Reliability Lives in Vision-Language Models: A Mechanistic Study of Attention, Hidden States, and Causal Circuits
- 2025Thinking, Faithful and Stable: Mitigating Hallucinations in LLMs
- 2025HAVE: Head-Adaptive Gating and ValuE Calibration for Hallucination Mitigation in Large Language Models
- 2025ZeroTuning: Unlocking the Initial Token's Power to Enhance Large Language Models Without Training
- 2026Linear Predictability of Attention Heads in Large Language Models
- 2026The Alignment Paradox: How Post-Training Amplifies Confident Hallucinations in Language Models
- 2026State Rank Dynamics in Linear Attention LLMs
- 2026Lexical Perturbations Disrupt LLM Reasoning: An Empirical Study of Attention Diversion