Skip to main content
QUICK REVIEW

[Paper Review] Measuring Calibration in Deep Learning

Jeremy Nixon, Mike Dusenberry|arXiv (Cornell University)|Apr 2, 2019
Adversarial Robustness in Machine LearningComputer Science29 references156 citations
TL;DR

The paper critically analyzes calibration metrics for multiclass classifiers, showing that common measures like ECE can be misleading and proposing alternative metrics (ACE, SCE, GCE) with best-practice recommendations.

ABSTRACT

Overconfidence and underconfidence in machine learning classifiers is measured by calibration: the degree to which the probabilities predicted for each class match the accuracy of the classifier on that prediction. How one measures calibration remains a challenge: expected calibration error, the most popular metric, has numerous flaws which we outline, and there is no clear empirical understanding of how its choices affect conclusions in practice, and what recommendations there are to counteract its flaws. In this paper, we perform a comprehensive empirical study of choices in calibration measures including measuring all probabilities rather than just the maximum prediction, thresholding probability values, class conditionality, number of bins, bins that are adaptive to the datapoint density, and the norm used to compare accuracies to confidences. To analyze the sensitivity of calibration measures, we study the impact of optimizing directly for each variant with recalibration techniques. Across MNIST, Fashion MNIST, CIFAR-10/100, and ImageNet, we find that conclusions on the rank ordering of recalibration methods is drastically impacted by the choice of calibration measure. We find that conditioning on the class leads to more effective calibration evaluations, and that using the L2 norm rather than the L1 norm improves both optimization for calibration metrics and the rank correlation measuring metric consistency. Adaptive binning schemes lead to more stablity of metric rank ordering when the number of bins vary, and is also recommended. We open source a library for the use of our calibration measures.

Motivation & Objective

  • Assess limitations and pathologies of the Expected Calibration Error (ECE) in multiclass settings.
  • Propose and analyze alternative calibration metrics that address class conditioning, adaptivity, and norm choice.
  • Study the impact of binning, thresholding, and recalibration on calibration evaluation across datasets.
  • Provide practical recommendations and open-source tooling for robust calibration assessment.

Proposed method

  • Formal analysis of calibration error definitions across five properties (class conditionality, adaptivity, maximum-probability focus, norm, thresholding).
  • Definition and evaluation of General Calibration Error (GCE) as a configurable metric space.
  • Introduction of Adaptive Calibration Error (ACE) with equal-frequency binning across calibration ranges.
  • Definition of Static Calibration Error (SCE) as a multiclass extension that bin per class probability.
  • Discussion of thresholding to manage many near-zero probabilities and its effect on calibration estimates.
  • Empirical evaluation on MNIST, Fashion-MNIST, CIFAR-10/100, and ImageNet to study metric behavior and recalibration effects.

Experimental results

Research questions

  • RQ1How does the choice of calibration metric affect conclusions about model calibration in multiclass settings?
  • RQ2Do class-conditioned calibration measures provide more reliable evaluations than aggregate, unconditioned measures?
  • RQ3What is the impact of adaptive binning, norm choice (L1 vs L2), and thresholding on calibration assessment and method rankings?
  • RQ4How do recalibration techniques interact with different calibration metrics across datasets?
  • RQ5What practical recommendations can be made to improve robustness and comparability of calibration evaluations?

Key findings

  • ECE has multiple flaws (ignoring non-max probabilities, fixed bins, and lack of class conditioning) that distort calibration assessment.
  • Class-conditioned calibration metrics reveal nonuniform calibration across classes and provide more informative evaluations.
  • Adaptive binning (ACE) stabilizes metric rank orders as the number of bins varies, outperforming static binning in practice.
  • Using the L2 norm generally improves optimization for calibration metrics and consistency of rank correlations.
  • Ranking of recalibration methods varies dramatically across calibration metrics, indicating metric-dependent conclusions.
  • Adaptive calibration methods yield more robust and reliable comparisons across datasets and architectures.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.