Question 15 of 20 Intermediate Interpretation
Why is a softmax output not automatically a calibrated probability?
Short answer
Softmax only turns scores into numbers that sum to one. Nothing in training forces a 0.9 to be right 90 percent of the time, and modern deep networks are often overconfident. Calibration must be measured on held-out data and, if needed, corrected, for example with temperature scaling.
Why
A classifier outputs logits, and softmax converts them into a distribution. Training with cross-entropy pushes the correct class up but, especially once training accuracy is near perfect, keeps rewarding larger margins, so outputs drift toward 0 and 1. Guo and colleagues found that modern neural networks, unlike those of a decade earlier, are poorly calibrated, and identified depth, width, weight decay and batch normalization as factors.
They also found a simple fix effective on most datasets: temperature scaling, a single-parameter variant of Platt scaling that divides logits by a constant learned on a validation set. It changes confidence but not the ranking of classes, so accuracy is unchanged. This matters when a probability drives a decision.
If a pathology model says 0.95 for malignancy, a clinician needs that to mean roughly 95 in 100. Check it with a reliability diagram that bins predictions by confidence and compares with observed accuracy, and with a proper scoring rule such as the Brier score or log loss. Calibration is also local to a population.
A model calibrated at one hospital can be miscalibrated at another with different prevalence or scanners, so recalibrate on local data and recheck after any shift.
A strong answer covers
- Softmax normalizes, it does not calibrate
- Modern deep networks tend to be overconfident
- Reliability diagrams and proper scoring rules
- Temperature scaling fitted on validation data
- Calibration can break under population shift
Common mistakes
- Reading a softmax score of 0.95 as a 95 percent chance of being correct without checking
- Fitting the temperature on the test set used to report calibration
The interviewer might ask next
How would you check calibration for a rare class with few positive examples?