Table of Contents
Fetching ...

ESI: Epistemic Uncertainty Quantification via Semantic-preserving Intervention for Large Language Models

Mingda Li, Xinyu Li, Weinan Zhang, Longxuan Ma

TL;DR

ESI introduces a causal-invariance framework for estimating epistemic uncertainty in LLMs by measuring output changes under semantic-preserving interventions to prompts. It defines a principled UQ score using invariance of token-predictive distributions, justified by a ground-truth language model that remains stable under semantic-preserving edits and approximated via an Expected Pairwise KL-Divergence proxy (EPKL). Empirically, ESI (with Paraphrase or Skip-One-Char interventions) outperforms state-of-the-art baselines on multiple QA datasets and models, while delivering substantial runtime efficiency and requiring fewer samples. The work offers a practical, scalable approach to improving LLM reliability and provides a causal-invariance perspective for UQ in free-form generation.

Abstract

Uncertainty Quantification (UQ) is a promising approach to improve model reliability, yet quantifying the uncertainty of Large Language Models (LLMs) is non-trivial. In this work, we establish a connection between the uncertainty of LLMs and their invariance under semantic-preserving intervention from a causal perspective. Building on this foundation, we propose a novel grey-box uncertainty quantification method that measures the variation in model outputs before and after the semantic-preserving intervention. Through theoretical justification, we show that our method provides an effective estimate of epistemic uncertainty. Our extensive experiments, conducted across various LLMs and a variety of question-answering (QA) datasets, demonstrate that our method excels not only in terms of effectiveness but also in computational efficiency.

ESI: Epistemic Uncertainty Quantification via Semantic-preserving Intervention for Large Language Models

TL;DR

ESI introduces a causal-invariance framework for estimating epistemic uncertainty in LLMs by measuring output changes under semantic-preserving interventions to prompts. It defines a principled UQ score using invariance of token-predictive distributions, justified by a ground-truth language model that remains stable under semantic-preserving edits and approximated via an Expected Pairwise KL-Divergence proxy (EPKL). Empirically, ESI (with Paraphrase or Skip-One-Char interventions) outperforms state-of-the-art baselines on multiple QA datasets and models, while delivering substantial runtime efficiency and requiring fewer samples. The work offers a practical, scalable approach to improving LLM reliability and provides a causal-invariance perspective for UQ in free-form generation.

Abstract

Uncertainty Quantification (UQ) is a promising approach to improve model reliability, yet quantifying the uncertainty of Large Language Models (LLMs) is non-trivial. In this work, we establish a connection between the uncertainty of LLMs and their invariance under semantic-preserving intervention from a causal perspective. Building on this foundation, we propose a novel grey-box uncertainty quantification method that measures the variation in model outputs before and after the semantic-preserving intervention. Through theoretical justification, we show that our method provides an effective estimate of epistemic uncertainty. Our extensive experiments, conducted across various LLMs and a variety of question-answering (QA) datasets, demonstrate that our method excels not only in terms of effectiveness but also in computational efficiency.
Paper Structure (31 sections, 13 equations, 6 figures, 8 tables)

This paper contains 31 sections, 13 equations, 6 figures, 8 tables.

Figures (6)

  • Figure 1: Illustration of our proposed ESI approach and existing uncertainty quantification methods. The term ‘ probs’ refers to the predictive distributions generated by LLMs. The little hammer refers to the semantic-preserving intervention.
  • Figure 2: The graphical causal model of the data generating process of a text pair: context $C$ and response $R$.
  • Figure 3: AUROC performance of UQ methods with different sample sizes. Our methods need fewer samples to achieve comparable performance. For ESI, the sample size corresponds to the number of intervened variants, while for baseline methods, it refers to the number of sampled generations.
  • Figure 4: (a) AUROC performance of UQ methods with different intervention functions. ‘ SOTA’ refers to the SOTA baseline, SAR. ‘ WeakPara’ represents paraphrasing with a smaller model, Llama3-Instruct8B. ‘ Typo’ is similar to SOC, but replaces the selected character with a random one rather than skipping it. ‘ Antonym’ indicates randomly replacing a word with its antonym. (b) AUROC performance of ESI (Para) with varying top-$k$ values using Llama3-Instruct8B. The red dashed line represents the SOTA baseline performance.
  • Figure 5: Performance of ESI and baseline methods with varying correctness metric threshold, with higher thresholds indicating more strict correctness criteria
  • ...and 1 more figures