Temperature scaling brings the probabilities output by a model closer to its actual accuracy simply by dividing the logits of a trained classifier by a single number (the temperature ) before applying the softmax. Guo et al. proposed it in 2017 as a fix after showing that the probabilities of modern neural networks are skewed toward overconfidence.
A classifier outputs a probability (confidence) along with the predicted class. If the confidence can be trusted, it can drive decisions such as "send only low-confidence predictions to a human" or "give priority to information from other sensors." For that, about 80 out of 100 predictions with confidence 0.8 need to be correct. This property is called being calibrated. The paper defines perfect calibration as follows (Eq. (1) in the paper).
is the predicted class, its confidence, and the true class.
Comparing a 5-layer LeNet with a 110-layer ResNet on CIFAR-100, the paper showed that the average confidence of LeNet is nearly equal to its accuracy, whereas ResNet, despite its higher accuracy, has an average confidence far above its accuracy (it is overconfident). As an analogy, it is like a weather forecast that says "90% chance of rain" every day when it actually rains only half the time. Even if it is right often, the numbers themselves cannot be trusted.
Temperature scaling corrects this mismatch after training. The model's weights stay unchanged and only a single is chosen on validation data, so it can be added to any model afterward.

