How wrong is a model's confidence?
A ResNet-34 on CIFAR-100 claimed 99% confidence while landing correctly 94% of the time; temperature scaling cut the gap by nearly two-thirds.
A ResNet-34 trained on CIFAR-100 is measurably overconfident: its top prediction bin claims 99% certainty while landing correctly only 94% of the time. Temperature scaling, a single learned number, cuts that gap by nearly two-thirds without changing a single prediction.
Key takeaways
- A registered gate said: if Expected Calibration Error (ECE) on the held-out half of the test set came in under 3%, the claim "this model is overconfident" would be dead. The real number is 7.87%, more than double the threshold.
- Temperature scaling cut ECE from 7.87% to 2.85%, a 63.7% relative reduction, well past the 30% bar registered to count as a fix.
- The gap concentrates where most predictions live: 70.1% of test examples fell in the top confidence bin, claiming 99.11% certainty on average while landing correctly 94.27% of the time, before any correction.
- A single scalar, fitted on one held-out half of the data and applied to the other, does this without moving accuracy at all: 80.24% before and after.
What is Expected Calibration Error, and why should it matter?
A model's softmax output is often read as a probability: "94% confident" should mean the model is right about 94% of the time it says that. Expected Calibration Error (ECE) checks whether this holds. Predictions are grouped into confidence bins (15 bins here, 0-100%), and for each bin the gap between average stated confidence and actual accuracy is measured, then averaged across bins weighted by how many predictions fall in each one.
Guo et al. (2017) showed this gap is not a rounding error in modern networks. Depth, width and batch normalisation, the same ingredients that improved accuracy through the 2010s, tend to push confidence upward faster than accuracy actually improves. A network can get better at the task while getting worse at knowing how sure it should be. ECE is the number that catches this, because accuracy alone cannot: a model can be 80% accurate and either well calibrated or badly overconfident, and only the confidence values reveal which.
How overconfident was this model, in real numbers?
The experiment used edadaltocg/resnet34_cifar100, a public ResNet-34 checkpoint (MIT licence, reported 79.78% test accuracy, trained 300 epochs with SGD and cosine annealing) evaluated on half of the official CIFAR-100 test set: 5,000 images, held out purely for this measurement and never used to fit anything. Top-1 accuracy on that half came in at 80.24%, close enough to the reported figure to trust the checkpoint loaded correctly. ECE came in at 7.87%, against a registered kill-gate of 3%: the gate did not fire, so the claim that this model is overconfident survives.
The clearest view is the top confidence bin, 93.3% to 100%, where 3,507 of 5,000 predictions landed, 70.1% of the entire test half. Average stated confidence there was 99.11%. Actual accuracy in that same bin was 94.27%, a 4.84 percentage point gap sitting inside the bin most predictions occupy. This is not noise from a handful of edge cases. It is the model's default operating point.
Does temperature scaling actually fix it?
Temperature scaling divides every logit by a single learned constant T before the softmax, which softens or sharpens the whole probability distribution without changing which class wins. That last part matters: because the operation is monotonic, the argmax, and therefore accuracy, cannot change. It is a diagnostic gate in this experiment (KG3), not a hypothesis, and it passed exactly as the maths predicts: 80.24% before, 80.24% after.
T was fitted on the other half of the test set (5,000 images, never touched during evaluation) by minimising cross-entropy loss with the rest of the network frozen. The fitted value was T = 1.2508. Applied to the evaluation half, ECE dropped from 7.87% to 2.85%, a 63.7% relative reduction against a registered 30% bar. The top confidence bin shrank to 56.9% of the data, with average confidence easing to 97.93% against 97.05% actual accuracy, a 0.88 point gap where there was 4.84. One number, fitted once, closed most of the distance.
What does this not tell us?
The experiment covers one checkpoint, one architecture family, one dataset. It says nothing about whether a different ResNet, a transformer, or the same model on a harder task would show the same overconfidence or the same fix. The dev and eval splits here both came from the same official test set, split in half, because the checkpoint was already trained on the full training set and no independent held-out validation data existed. A researcher training the model from scratch could hold out a proper validation split before ever touching the test set; that would be the cleaner version of this experiment.
It also says nothing about large language models. Confidence calibration in text generation is a substantially harder, more open problem, covered by a growing body of work rather than one fix (Liu et al., 2025). Temperature scaling on a classifier's softmax and calibrating a generative model's stated or implied confidence are related in name only.
FAQ
Is Expected Calibration Error the same thing as accuracy?
No. Accuracy measures how often the model is right. ECE measures how well its stated confidence matches how often it is right. A model can be accurate and badly calibrated, or less accurate and well calibrated; the two numbers answer different questions and neither substitutes for the other.
Why does temperature scaling leave accuracy unchanged?
Dividing all logits by the same constant before softmax rescales the probabilities but preserves their order, so the highest-scoring class stays the highest-scoring class. Accuracy depends only on that ordering (the argmax), never on the actual probability values, which is exactly what temperature scaling touches.
Could a well-trained model already be calibrated out of the box?
Yes, in principle; this experiment measured one checkpoint, not a law of nature. Guo et al. (2017) found the overconfidence pattern across several architectures and datasets, which is why the kill-gate here was registered at 3%, not zero, but a different model could plausibly clear that gate.
Does this result say anything about how confident an LLM's answers are?
No. This measures a classifier's softmax output over a fixed set of labels, which is a much narrower object than a language model's output over an open-ended vocabulary. Whether and how a generative model's stated or implied certainty should be trusted is a separate, less settled question, covered by a growing survey literature rather than one fix (Liu et al., 2025).
The registered plan, the raw numbers and the reliability diagram data behind these figures sit in the public experiment repository, alongside the other experiments this site has published.
References
- Chuan Guo, Geoff Pleiss, Yu Sun, Kilian Q. Weinberger. On Calibration of Modern Neural Networks, 2017. arxiv.org/abs/1706.04599
- Xiaoou Liu, Tiejin Chen, Longchao Da, Chacha Chen, Zhen Lin, Hua Wei. Uncertainty Quantification and Confidence Calibration in Large Language Models: A Survey, 2025. arxiv.org/abs/2503.15850