TokUR: Token-Level Uncertainty Estimation for Large Language Mode Reasoning

Tunyu Zhang, Haizhou Shi, Yibin Wang, Hengyi Wang, Xiaoxiao He, Zhuowei Li, Haoxian Chen, Ligong Han, Kai Xu, Huan Zhang, Dimitris N. Metaxas, Hao Wang

TL;DR

This paper introduces TokUR, a novel framework for estimating uncertainty at the token level within Large Language Models (LLMs) during complex reasoning tasks. By leveraging low-rank weight perturbations, TokUR allows LLMs to self-assess the reliability of their generated responses, leading to improved accuracy and robustness in mathematical reasoning.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown remarkable capabilities, but their outputs can be inconsistent, especially in multi-step reasoning tasks. A significant challenge is that LLMs often fail to indicate when their generated responses are incorrect or uncertain, making it difficult to trust their outputs in critical applications. Existing methods for uncertainty estimation in LLMs often focus on simpler tasks like classification or short-form question answering. For complex, long-form generation like mathematical reasoning, these methods struggle to accurately capture response-specific uncertainty, hindering the deployment of LLMs in high-stakes scenarios.

Methods

The core innovation of TokUR is its Token-Level Uncertainty Estimation approach. Instead of relying on overall confidence scores or external signals, TokUR estimates uncertainty at the individual token level during the LLM's generation process. This is achieved through a low-rank random weight perturbation technique.

Here's a breakdown:

  • Bayesian Framework: TokUR casts the LLM into a Bayesian framework by introducing perturbations to its weights.
  • Low-Rank Adaptation (LoRA): It leverages LoRA's efficiency by applying perturbations to a low-rank subspace of the weight matrices. This avoids costly full Bayesian updates.
  • Weight Perturbation: Instead of retraining, TokUR perturbs the weights of attention layers using low-rank noise. This creates an ensemble of model variants without significant computational overhead.
  • Token-Level Uncertainty: The generated probability distributions for each token are analyzed to derive three types of uncertainty:
  • Total Uncertainty (TU): The overall entropy of the token's prediction.
  • Aleatoric Uncertainty (AU): The inherent randomness in the data.
  • Epistemic Uncertainty (EU): The model's uncertainty about its own parameters.
  • Response-Level Aggregation: These token-level uncertainties are then aggregated (summed) to form a response-level uncertainty score for the entire generated sequence. This aggregation is theoretically shown to be an unbiased estimator of query-level uncertainty.

Datasets

The paper evaluates TokUR on several mathematical reasoning datasets:

  • GSM8K: A dataset of grade-school arithmetic problems.
  • MATH500: A subset of challenging high school/college mathematics competition problems.
  • DeepScaleR: A 5,000-example subset of high-difficulty problems from diverse sources.

These datasets are chosen for their multi-step reasoning requirements, making them suitable for evaluating long-form generation and uncertainty estimation.

Key Insights and Ideas

  • Token-level uncertainty is crucial for reasoning: Unlike previous methods that focused on overall response confidence, TokUR's token-level approach can pinpoint specific points of failure within a reasoning chain.
  • Epistemic uncertainty as a strong indicator of incorrect paths: The paper finds that epistemic uncertainty is particularly effective at identifying incorrect reasoning steps, outperforming other metrics.
  • Low-rank perturbation is efficient and effective: The use of low-rank weight perturbations allows for principled uncertainty estimation without the need for extensive retraining or full Bayesian inference, making it practical for LLMs.
  • Uncertainty can guide generation: TokUR's uncertainty signals can be used to improve LLM performance by detecting incorrect paths, selecting high-quality solutions from multiple candidates, and even guiding the generation process itself.

Key Results

  • Improved Incorrect Reasoning Path Detection: TokUR consistently outperforms various baseline methods in detecting incorrect reasoning paths across multiple datasets, achieving state-of-the-art AUROC and AUPRC scores. For instance, on MATH500 with Llama-3.2-1B-Instruct, TokUR (TU) achieved an AUROC of 80.64% and AUPRC of 56.79%.
  • Enhanced Test-Time Scaling: When used for test-time scaling (i.e., improving performance by sampling multiple responses and selecting the best), TokUR-based methods show significant gains, especially in low-sample regimes. TokUR (EU) achieved the best overall performance on GSM8K and MATH500 in this setting.
  • Correlation with Difficulty: TokUR's uncertainty estimates positively correlate with question difficulty, with incorrect responses consistently exhibiting higher uncertainty.
  • Robustness to Decoding Temperature: The uncertainty estimates from TokUR are robust to variations in decoding temperature, a key parameter influencing response diversity.

Limitations and Future Work

  • Computational Cost: While more efficient than full Bayesian methods, the repeated sampling of weight perturbations during inference still poses efficiency challenges for real-time applications.
  • Higher-Level Inconsistencies: The current aggregation method might miss higher-level semantic or logical inconsistencies that span across multiple tokens or reasoning steps.
  • High-Variance Estimation: The paper acknowledges that the problem of high-variance estimation in TokUR remains unresolved, which can limit reliability in real-world scenarios.

Future work could focus on addressing these limitations, potentially by exploring more efficient perturbation sampling strategies, developing methods to capture broader logical inconsistencies, and investigating techniques to mitigate estimation variance. The authors also suggest exploring the use of TokUR for other complex generation tasks beyond mathematical reasoning.

Summary updated

BibTeX
@inproceedings{zhang2026tokur,
  author = {Tunyu Zhang and Haizhou Shi and Yibin Wang and Hengyi Wang and Xiaoxiao He and Zhuowei Li and Haoxian Chen and Ligong Han and Kai Xu and Huan Zhang and Dimitris N. Metaxas and Hao Wang},
  title = {{TokUR: Token-Level Uncertainty Estimation for Large Language Mode Reasoning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=VHQc7wzmYv},
}
Figure