Abstract
Probabilistic classifiers output a probability distribution on target classes rather than just a class prediction. Besides providing a clear separation of prediction and decision making, the main advantage of probabilistic models is their ability to represent uncertainty about predictions. In safety-critical applications, it is pivotal for a model to possess an adequate sense of uncertainty, which for probabilistic classifiers translates into outputting probability distributions that are consistent with the empirical frequencies observed from realized outcomes. A classifier with such a property is called calibrated. In this work, we develop a general theoretical calibration evaluation framework grounded in probability theory, and point out subtleties present in model calibration evaluation that lead to refined interpretations of existing evaluation techniques. Lastly, we propose new ways to quantify and visualize miscalibration in probabilistic classification, including novel multidimensional reliability diagrams.
Introduction
In safety-critical machine learning—such as autonomous driving or medical diagnosis—it is insufficient for a model to be merely accurate; it must also be "calibrated." A calibrated model’s predicted probabilities should reflect real-world frequencies. For instance, if a model predicts a 70% chance of a pedestrian, a pedestrian should actually appear 70% of the time in such cases.
Most existing research focuses on top-label calibration, which only assesses the model's confidence in its winning class. However, this is often insufficient for complex decision-making. For an autonomous car, the difference between a 10% probability of a "pedestrian" versus a 10% probability of an "animal" matters immensely, even if the top prediction is "empty road" at 80%. This research addresses the lack of theoretical and visualization tools for evaluating this full multiclass uncertainty.
Theoretical Framework and Methodology
The authors introduce several novel contributions to the calibration toolbox to move beyond simple scalar metrics:
- General Theoretical Framework: Calibration is defined through "calibration functions" and "lenses," allowing researchers to analyze specific aspects of a model (like marginal probabilities or top-k predictions) within a unified mathematical structure.
- Multidimensional Reliability Diagrams: While standard reliability diagrams are 1D plots, the authors propose using the probability simplex. In a 3-class setting, this is represented as a triangle where arrows visualize the "drift" or deviation of the model's predictions from actual observed frequencies.
- Consistency Resampling: To account for noise in empirical estimates, a bootstrapping technique is used to calculate a p-value for the hypothesis that a model is perfectly calibrated, providing more statistical rigor than the standard Expected Calibration Error (ECE).
- Data-Dependent Binning: The framework advocates for binning schemes that adapt to data distribution, ensuring faster convergence and more accurate estimates than traditional equal-sized bins.
Experimental Evaluation and Results
The framework was validated using analytical toy models, MNIST, and CIFAR-10 across various architectures including LeNet, ResNet, and DenseNet.
Visualization of Miscalibration
The multidimensional diagrams provide a granular view of where a model fails. For a LeNet model on CIFAR-10, the diagrams reveal that while the model may be well-calibrated in high-density regions (where it is very certain), it shows significant "drift" arrows in regions of lower certainty. This indicates that the model's secondary class probabilities are often poorly estimated.
The Limitations of ECE
A key insight of the paper is the "Lower Bound Trap." The authors prove that calculating ECE with a fixed number of bins systematically underestimates miscalibration. As more data is collected, a fixed-bin ECE may erroneously suggest the model is improving. Furthermore, comparing two models solely on ECE is often misleading; a model with a higher ECE might actually be more statistically calibrated (higher p-value) once accounting for estimator variance.
Discussion and Future Work
While the proposed multidimensional diagrams are highly effective for 3 or 4 classes, visualizing high-dimensional simplexes for datasets like ImageNet remains a challenge. The authors suggest using "lenses" to focus on subsets of classes as a workaround. Future work will focus on establishing formal rates of convergence for different binning methods and reducing the computational overhead of consistency resampling to make these rigorous statistical tools more accessible for standard model evaluation pipelines.
Summary updated