Lune

EMNLP2024Top-tier venue

Contextualized Sequence Likelihood: Enhanced Confidence Scores for Natural Language Generation

Zhen Lin, Shubhendu Trivedi, Jimeng Sun

Abstract

The advent of large language models (LLMs) has dramatically advanced the state-of-the-art in numerous natural language generation tasks.For LLMs to be applied reliably, it is essential to have an accurate measure of their confidence.Currently, the most commonly used confidence score function is the likelihood of the generated sequence, which, however, conflates semantic and syntactic components.For instance, in question-answering (QA) tasks, an awkward phrasing of the correct answer might result in a lower probability prediction.Additionally, different tokens should be weighted differently depending on the context.In this work, we propose enhancing the predicted sequence probability by assigning different weights to various tokens using attention values elicited from the base LLM.By employing a validation set, we can identify the relevant attention heads, thereby significantly improving the reliability of the vanilla sequence probability confidence measure.We refer to this new score as the Contextualized Sequence Likelihood (CSL).CSL is easy to implement, fast to compute, and offers considerable potential for further improvement with task-specific prompts.Across several QA datasets and a diverse array of LLMs, CSL has demonstrated significantly higher reliability than state-of-the-art baselines in predicting generation quality, as measured by the AUROC or AUARC.* Context *: [ $ context ] [ additional question -answer pairs ]

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.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMs cites Uncertainty Estimation in Autoregressive Structured Prediction
  • Enhancing Uncertainty Estimation in LLMs with Expectation of Aggregated Internal Belief cites Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMs
  • Efficient semantic uncertainty quantification in language models via diversity-steered sampling cites Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMs
  • Efficient semantic uncertainty quantification in language models via diversity-steered sampling cites Uncertainty Estimation in Autoregressive Structured Prediction
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Efficient semantic uncertainty quantification in language models via diversity-steered samplingJi Won Park, Kyunghyun ChoNeurIPS 2025 · 3 citations
  2. User-side Model Consistency Monitoring for Open Source Large Language Models Inference ServicesQijun Miao, Zhixuan FangACL 2025 · 1 citation
  3. Diagnosing Multi-step Reasoning Failures in Black-box LLMs via Stepwise Confidence AttributionXiaoou Liu, Tiejin Chen, Dengjia Zhang, Yaqing Wang et al.ICML 2026 · 1 citation
  4. On LLMs’ Internal Representation of Code CorrectnessFrancisco Ribeiro, Claudio Spiess, Premkumar Devanbu, Sarah NadiICSE 2026
  5. Enhancing Uncertainty Estimation in LLMs with Expectation of Aggregated Internal BeliefZeguan Xiao, Diyang Dou, Boya Xiong, Yun Chen et al.AAAI 2026

Builds on17

  1. Large Language Models Are Zero-Shot Time Series ForecastersNate Gruver, Marc Finzi, Shikai Qiu, Andrew Gordon WilsonNeurIPS 2023 · 898 citations
  2. Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMsMiao Xiong, Zhiyuan Hu, Xinyang Lu, Yifei Li et al.ICLR 2024 · 867 citations
  3. Uncertainty Estimation in Autoregressive Structured PredictionAndrey Malinin, Mark J. F. GalesICLR 2021 · 439 citations
  4. Talk like a Graph: Encoding Graphs for Large Language ModelsBahare Fatemi, Jonathan Halcrow, Bryan PerozziICLR 2024 · 194 citations
  5. Conformal Language ModelingVictor Quach, Adam Fisch, Tal Schuster, Adam Yala et al.ICLR 2024 · 132 citations

Related papers

  1. MARS: Meaning-Aware Response Scoring for Uncertainty Estimation in Generative LLMsYavuz Faruk Bakman, Duygu Nur Yaldiz, Baturalp Buyukates, Chenyang Tao et al.ACL 2024 · 6 citations
  2. Efficient Self-Evaluation for Diffusion Language Models via Sequence RegenerationLinhao Zhong, Linyu Wu, Wen Wang, Yuling Xi et al.ACL 2026
  3. GENUINE: Graph Enhanced Multi-level Uncertainty Estimation for Large Language ModelsTuo Wang, Adithya Kulkarni, Tyler Cody, Peter A. Beling et al.EMNLP Findings 2025 · 1 citation
  4. Shifting Attention to Relevance: Towards the Predictive Uncertainty Quantification of Free-Form Large Language ModelsJinhao Duan, Hao Cheng, Shiqi Wang, Alex Zavalny et al.ACL 2024 · 28 citations
  5. QRelScore: Better Evaluating Generated Questions with Deeper Understanding of Context-aware RelevanceXiaoqiang Wang, Bang Liu, Siliang Tang, Lingfei WuEMNLP 2022 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines