How Flawed Is ECE? An Analysis via Logit Smoothing
Muthu Chidambaram, Holden Lee, Colin McSwiggen, Semon Rezchikov
TL;DR
Calibration requires predicted probabilities to match true frequencies; this work rigorously analyzes the canonical measure \\(\mathrm{ECE}\\), showing it is lower semicontinuous on general probability spaces and characterizing its discontinuities, with a precise criterion in the general Polish-space setting. It introduces \\(\mathrm{LS}\text{-}\mathrm{ECE}\\), a logit-smoothed, continuous analogue defined by \\(\mathrm{LS}\text{-}\mathrm{ECE}_{\pi,\xi}(h) = \mathbb{E}_{X,\xi}[|\mathbb{E}[Y \mid \rho(h(X)+\xi)] - \rho(h(X)+\xi)|]\\, and proves its continuity in \\(h\\) under mild conditions; it also provides a consistent estimator based on kernel-like regression of \\mathbb{E}[Y|T=t] \\) where \\(T=\rho(h(X)+\xi)\\). The experiments on CIFAR-10/100 and ImageNet show \\(\mathrm{ECE}\\) and \\(\mathrm{LS}\text{-}\mathrm{ECE}\\) take near-identical values across models and bin settings, suggesting the practical impact of \\(\mathrm{ECE}\\) pathologies may be small in real-world settings and that LS-ECE is a robust sanity-check tool. Overall, the paper provides a rigorous, general framework for understanding calibration discontinuities and offers a practical, estimable alternative that aligns with standard practice in large-scale benchmarks.
Abstract
Informally, a model is calibrated if its predictions are correct with a probability that matches the confidence of the prediction. By far the most common method in the literature for measuring calibration is the expected calibration error (ECE). Recent work, however, has pointed out drawbacks of ECE, such as the fact that it is discontinuous in the space of predictors. In this work, we ask: how fundamental are these issues, and what are their impacts on existing results? Towards this end, we completely characterize the discontinuities of ECE with respect to general probability measures on Polish spaces. We then use the nature of these discontinuities to motivate a novel continuous, easily estimated miscalibration metric, which we term Logit-Smoothed ECE (LS-ECE). By comparing the ECE and LS-ECE of pre-trained image classification models, we show in initial experiments that binned ECE closely tracks LS-ECE, indicating that the theoretical pathologies of ECE may be avoidable in practice.
