temperature scaling
温度缩放
Temperature scaling adjusts a classifier's probabilities by dividing its raw class scores by one fitted positive number before the softmax. It preserves class rankings for each input while allowing the concentration of probabilities to change.
A classifier first produces raw scores, often called logits, then converts them into probabilities that sum to one. Dividing the logits by a temperature greater than one reduces the gaps between them and makes the probabilities less concentrated. A temperature below one has the opposite effect. The value is typically fitted on held-out data by minimizing the negative log probability assigned to the observed classes.
Dividing all scores for one image by the same positive temperature preserves its highest-scoring class. The resulting probabilities can improve calibration while leaving those class choices unchanged. Calibration errors can vary by hospital, class, or patient subgroup. A global temperature applies the same adjustment to every case.
- Guo C, Pleiss G, Sun Y, Weinberger KQ. On Calibration of Modern Neural Networks. ICML, 2017. proceedings.mlr.press/v70/guo17a.html
Key works · 1
Landmark2017ICML 2017 (PMLR 70)13,994 citations
On Calibration of Modern Neural Networks
The study compares confidence scores with observed correctness and finds that accurate modern classifiers can still be overconfident. Experiments on image and document classification compare several post-processing methods. Fitting a single temperature to validation logits often improves calibration without changing the predicted class.
SignificanceTemperature scaling supplied a simple baseline for post-hoc classifier calibration. Later experiments under dataset shift use it as a comparator and distinguish calibration on validation data from the harder problem of preserving reliable uncertainty estimates as inputs change.
arXiv Chuan GuoGeoff PleissKilian Q. Weinberger uncertainty estimationimage classificationprobability calibrationtemperature scaling