The Blessing of Normalization: Why Softmax Probabilities Saturate
You have a -class classifier that outputs a score vector . The softmax function converts these to probabilities:
Question: Suppose class 1 is the true class, and you scale all scores by a constant (i.e., replace by ). This is called temperature scaling.
-
What happens to the softmax probabilities as ? As ?
-
Now consider the cross-entropy loss for the true class: Show that as if and only if for all (i.e., class 1 has the strictly highest score).
-
What is ? Interpret this.
Answer: Temperature Scaling and Softmax Saturation
Key Idea / Intuition
Temperature scaling is a way of "sharpening" or "flattening" a probability distribution. Low temperature amplifies score differences so the model becomes overconfident (winner-takes-all), while high temperature washes them out toward uniform. The cross-entropy loss thus perfectly detects whether the model "got it right" in raw scores (part 2), and tells us the maximum possible entropy of confusion at high temperature (part 3). This connects the geometric intuition of softmax to the information-theoretic meaning of cross-entropy.
Formal Proof / Solution
Part 1: Limits of the softmax probabilities
Replace with . Then:
As : Divide numerator and denominator by where :
- If : the numerator since .
- If : the numerator .
So the probability concentrates equally on all classes achieving the maximum score. If there is a unique maximizer (say class 1), then and all others : winner-takes-all / argmax behavior.
As : All exponents , so for all :
The distribution flattens to uniform โ the model becomes maximally uncertain.
Part 2: iff class 1 has strictly highest score
The loss is:
Divide inside the log by :
Note the term contributes exactly to the sum.
( direction): Suppose for all . Then for all , so:
The entire sum , so:
( direction): Suppose some satisfies . Then and since , this term is at least 1 and does not vanish. The sum inside the log is , so:
Hence .
Conclusion: as if and only if strictly.
Part 3: The high-temperature limit of the loss
From Part 1, as , all . Therefore:
Interpretation: is the entropy of the uniform distribution over classes. At infinite temperature, the model is completely ignorant โ it assigns equal probability to all classes โ and pays the maximum possible cross-entropy loss of . This is also the cross-entropy of any distribution against the uniform distribution when the truth is known.
In terms of temperature scaling for calibration (a practical ML technique): using makes a model less confident and better calibrated when the raw logits are overconfident; the penalty is a higher but bounded loss approaching .
Summary Table
| Temperature | Probabilities | Cross-entropy loss | |---|---|---| | (if largest) | , rest | | | (if not largest) | Mass on classes | | | | Standard softmax | | | | Uniform ( each) | |
Source: The Elements of Statistical Learning, Hastie-Tibshirani-Friedman (2nd ed.); widely known ML folklore