Table of Contents
Fetching ...

Efficient semantic uncertainty quantification in language models via diversity-steered sampling

Ji Won Park, Kyunghyun Cho

TL;DR

This paper tackles semantic uncertainty in open-ended language generation by treating semantic clusters as the basis for aleatoric and epistemic uncertainty in free-form QA. It introduces diversity-steered sampling, a gradient-free approach that injects a semantic entailment-based penalty into decoding for both autoregressive and masked-diffusion models, guided by a minimally finetuned NLI on partial sequences. To yield unbiased uncertainty estimates, the method uses importance weighting and further reduces variance with adaptive control variates, demonstrating improved semantic coverage and competitive AUROC across four QA benchmarks. The framework is modular, gradient-free, and deployable as a drop-in enhancement for risk-sensitive applications.

Abstract

Accurately estimating semantic aleatoric and epistemic uncertainties in large language models (LLMs) is particularly challenging in free-form question answering (QA), where obtaining stable estimates often requires many expensive generations. We introduce a diversity-steered sampler that discourages semantically redundant outputs during decoding, covers both autoregressive and masked diffusion paradigms, and yields substantial sample-efficiency gains. The key idea is to inject a continuous semantic-similarity penalty into the model's proposal distribution using a natural language inference (NLI) model lightly finetuned on partial prefixes or intermediate diffusion states. We debias downstream uncertainty estimates with importance reweighting and shrink their variance with control variates. Across four QA benchmarks, our method matches or surpasses baselines while covering more semantic clusters with the same number of samples. Being modular and requiring no gradient access to the base LLM, the framework promises to serve as a drop-in enhancement for uncertainty estimation in risk-sensitive model deployments.

Efficient semantic uncertainty quantification in language models via diversity-steered sampling

TL;DR

This paper tackles semantic uncertainty in open-ended language generation by treating semantic clusters as the basis for aleatoric and epistemic uncertainty in free-form QA. It introduces diversity-steered sampling, a gradient-free approach that injects a semantic entailment-based penalty into decoding for both autoregressive and masked-diffusion models, guided by a minimally finetuned NLI on partial sequences. To yield unbiased uncertainty estimates, the method uses importance weighting and further reduces variance with adaptive control variates, demonstrating improved semantic coverage and competitive AUROC across four QA benchmarks. The framework is modular, gradient-free, and deployable as a drop-in enhancement for risk-sensitive applications.

Abstract

Accurately estimating semantic aleatoric and epistemic uncertainties in large language models (LLMs) is particularly challenging in free-form question answering (QA), where obtaining stable estimates often requires many expensive generations. We introduce a diversity-steered sampler that discourages semantically redundant outputs during decoding, covers both autoregressive and masked diffusion paradigms, and yields substantial sample-efficiency gains. The key idea is to inject a continuous semantic-similarity penalty into the model's proposal distribution using a natural language inference (NLI) model lightly finetuned on partial prefixes or intermediate diffusion states. We debias downstream uncertainty estimates with importance reweighting and shrink their variance with control variates. Across four QA benchmarks, our method matches or surpasses baselines while covering more semantic clusters with the same number of samples. Being modular and requiring no gradient access to the base LLM, the framework promises to serve as a drop-in enhancement for uncertainty estimation in risk-sensitive model deployments.
Paper Structure (40 sections, 29 equations, 7 figures, 2 tables, 2 algorithms)

This paper contains 40 sections, 29 equations, 7 figures, 2 tables, 2 algorithms.

Figures (7)

  • Figure 1: Our sampling workflow illustrated with a prompt that induces high aleatoric uncertainty. Given previous generations, we guide the LLM's next token away from semantically redundant outputs. The semantic clusters of resulting generations are used to estimate downstream uncertainty.
  • Figure 2: Predictions of the finetuned NLI at each truncated point of the hypothesis, on two examples from the GLUE MNLI validation_matched split wang2018glue.
  • Figure 3: Predictions of the finetuned NLI at each masking percentage of the hypothesis, on two examples from the GLUE MNLI validation_matched split wang2018glue.
  • Figure 4: Number of semantic clusters captured by various sampling schemes on the CoQA dataset.
  • Figure 5: Distributions of entailment probability predicted by the finetuned NLI on the GLUE MNLI validation_matched dataset when (a) truncating or (b) masking all but one token of the hypothesis. Both distributions are peaked at the "random guess" probability of $1/3$.
  • ...and 2 more figures