expected-calibration-error · shipping · also ECE, binned calibration error

Expected calibration error

Expected calibration error summarizes the gap between predicted probabilities and observed outcome frequencies, usually estimated by bin-weighted gaps on an evaluation sample.

Guo et al. estimate ECE by sorting n predictions into M equal-width confidence bins and taking the sample-weighted average of the absolute gap between each bin's accuracy and mean confidence. Their convention scores predicted-class confidence against classification correctness, which is a different calculation from a binary event probability scored against its label. [1]

With M = 15 bins, their Table 1 reports an ECE of 16.53% for an uncalibrated 110-layer ResNet on CIFAR-100 and 1.26% after temperature scaling, against 2.66% after histogram binning and 4.99% after isotonic regression. [1]

Roelofs et al. show that on a finite sample the binned estimate can overestimate or underestimate the true calibration error, and that adding bins does not always help. In their evaluated simulation settings, equal-mass bins had lower bias than equal-width bins; this is not a distribution-free ordering. In their ten-model comparison the equal-width binned estimate picked the same recalibration method as the reference 3 of 10 times, against 7 of 10 for their sweep estimator. [3]

Confidence ECE pools predicted labels. Gupta and Ramdas instead condition on both label and confidence for top-label ECE; some earlier papers use the latter name for the pooled metric. Declare the convention. [5]

In a synthetic twenty-observation example, confidence ECE is 0 while exact-group top-label and binary-event errors are both 0.1. Opposite class-conditional errors cancel when pooled. The linked result includes group counts, exact fractions and runnable checks. [6]

Relations

related
Probability calibration, Brier score, Class prevalence, Prediction horizon, Grouped cross-validation, Precision, Confidence calibration, Top-label calibration

Advantages

  • Reduces a reliability diagram to one number that can be compared before and after recalibration. [1]

Limitations

  • The value depends on the bin count and binning scheme, so figures are comparable only under the same estimator. [3]
  • The cited results come from image and text classification benchmarks and do not transfer to other event types without new measurement. [1, 3]

Citations

  1. Guo et al. On Calibration of Modern Neural Networks. ICML 2017, section 2 and equation 3. (accessed 2026-10-22)
  2. Roelofs et al. Mitigating Bias in Calibration Error Estimation. AISTATS 2022, section 4 and Appendix B (finite-sample bias). (accessed 2026-10-22)
  3. Gupta and Ramdas. Top-label calibration and multiclass-to-binary reductions. ICLR 2022; arXiv v4, section 2 equations 1-4 and Remark 2. (accessed 2026-11-23)
  4. Hesela: exact synthetic confidence, top-label and binary-event calibration example; model.py, test_model.py and results.json. (accessed 2026-11-23)

Further reading

  1. Vaicenavicius et al. Evaluating model calibration in classification. AISTATS 2019, sections 4.1-4.4 (fixed-bin asymptotics and estimator variability). (accessed 2026-10-17)
  2. Hesela: synthetic binary-event binning counterexample and reproducible arithmetic. (accessed 2026-10-17)
Sources & caveats
  • guo-icml17 is the ICML 2017 paper by Guo, Pleiss, Sun and Weinberger of Cornell University, re-read on 2026-10-22 in sections 2 and 5 and Table 1.
  • The M = 15 bins, 16.53%, 1.26%, 2.66% and 4.99% figures come from Table 1 of guo-icml17.
  • roelofs-aistats22 is the AISTATS 2022 paper by Roelofs, Cain, Shlens and Mozer, read on 2026-10-22 in the abstract, introduction, sections 4 and 5 and Table 1.
  • The 3 of 10 and 7 of 10 selection counts come from Table 1 of roelofs-aistats22.
  • 2026-11-23: rechecked Roelofs sections 4-8/Table 1; bounded equal-mass bias statement to evaluated settings. Reviewed Gupta-Ramdas section 2/Remark 2; added exact synthetic conditioning example, not a new fleet result.

JSON: /data/terms/expected-calibration-error.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Expected calibration error. Hesela. 2026-11-23. https://hesela.dev/terms/expected-calibration-error/