The Overconfident Classifier: When More Data Hurts Calibration
You train a logistic regression model on a dataset with features and training examples, where is large relative to . The model achieves near-zero training loss.
A colleague suggests: "The model's predicted probabilities are well-calibrated — after all, we minimized cross-entropy, which directly targets the log-likelihood of probabilities."
Question: Is this reasoning correct? Specifically:
-
When (i.e., the number of features is a constant fraction of the sample size), what happens to the maximum likelihood estimates in logistic regression, and why does this make predicted probabilities systematically overconfident (pushed toward 0 and 1)?
-
Give a simple, clean argument for why minimizing training cross-entropy does not guarantee calibrated probabilities, even in principle — using just the concept of overfitting and the difference between training and test distributions.
-
(Bonus conceptual punchline): What simple post-hoc fix can partially restore calibration, and why does it work geometrically?
Answer: 2026-08-16_am
Key Idea / Intuition
Minimizing cross-entropy on training data is a maximum likelihood procedure — it finds that makes the training labels look as probable as possible. When features are plentiful relative to data points ( not negligible), the MLE overshoots: it inflates the magnitude of to push training probabilities toward 0 and 1, fitting the noise. On new data, these extreme predicted probabilities are systematically wrong — the model is overconfident. The fix is elegant: just rescale (divide) the logit by a temperature , which geometrically "squashes" the sigmoid back toward the center.
Formal Proof / Solution
Part 1: What Happens When
Setup. In logistic regression, we maximize the log-likelihood: where .
The classical regime ( fixed, ): MLE is consistent, .
The proportional regime (): A landmark result (Sur & Candès, 2019, building on earlier work) shows that MLE is not consistent. Specifically:
- The MLE exists and is finite only when the data are not perfectly separable.
- But even when it exists, is systematically inflated relative to by a factor that depends on .
- Intuitively: with free parameters, the optimizer finds directions in that separate training points better than the truth does.
Consequence for probabilities. The predicted probability for a new point is:
Since , the logits are inflated in magnitude, pushing toward 0 or 1 even when the true probability is moderate (say, 0.6 or 0.4). This is overconfidence.
A toy example to see it clearly. Suppose the true (unit vector), but the MLE returns . Then:
- True probability at :
- Predicted probability:
The model is far more confident than it should be.
Part 2: Training Cross-Entropy Minimization ≠ Calibration
The clean argument:
Calibration means: among all examples where the model predicts probability , approximately fraction should actually be positive. Formally, we want:
Training cross-entropy minimization gives us:
This only enforces that predictions match training labels, not the true conditional distribution. Specifically:
- If the model overfits, it memorizes training labels. A training point with gets even if the true .
- The empirical cross-entropy is minimized, but the population cross-entropy (which would ensure calibration) is not.
Formally, perfect calibration requires: to be minimized over the test distribution, not the training distribution.
Overfitting breaks this: minimizing training loss inflates , and the resulting is no longer the minimizer of the population cross-entropy.
Part 3 (Bonus): Temperature Scaling
The fix: After training, find a scalar and replace all predicted logits with :
is chosen to minimize cross-entropy on a held-out validation set.
Why it works — geometrically:
The sigmoid maps . Dividing by compresses the logit, which moves predicted probabilities away from the extremes (0 and 1) toward the center (0.5).
This is the Platt scaling idea. It doesn't change the model's ranking of predictions (monotone transformation), only their magnitude — correcting the systematic overconfidence from inflated without retraining.
Why (not )? Modern neural networks and logistic regression in high dimensions are overconfident (not underconfident), so we need to flatten the distribution, not sharpen it. does exactly this.
Summary Table
| Regime | behavior | Calibration | |---|---|---| | | Consistent | Good | | | Inflated magnitude | Overconfident | | , separable | | Completely broken | | After temperature scaling | Logits divided by | Restored |
Written to: question file