{
  "status": "shipping",
  "advantages": [
    {
      "text": "Reduces a reliability diagram to one number that can be compared before and after recalibration.",
      "citationIds": [
        "guo-icml17"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-23",
  "slug": "expected-calibration-error",
  "term": "Expected calibration error",
  "aliases": [
    "ECE",
    "binned calibration error"
  ],
  "definition": "Expected calibration error summarizes the gap between predicted probabilities and observed outcome frequencies, usually estimated by bin-weighted gaps on an evaluation sample.",
  "note": "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. [guo-icml17]\n\nWith 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. [guo-icml17]\n\nRoelofs 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. [roelofs-aistats22]\n\nConfidence 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. [gupta-ramdas]\n\nIn 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. [worked]",
  "limitations": [
    {
      "text": "The value depends on the bin count and binning scheme, so figures are comparable only under the same estimator.",
      "citationIds": [
        "roelofs-aistats22"
      ]
    },
    {
      "text": "The cited results come from image and text classification benchmarks and do not transfer to other event types without new measurement.",
      "citationIds": [
        "guo-icml17",
        "roelofs-aistats22"
      ]
    }
  ],
  "related": [
    "probability-calibration",
    "brier-score",
    "class-prevalence",
    "prediction-horizon",
    "grouped-cross-validation",
    "precision",
    "confidence-calibration",
    "top-label-calibration"
  ],
  "citations": [
    {
      "id": "guo-icml17",
      "title": "Guo et al. On Calibration of Modern Neural Networks. ICML 2017, section 2 and equation 3.",
      "url": "https://proceedings.mlr.press/v70/guo17a/guo17a.pdf",
      "accessed": "2026-10-22"
    },
    {
      "id": "vaicenavicius-aistats19",
      "title": "Vaicenavicius et al. Evaluating model calibration in classification. AISTATS 2019, sections 4.1-4.4 (fixed-bin asymptotics and estimator variability).",
      "url": "https://proceedings.mlr.press/v89/vaicenavicius19a/vaicenavicius19a.pdf",
      "accessed": "2026-10-17"
    },
    {
      "id": "roelofs-aistats22",
      "title": "Roelofs et al. Mitigating Bias in Calibration Error Estimation. AISTATS 2022, section 4 and Appendix B (finite-sample bias).",
      "url": "https://proceedings.mlr.press/v151/roelofs22a/roelofs22a.pdf",
      "accessed": "2026-10-22"
    },
    {
      "id": "hesela-binning",
      "title": "Hesela: synthetic binary-event binning counterexample and reproducible arithmetic.",
      "url": "https://hesela.com/analyses/ml-disk-failure-prediction/#calibration-binning",
      "accessed": "2026-10-17"
    },
    {
      "id": "gupta-ramdas",
      "title": "Gupta and Ramdas. Top-label calibration and multiclass-to-binary reductions. ICLR 2022; arXiv v4, section 2 equations 1-4 and Remark 2.",
      "url": "https://arxiv.org/pdf/2107.08353v4",
      "accessed": "2026-11-23"
    },
    {
      "id": "worked",
      "title": "Hesela: exact synthetic confidence, top-label and binary-event calibration example; model.py, test_model.py and results.json.",
      "url": "https://hesela.dev/research/calibration-conditioning/results.json",
      "accessed": "2026-11-23"
    }
  ],
  "provenance": [
    "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."
  ]
}
