GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
★ Read firstICML 2017

On Calibration of Modern Neural Networks

Deeper, more accurate networks became overconfident: a 110-layer ResNet claims more certainty than it earns. One fitted temperature fixes most of it without changing a single prediction.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2017
AUTHORS
Guo, Pleiss, Sun, Weinberger
FROM
Cornell University
PUBLISHED
Jun 2017 · ICML 2017
CITED BY
11,244Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 23% of this breakdown.

01

The paper in one minute

A model is calibrated when its confidence matches how often it is right: among predictions made with 0.8 confidence, about 80% are correct. The authors observe that a 5-layer LeNet from 1998 is close to calibrated on CIFAR-100, while a 110-layer ResNet from 2016 is more accurate but much more confident than it should be.

They measure calibration two ways. A reliability diagram sorts predictions into confidence bins and plots each bin's accuracy against its confidence; a calibrated model follows the diagonal. Expected calibration error (ECE) summarizes the gaps: the average difference between accuracy and confidence across bins, weighted by how many predictions fall in each.

Experiments on CIFAR-100 tie miscalibration to recent training practice. ECE rises with depth and width, rises with batch normalization, and falls as weight decay increases, even past the point where more weight decay hurts accuracy. The explanation offered is that networks keep reducing training loss by growing more confident after they classify the training set correctly; in one training curve, test loss overfits while test error keeps improving.

The authors then compare post-hoc calibration methods, all fitted on a held-out validation set: histogram binning, isotonic regression, Bayesian binning into quantiles, and three versions of Platt scaling (matrix, vector and temperature). Temperature scaling divides every logit by a single number T fitted by minimizing validation log loss. Because dividing by a positive number does not change which class has the largest logit, predictions and accuracy stay the same; only confidence changes. Across 15 image models and 4 text models, temperature scaling was usually the best method or close to it, cut ECE on every vision model, and beat more flexible scaling methods that can overfit.

THE IDEA, VISUALLY
ECE BEFORE -> AFTER TEMPERATURE SCALING (TABLE 1) CIFAR-100 ResNet-110 16.53% 1.26% CIFAR-100 Wide ResNet-32 15.0% 2.32% Birds ResNet-50 9.19% 1.85% 20 News DAN 8.02% 4.11% ImageNet DenseNet-161 6.28% 1.99% Reuters DAN 0.85% 0.91% uncalibrated temperature scaled worse Accuracy is unchanged in every row: dividing logits by one T > 0 keeps the top class. Lowest of six methods in 10 of 15 vision rows (our count). RELIABILITY DIAGRAM, OUR SIMULATION (10,000 TEST) before, T = 1 0 1 confidence after, T = 2.51 0 1 confidence acc Bars: accuracy of predictions in each confidence bin (bins with 30+ predictions). Dashed: perfect calibration. Before: ECE 28.1%; predictions at 0.9+ are 30.5% of all and 64.6% correct. After: ECE 1.2%; they are 0.9% of all and 96.5% correct. Accuracy 45.6% both times. arXiv 1706.04599, Cornell University
Left: expected calibration error (ECE, 15 bins) before and after temperature scaling for six rows of Table 1; on Reuters it rises slightly. Right: a reliability diagram from our simulation of a 10-class model whose logits are 2.5 times too sharp, before and after fitting one temperature on 3,000 validation examples. Bars show accuracy per confidence bin; the diagonal is perfect calibration.
Research notes: the problem, approach and results
16.53% -> 1.26%

ECE of a 110-layer ResNet on CIFAR-100 before and after temperature scaling (Table 1)

10 of 15

vision rows where temperature scaling has the lowest ECE of the six methods; it beats uncalibrated in all 15 (our count of Table 1)

0

predictions changed by temperature scaling: dividing logits by one positive number keeps the ranking, so accuracy is identical

THE PROBLEM

A classifier's confidence is useful only if it means what it says: of predictions made at 80% confidence, about 80% should be right. Downstream systems use confidence to decide when to trust a prediction, hand off to a person or combine with other signals.

THE IDEA

Measure calibration with reliability diagrams and expected calibration error across modern image and text classifiers, study which training choices cause miscalibration, and compare post-hoc fixes, including temperature scaling: divide all logits by one number fitted on validation data.

THE RESULT

Modern networks are overconfident, with ECE typically 4% to 10% and up to 16.5% on CIFAR-100, and depth, width, batch normalization and less weight decay make it worse. Temperature scaling cut ECE on every vision model tested, often below 2%, while leaving accuracy unchanged.

02

Why it matters to an FDE

Thresholds assume calibration. "Auto-approve when confidence is above 0.9" works only if 0.9 means roughly 90% correct. On an overconfident model, that threshold lets through far more errors than the number suggests. Before setting any confidence-based routing, check a reliability diagram on validation data from the customer's distribution.

The fix is cheap and safe. Temperature scaling needs a few thousand labeled validation examples, one parameter and a line of code at inference. It cannot change which answer the model gives, so accuracy metrics and downstream behavior that depend only on the top answer are untouched. That makes it easy to ship.

Calibration lowers coverage. Once confidence is honest, fewer predictions clear a high threshold. In our simulation, the share of predictions above 0.9 dropped from 30% to 1% after calibration, and their accuracy rose from 65% to 97%. Set expectations with the customer: calibrated thresholds mean more cases for review, and the reviewed cases are the right ones.

It applies to language models. Token probabilities and classifier heads on top of LLMs (routers, guardrail classifiers, yes/no judges) are used as confidence all the time. The same check and the same one-parameter fix apply, and routing systems that escalate low-confidence cases depend on it.

Recalibrate after drift. Calibration is fitted to a distribution. When inputs shift, or the model is fine-tuned or replaced, refit the temperature and recheck the reliability diagram.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    Definitions, the causes, the six methods, temperature scaling's results, and two misreadings

    Free account
  2. 04How it works

    Metrics, the capacity and regularization experiments, the six methods and the datasets

    Premium
  3. 05The numbers that matter

    Table 1's ECE before and after each method, where temperature scaling wins and where it does not

    Premium
  4. 06Try it yourself

    Count Table 1's winners, fit a temperature on a simulated model, and see two ways ECE misleads

    Premium
  5. 07Where it breaks

    Same-distribution validation, ECE's blind spots, top-class confidence only, and causes not proven

    Premium
  6. 08Using it on a deployment

    Check calibration before thresholds, fit a temperature, recalibrate on change, report coverage

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →