Semantic Token Clustering for Efficient Uncertainty Quantification in Large Language Models

2026-03-20Computation and Language

Computation and LanguageArtificial IntelligenceMachine Learning
AI summary

The authors present a new way to measure how unsure large language models (LLMs) are about their answers. Instead of running multiple tests or using extra tools, their method groups similar words together based on meaning and checks the combined confidence. This approach only needs one run of the model, making it faster but still as good as existing methods. It helps spot potentially unreliable answers more efficiently.

large language modelsuncertainty quantificationsemantic clusteringtoken embeddingsprobability masscomputational overheadprefix matchingmodel confidence
Authors
Qi Cao, Andrew Gambardella, Takeshi Kojima, Yutaka Matsuo, Yusuke Iwasawa
Abstract
Large language models (LLMs) have demonstrated remarkable capabilities across diverse tasks. However, the truthfulness of their outputs is not guaranteed, and their tendency toward overconfidence further limits reliability. Uncertainty quantification offers a promising way to identify potentially unreliable outputs, but most existing methods rely on repeated sampling or auxiliary models, introducing substantial computational overhead. To address these limitations, we propose Semantic Token Clustering (STC), an efficient uncertainty quantification method that leverages the semantic information inherently encoded in LLMs. Specifically, we group tokens into semantically consistent clusters using embedding clustering and prefix matching, and quantify uncertainty based on the probability mass aggregated over the corresponding semantic cluster. Our approach requires only a single generation and does not depend on auxiliary models. Experimental results show that STC achieves performance comparable to state-of-the-art baselines while substantially reducing computational overhead.