Semantic Token Clustering for Efficient Uncertainty Quantification in Large Language Models

arXiv cs.CL / 3/23/2026

💬 OpinionIdeas & Deep AnalysisModels & Research

Key Points

  • Introducing Semantic Token Clustering (STC), a method for efficient uncertainty quantification in large language models that avoids repeated sampling or auxiliary models.
  • STC clusters tokens into semantically coherent groups using embedding clustering and prefix matching, then measures uncertainty by the probability mass over these clusters.
  • The method requires only a single generation and matches state-of-the-art baselines while substantially reducing computational overhead.
  • By improving reliability without heavy compute, STC could make LLM outputs more trustworthy for practical deployments.

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.

Semantic Token Clustering for Efficient Uncertainty Quantification in Large Language Models | AI Navigate