Neural networks, deep learning, NLP · insight-0410
Calibrate a neural classifier before using its softmax output as a probability
- Evidence type
- empirical finding
- Difficulty
- medium
- Roles
- Data scientist, ML engineer
- Industries
- insurance, aviation
Summary: situation, action, reason, boundary
Situation
A network's predicted probability will drive a cost-based decision, such as how much overbooking risk to accept or when to route a claim to manual review.
Action
Plot a reliability diagram on held-out data. Fit temperature scaling (one scalar dividing the logits) on a validation split, then recheck calibration on a separate test split.
Reason
Temperature scaling preserves the ranking and accuracy while fixing much of the overconfidence, and it costs one parameter.
Boundary
Any decision that uses the probability value rather than only the ranking.
Symptom or risk
Modern deep networks are often overconfident, so a 0.95 score may be right far less than 95% of the time and the expected-cost threshold is wrong.
Exceptions
Pure ranking tasks scored by AUC do not need calibration.
Trade-offs
You spend a calibration split; calibration fitted before a data shift degrades after it.
Pitfalls
Fitting the temperature on the test set, or assuming calibration on average means calibration in every segment.
Lessons and concepts
Claims and their sources
Guo et al. found modern neural networks are often poorly calibrated and overconfident, and that temperature scaling is a simple, effective post-hoc fix.