Improving the Calibration of Confidence Scores in Text Generation Using the Output Distribution's Characteristics

Lorenzo Jaime Yu Flores, Ori Ernst, Jackie Chi Kit CheungarXiv 2025 · DOI

Introduction

In machine learning, calibration is the degree to which a model’s predicted confidence aligns with its actual accuracy. While well-understood for classification tasks, calibration remains a significant challenge in Natural Language Generation (NLG). This paper addresses the "bad at knowing what they don't know" problem in AI models by introducing two new metrics—Ratio and Tail Thinness—that leverage the entire output distribution to provide more reliable confidence scores.

The Calibration Challenge in NLG

Traditional confidence metrics often rely on the probability of the single highest-ranked sequence. In classification, this works well. However, in NLG tasks like translation or summarization, there are often multiple valid ways to phrase a correct answer. A model might be highly certain of the general meaning but distribute its probability across several synonymous sequences.

Comparison of confidence in classification versus generation tasks. In generation, a spread of probability across multiple valid sequences should not necessarily imply low confidence.

As shown above, a standard metric might incorrectly flag a model as "uncertain" simply because the top choice's probability is diluted by other equally good candidates. This discrepancy makes it difficult to use confidence scores for critical tasks, such as determining when human intervention is required.

Proposed Metrics: Ratio and Tail Thinness

The authors propose two task-agnostic methods that analyze the characteristics of the "beam" (the set of candidate sequences generated during inference):

  1. The Ratio Method: This calculates the probability ratio between the top-ranked sequence and an "average" sequence (the $k$-th ranked beam). A confident model will show a sharp drop-off between high-quality and average sequences.
  2. Tail Thinness: This metric sums the squared probabilities of the top $N$ sequences. A higher value indicates a "thinner tail," signifying that the model has concentrated its probability on a small set of likely candidates while assigning negligible probability to the rest.

Key Insights: Distribution Shape

A core finding of this research is that a confident model’s output distribution possesses two distinct characteristics: a steep initial slope and a long, thin tail.

The characteristics of a well-calibrated output distribution: a steep slope distinguishing good from mediocre sequences, and a long tail for poor-quality outputs.

By focusing on these structural properties, the proposed metrics are robust to paraphrasing. They do not penalize a model for being "unsure" between two valid paraphrases, as both would reside at the top of the steep slope, separate from the "tail" of ungrammatical or incorrect sequences.

Experimental Results

The methods were evaluated using BART-Base and Flan-T5-Base across translation (WMT, FLORES), question answering (SQuAD, HotpotQA), and summarization (XSUM, CNN-DailyMail) datasets.

  • Performance: The proposed metrics outperformed standard baselines like Average Token Probability (ATP) in the majority of tests. Tail Thinness was the top performer in 10 out of 16 model-dataset pairs.
  • Correlation Gains: In translation and QA, the authors observed improvements in Spearman correlation (matching confidence to quality metrics like BLEU or F1) of up to +17.2%.
  • Versatility: While summarization remains challenging due to its open-ended nature, these metrics consistently maintained higher median ranks than traditional approaches.

Conclusion and Future Work

By looking beyond the top-1 probability, the Ratio and Tail Thinness methods significantly improve the calibration of NLG models. While computationally more intensive—requiring the generation of multiple beams—they offer a more nuanced understanding of model certainty. Future research will focus on optimizing these calculations to reduce inference overhead while maintaining the accuracy of the confidence estimates.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
WMT DE-ENRatioSpearman correlation (absolute value) with BLEU quality score0.653split: test
Source quote
L274: Ratio │ 0.546 │ 0.200 │ 0.653 │ 0.209 │ 0.768 │ 0.491 │ 0.249 │ 0.360 │ 0.505 │ 0.565 │ 0.496 │ 0.293 │ 0.596 │ 0.304 │ 0.103 │ 0.055 │ 0.082 │ 0.196
WMT DE-ENSum Top KSpearman correlation (absolute value) with BLEU quality score0.165split: test
Source quote
L277: Sum Top K │ 0.516 │ 0.495 │ 0.165 │ 0.285 │ 0.603 │ 0.058 │ 0.103 │ 0.144 │ 0.133 │ 0.006 │ 0.490 │ 0.253 │ 0.616 │ 0.575 │ 0.106 │ 0.162 │ 0.120 │ 0.063
HotpotQATailSpearman correlation (absolute value) with F1 quality score0.451split: test
Source quote
L273: \parbox[t]{4mm}{\multirow{2}{*}{\rotatebox[origin=c]{90}{Ours}}} │ Tail │ 0.649 │ 0.380 │ 0.648 │ 0.190 │ 0.779 │ 0.506 │ 0.255 │ 0.451 │ 0.494 │ 0.582 │ 0.518 │ 0.354 │ 0.601 │ 0.300 │ 0.100 │ 0.031 │ 0.131 │ 0.212
HotpotQASum Top KSpearman correlation (absolute value) with F1 quality score0.144split: test
Source quote
L277: Sum Top K │ 0.516 │ 0.495 │ 0.165 │ 0.285 │ 0.603 │ 0.058 │ 0.103 │ 0.144 │ 0.133 │ 0.006 │ 0.490 │ 0.253 │ 0.616 │ 0.575 │ 0.106 │ 0.162 │ 0.120 │ 0.063
DebateSummTailSpearman correlation (absolute value) with RougeL quality score0.518split: test
Source quote
L273: \parbox[t]{4mm}{\multirow{2}{*}{\rotatebox[origin=c]{90}{Ours}}} │ Tail │ 0.649 │ 0.380 │ 0.648 │ 0.190 │ 0.779 │ 0.506 │ 0.255 │ 0.451 │ 0.494 │ 0.582 │ 0.518 │ 0.354 │ 0.601 │ 0.300 │ 0.100 │ 0.031 │ 0.131 │ 0.212
DebateSummSum Top KSpearman correlation (absolute value) with RougeL quality score0.490split: test
Source quote
L277: Sum Top K │ 0.516 │ 0.495 │ 0.165 │ 0.285 │ 0.603 │ 0.058 │ 0.103 │ 0.144 │ 0.133 │ 0.006 │ 0.490 │ 0.253 │ 0.616 │ 0.575 │ 0.106 │ 0.162 │ 0.120 │ 0.063
BibTeX
@misc{flores2025improving,
  author = {Lorenzo Jaime Yu Flores and Ori Ernst and Jackie Chi Kit Cheung},
  title = {{Improving the Calibration of Confidence Scores in Text Generation Using the Output Distribution's Characteristics}},
  year = {2025},
  eprint = {2506.00637},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.00637},
}
Figure