Lune

ICML2026Top-tier venue

Gradients with Respect to Semantics Preserving Embeddings Tell the Uncertainty of Large Language Model

Mingda Li, Rundong Lv, Xinyu Li, Weinan Zhang, Ting Liu

Abstract

Uncertainty quantification (UQ) is an important technique for ensuring the trustworthiness of LLMs, given their tendency to hallucinate. Existing state-of-the-art UQ approaches for free-form generation rely heavily on sampling, which incurs high computational cost and variance. In this work, we propose the first gradient-based UQ method for free-form generation, SemGrad, which is sampling-free and computationally efficient. Unlike prior gradient-based methods developed for classification tasks that operates in parameter space, we propose to consider gradients in semantic space. Our method builds on the key intuition that a confident LLM should maintain stable output distributions under semantically equivalent input perturbations. We interpret the stability as the gradients in semantic space and introduce a Semantic Preservation Score (SPS) to identify embeddings that best capture semantics, with respect to which gradients are computed. We further propose HybridGrad, which combines the strengths of SemGrad and parameter gradients. Experiments demonstrate that both of our methods provide efficient and effective uncertainty estimates, achieving superior performance than state-of-the-art methods, particularly in settings with multiple valid responses.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • INSIDE: LLMs' Internal States Retain the Power of Hallucination Detection cites Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • INSIDE: LLMs' Internal States Retain the Power of Hallucination Detection cites Uncertainty Estimation in Autoregressive Structured Prediction
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on15

  1. TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 citations
  2. Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le et al.ICLR 2023 · 681 citations
  3. Uncertainty Estimation in Autoregressive Structured PredictionAndrey Malinin, Mark J. F. GalesICLR 2021 · 439 citations
  4. INSIDE: LLMs' Internal States Retain the Power of Hallucination DetectionChao Chen, Kai Liu, Ze Chen, Yi Gu et al.ICLR 2024 · 281 citations
  5. FActScore: Fine-grained Atomic Evaluation of Factual Precision in Long Form Text GenerationSewon Min, Kalpesh Krishna, Xinxi Lyu, Mike Lewis et al.EMNLP 2023 · 225 citations

Related papers

  1. Probabilities Are All You Need: A Probability-Only Approach to Uncertainty Estimation in Large Language ModelsManh Nguyen, Sunil Gupta, Hung LeAAAI 2026 · 4 citations
  2. Sampling-Free Uncertainty Quantification via Hidden State Dynamics in Language ModelsYixin Bu, Guanyun Zou, Renzhi Wang, Runze Xia et al.AAAI 2026 · 2 citations
  3. Semantic Density: Uncertainty Quantification for Large Language Models through Confidence Measurement in Semantic SpaceXin Qiu, Risto MiikkulainenNeurIPS 2024
  4. Kernel Language Entropy: Fine-grained Uncertainty Quantification for LLMs from Semantic SimilaritiesAlexander Nikitin, Jannik Kossen, Yarin Gal, Pekka MarttinenNeurIPS 2024 · 197 citations
  5. Semantic Volume: Quantifying and Detecting Both External and Internal Uncertainty in LLMsXiaomin Li, Zhou Yu, Ziji Zhang, Yingying Zhuang et al.AAAI 2026 · 11 citations
Dusk over the sea between two cliffs drawn in fine vertical lines