TL;DR
This paper introduces a simple, efficient method using attention divergence to detect hallucinations in large language models, providing a white-box uncertainty signal without extra sampling.
Contribution
It presents a novel attention divergence-based approach for real-time hallucination detection that is lightweight, interpretable, and effective across various datasets and models.
Findings
Attention divergence predicts answer correctness effectively.
The signal is concentrated in middle layers and on factual tokens.
The method performs competitively with existing uncertainty estimation techniques.
Abstract
We propose a lightweight and single-pass uncertainty quantification method for detecting hallucinations in Large Language Models. The method uses attention matrices to estimate uncertainty without requiring repeated sampling or external models. Specifically, we measure the Kullback-Leibler divergence between each attention head's distribution and a uniform reference distribution, and use these features in a logistic regression probe. Across multiple datasets, task types, and model families, attention divergence is highly predictive of answer correctness and performs competitively with existing uncertainty estimation methods. We find that this signal is concentrated in middle layers and on factual tokens such as named entities and numbers, suggesting that attention dynamics provides an efficient and interpretable white-box signal of model uncertainty.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
