Calibration · Model Evaluation
A CALIBRATED model — when it says 80% confident, it is right 80% of the time
Modern neural networks are typically overconfident — temperature scaling is the fix
C
Calibration — predicted probability matches actual frequency
A well-calibrated model's predicted probabilities genuinely match real-world frequencies — when it predicts 80% confidence, it should actually be correct roughly 80% of the time across many such predictions.
Example: among all the times a calibrated model predicts "80% confident this is spam," roughly 80% of those predictions should actually turn out to be spam.
A
Reliability diagram — visualizing calibration quality
A reliability diagram plots predicted probability against actual observed frequency. A perfectly diagonal line represents perfect calibration; deviations from the diagonal reveal over- or under-confidence.
Example: a reliability diagram showing points consistently above the diagonal line in the high-probability region indicates the model is underconfident there.
L
Overconfidence — the typical modern neural network problem
Modern neural networks typically show overconfidence, with predictions clustering unrealistically close to 0 and 1 — appearing far more certain than their actual accuracy justifies.
Example: a modern deep neural network might frequently output 99% confidence, but only actually be correct 85% of the time when it makes such confident predictions.
Temperature scaling — the standard fix for overconfidence
Temperature scaling divides the model's raw logits by a temperature value T before applying softmax; a T greater than 1 softens (moderates) overconfident probability predictions to better match real-world accuracy.
Example: applying a temperature of T=2 to an overconfident model's logits before softmax, pulling its predicted probabilities back down closer to what its actual accuracy justifies.
1
A medical diagnosis model reports 99% confidence on many predictions, but is later found to actually only be correct about 85% of the time on those specific high-confidence predictions.
2
Ask: is this model well-calibrated? No — it's significantly overconfident, since its stated confidence (99%) doesn't match its real accuracy (85%) on those predictions.
3
This is a critical problem specifically because medical decisions might be made based on trusting that stated 99% confidence level, when the true reliability is meaningfully lower.
4
Applying temperature scaling (dividing logits by a temperature T greater than 1 before softmax) would soften these overconfident probabilities, bringing them into better alignment with the model's true accuracy.

Exams test whether you understand that high accuracy does NOT automatically imply good calibration — these are separate properties. A model can be very accurate overall while still being poorly calibrated on its individual confidence estimates. Also expect questions on temperature scaling as the standard fix for the common overconfidence problem in modern neural networks.

The most common trap is assuming a highly accurate model must also be well-calibrated. Accuracy measures whether predictions are correct; calibration measures whether the model's STATED CONFIDENCE matches its actual correctness rate — a model can excel at one while failing at the other.

1. What does it mean for a model to be well-calibrated?
Its predicted probabilities match actual real-world frequencies — when it says 80% confident, it's actually correct about 80% of the time.
Tap to reveal / hide
2. What does a reliability diagram plot?
Predicted probability against actual observed frequency, with a perfect diagonal line representing perfect calibration.
Tap to reveal / hide
3. Are modern neural networks typically overconfident or underconfident?
Typically overconfident — their predictions cluster unrealistically close to 0 and 1.
Tap to reveal / hide
4. What does temperature scaling do to fix overconfidence?
Divides the logits by a temperature value T (greater than 1) before softmax, softening overconfident probability predictions.
Tap to reveal / hide
5. Does high accuracy automatically imply good calibration?
No — accuracy and calibration are separate properties; a model can be accurate while still being poorly calibrated.
Tap to reveal / hide