Unconditional Truthfulness: Learning Unconditional Uncertainty of Large Language Models
Artem Vazhentsev, Ekaterina Fadeeva, Rui Xing, Gleb Kuzmin, Ivan Lazichny, Alexander Panchenko, Preslav Nakov, Timothy Baldwin, Maxim Panov, Artem Shelmanov
TL;DR
This paper tackles the challenge of uncertainty quantification for autoregressive LLMs by addressing the conditional dependencies between generation steps. It introduces Trainable Attention-based Dependency (TAD), a supervised regression approach that learns unconditional token confidence from attention maps, current generation probabilities, and recurrent uncertainties via a two-stage training procedure. Empirical results across ten datasets and three LLMs show that TAD outperforms a wide range of unsupervised and supervised baselines in selective generation tasks, with strong robustness and cross-domain applicability, particularly in QA and MMLU scenarios. The method maintains practical efficiency, adding only about 5% runtime overhead, making it suitable for deployment in real-time generation safety pipelines; future work includes extending to retrieval-augmented generation and scaling to larger models while addressing supervision requirements.
Abstract
Uncertainty quantification (UQ) has emerged as a promising approach for detecting hallucinations and low-quality output of Large Language Models (LLMs). However, obtaining proper uncertainty scores is complicated by the conditional dependency between the generation steps of an autoregressive LLM because it is hard to model it explicitly. Here, we propose to learn this dependency from attention-based features. In particular, we train a regression model that leverages LLM attention maps, probabilities on the current generation step, and recurrently computed uncertainty scores from previously generated tokens. To incorporate the recurrent features, we also suggest a two-staged training procedure. Our experimental evaluation on ten datasets and three LLMs shows that the proposed method is highly effective for selective generation, achieving substantial improvements over rivaling unsupervised and supervised approaches.
