Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Efficient Hallucination Detection for LLMs Using Uncertainty-Aware Attention Heads

About

While large language models (LLMs) have become highly capable, they remain prone to factual inaccuracies, commonly referred to as "hallucinations." Uncertainty quantification (UQ) offers a promising way to mitigate this issue, but most existing methods are computationally intensive and/or require supervision. In this work, we propose Recurrent Attention-based Uncertainty Quantification (RAUQ), an unsupervised and efficient framework for identifying hallucinations. The method leverages an observation about transformer attention behavior: when incorrect information is generated, certain "uncertainty-aware" attention heads tend to reduce their focus on preceding tokens. RAUQ automatically detects these attention heads and combines their activation patterns with token-level confidence measures in a recurrent scheme, producing a sequence-level uncertainty estimate in just a single forward pass. Through experiments on twelve datasets spanning question answering, summarization, and translation across nine different LLMs, we show that RAUQ consistently outperforms state-of-the-art UQ baselines. Importantly, it incurs minimal overhead, requiring less than 1\% additional computation. Since it requires neither labeled data nor extensive parameter tuning, RAUQ serves as a lightweight, plug-and-play solution for real-time hallucination detection in white-box LLMs.

Artem Vazhentsev, Lyudmila Rvanova, Gleb Kuzmin, Ekaterina Fadeeva, Ivan Lazichny, Alexander Panchenko, Maxim Panov, Mrinmaya Sachan, Preslav Nakov, Timothy Baldwin, Artem Shelmanov• 2025

Related benchmarks

TaskDatasetResultRank
Hallucination DetectionTriviaQA--
625
Machine TranslationMT
Mean PRR49.5
109
Question AnsweringQA
Mean PRR42.5
109
SummarizationSumm.
Mean PRR0.428
109
Hallucination DetectionCoQA
Mean AUROC0.4
107
Claim Verification9-dataset aggregate retrieval-free setting (test)
ROC-AUC63.9
70
Hallucination DetectionSumm.
ROC-AUC81.5
64
Hallucination DetectionMT
ROC-AUC72.7
64
Hallucination DetectionQA
ROC-AUC75.2
64
Hallucination DetectionMMLU--
62
Showing 10 of 41 rows

Other info

Follow for update