SpanUQ: Span-Level Uncertainty Quantification for Large Language Model Generation

Yimeng Zhang, Yingying Zhuang, Ziyi Wang, Yuxuan Lu, Pei Chen +10 more
7/7/2026
cs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Uncertainty estimation is essential not only for the trustworthy deployment of large language models (LLMs) but also as a foundation for self-refinement in LLM generation. However, existing approaches operate at suboptimal granularities: token-level scores lack semantic coherence, while sequence-level scores fail to localize errors. We formalize Span-Level Uncertainty Estimation (SLUE), a new task that targets the natural granularity for uncertainty: semantically coherent text spans, each conveying a single assessable unit of meaning. To address this task, we introduce SPANUQ, a lightweight probe that distills the uncertainty knowledge from expensive multi-sample inference into a single forward pass over LLM hidden states. SPANUQ employs a DETR-style span decoder to simultaneously detect spans and estimate their uncertainty via a Mixture of Beta distribution, trained with a principled combination of Beta NLL regression and contrastive ranking objectives. We construct SPANUQ-BENCH, the first span-level uncertainty benchmark comprising 20K prompts, 293K annotated spans, and continuous soft labels derived from multi-sample claim verification. Experiments on five LLM backbones show that SPANUQ consistently achieves the best span-level uncertainty quality, outperforming the strongest probe baseline and all sampling-based methods while being 10-20x faster. Its DETR-based span detector attains 0.910 F1, surpassing the best heuristic by 39.4%, enabling precise error localization that sequence-level methods cannot provide. The framework generalizes across five LLMs spanning two model families.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2026spanuq,
  title  = {SpanUQ: Span-Level Uncertainty Quantification for Large Language Model Generation},
  author = {Yimeng Zhang and Yingying Zhuang and Ziyi Wang and Yuxuan Lu and Pei Chen and Aman Gupta and Zhe Su and Ming Tan and Zhilin Zhang and Qun Liu and Manikandarajan Ramanathan and Rajashekar Maragoud and Edward Vul and Jing Huang and Dakuo Wang},
  year   = {2026},
  eprint = {2607.05721},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.05721v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.05721.svg)](https://codeofpaper.com/paper/2607.05721)

Discussion