NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Measuring Uncertainty Calibration

Kamil Ciosek, Nicolò Felicioni, Sina Ghiassian, Juan Elenter Litwin, Francesco Tonolini, David Gustaffson, Eva Garcia Martin, Carmen Barcena Gonzales, Raphaëlle Bertrand-Lalo · DOI

Introduction

In modern machine learning, a model's "confidence" is often as important as its accuracy. When a medical AI predicts a 99% probability of a specific diagnosis, or a self-driving car estimates a 90% chance that a path is clear, we rely on those probabilities to be calibrated. A model is perfectly calibrated if, for all instances where it predicts a 70% probability of an event, that event occurs exactly 70% of the time.

Despite its importance, measuring calibration is notoriously difficult. Because we only observe binary outcomes (e.g., it rained or it didn't), we cannot directly observe the true underlying probability. This paper introduces a mathematically rigorous framework to move beyond unreliable heuristics toward certified, distribution-free, and non-asymptotic upper bounds on the $L_1$ expected calibration error (ECE).

The Problem with Heuristic Calibration

Traditionally, researchers have relied on bucketing (or binning) to estimate ECE. This involves grouping predictions into bins (e.g., [0.6, 0.7]) and comparing the average prediction to the actual accuracy within that bin. However, bucketing is a heuristic prone to significant error: the results change depending on how many bins are used or where the boundaries are drawn.

Furthermore, while some statistical tests can determine if a model is miscalibrated, they often fail to quantify the magnitude of that miscalibration in a way that is valid for small samples or arbitrary data distributions. This paper addresses these gaps by providing "certified" bounds that do not rely on large-sample assumptions or specific data distributions.

Methods: Certified Bounds through Structural Assumptions

The authors propose that by making specific structural assumptions about the calibration function $\eta(s)$, one can derive rigorous upper bounds. They explore three primary regimes of smoothness:

Visualizing the three structural assumptions used to derive certified calibration bounds: Lipschitz smoothness, bounded variation, and bounded derivatives.

1. Total Variation (TV) Denoising

If we assume the calibration function has bounded variation—meaning it doesn't fluctuate infinitely—we can apply Total Variation denoising. This technique creates a surrogate function that allows for a distribution-free upper bound. This is particularly useful for weak structural assumptions, such as assuming a model is generally more accurate when its confidence score is higher (monotonicity).

2. Enforced Smoothness via Perturbation

The paper's most significant contribution is the concept of "smoothness-by-design." If a model's output is not smooth enough to measure easily, the authors propose making it smooth. By adding a small amount of specific noise (using a hyperbolic secant kernel) to the model's output scores at inference time, they guarantee that the resulting calibration function is twice differentiable with bounded derivatives.

This guaranteed smoothness allows the use of a Nadaraya-Watson (NW) kernel estimator. Because the derivatives are bounded by design, the authors can calculate a much tighter certified bound on the ECE than previously possible, without needing to guess the underlying properties of the model.

Experimental Results

The researchers evaluated these methods across synthetic datasets (with known ground-truth calibration) and real-world benchmarks in NLP (IMDb, Spam Detection), Vision (CIFAR-10), and Security (Phishing detection).

Performance Preservation

A critical concern with perturbing model outputs is the potential loss of classification accuracy. However, the experiments demonstrated that the "smoothness-by-design" approach is highly practical. As shown in the Spam Detection task, small perturbation sizes ($h = 2^{-6}$) resulted in virtually no degradation in the Area Under the Receiver Operating Characteristic (AUROC) curve.

Impact of perturbation size $h$ on model performance (AUROC) for Spam Detection. Small perturbations maintain high performance while enabling certified calibration bounds.

Tightness and Scalability

The NW kernel-based approach provided the tightest bounds, significantly outperforming both TV denoising and traditional Lipschitz bucketing. The experimental results confirmed theoretical convergence rates; as more data is collected, the gap between the certified bound and the true error shrinks at a predictable rate (specifically $n^{-1/3}$ for the NW method).

From a practical standpoint, the algorithms are highly efficient. On a standard virtual machine, the methods can process datasets of up to 10 million samples in approximately four minutes, making them suitable for large-scale production monitoring.

Conclusion

This work represents a shift from heuristic "best guesses" of model confidence to mathematically certified guarantees. The authors provide a clear hierarchy for practitioners: if you can perturb your model's outputs at inference time, use the kernel-based bound for the tightest results. If the outputs must remain untouched, assume bounded variation and utilize the TV-denoising approach. While measuring calibration with extreme precision still requires large datasets, these certified bounds provide the first reliable way to quantify the "honesty" of machine learning models.

Summary updated

BibTeX
@inproceedings{ciosek2026measuring,
  author = {Kamil Ciosek and Nicolò Felicioni and Sina Ghiassian and Juan Elenter Litwin and Francesco Tonolini and David Gustaffson and Eva Garcia Martin and Carmen Barcena Gonzales and Raphaëlle Bertrand-Lalo},
  title = {{Measuring Uncertainty Calibration}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=4AjfwNnWAV},
}
Figure