A Uniform Confidence Phenomenon in Deep Learning and its Implications for Calibration

Muthu Chidambaram, Rong Ge · OpenReview

Abstract

Despite the impressive generalization capabilities of deep neural networks, they have been repeatedly shown to poorly estimate their predictive uncertainty—in other words, they are frequently overconfident when they are wrong. Fixing this issue is known as model calibration and has consequently received much attention in the form of modified training schemes and post-training calibration procedures. In this work, we present a significant hurdle to the calibration of modern models: deep neural networks have large neighborhoods of almost certain confidence around their training points. We demonstrate in our experiments that this phenomenon consistently arises across many model and dataset pairs. Furthermore, we prove that when this phenomenon holds, for a large class of data distributions with overlaps between classes, it is not possible to obtain a model that is asymptotically better than random (with respect to calibration) even after applying the standard post-training calibration technique of temperature scaling. On the other hand, we also prove that it is possible to circumvent this defect by changing the training process to use a modified loss based on the Mixup data augmentation technique.

The Problem: Why Temperature Scaling Fails

Deep learning models are notoriously overconfident; a model might predict a class with 99% confidence even when it is incorrect. Model calibration aims to ensure that a confidence score of 90% actually corresponds to a 90% success rate. The industry standard for fixing this is Temperature Scaling (TS), a simple post-processing step that softens a model's final predictions using a single global parameter.

However, TS often underperforms compared to modified training routines. This paper identifies the root cause: Class Overlap. In many real-world scenarios, features of one class bleed into another due to label noise or inherent ambiguity. Because TS applies a uniform "dampening" factor to the entire model, it acts as a global volume knob. If the temperature is adjusted to fix overlapping regions, it inadvertently ruins the calibration of clear-cut regions. Standard training (ERM) encourages "spiky" models that are extremely confident at every training point, creating a landscape of conflicting high-confidence peaks that TS cannot effectively smooth out.

Reliability diagrams comparing ERM + TS with 4-Mixup. ERM + TS exhibits extreme confidence peaks and large calibration gaps, whereas 4-Mixup produces a more calibrated confidence distribution.

Methods: From ERM to Mixup

The authors approach the problem through both theoretical proofs and empirical validation:

  1. Theoretical Framework: They define "ERM Interpolators"—models trained via standard Empirical Risk Minimization that achieve near-zero training error. They prove that for these models, TS performance degrades as class overlap increases, eventually becoming no better than random guessing in overlapping regions.
  2. d-Mixup: To provide a solution, they analyze Mixup, a data augmentation technique where models are trained on convex combinations of data points. They introduce $d$-Mixup, a variant that mixes $d+1$ points, to prove that training-time interpolation forces the model to learn appropriate uncertainty in the "gray areas" between classes. By forcing the model to be 50/50 confident halfway between two points, it naturally learns the geometry of the distribution's overlaps.

Experimental Results

The study evaluated performance using Negative Log-Likelihood (NLL), Expected Calibration Error (ECE), and Adaptive Calibration Error (ACE) across synthetic benchmarks and standard image datasets (CIFAR-10, CIFAR-100, SVHN).

In synthetic Gaussian tests, as class overlap increased (represented by a decreasing $\mu$), the NLL for ERM + TS exploded from 0.2593 to 4.2977. In contrast, the 4-Mixup model remained stable, only moving from 0.2729 to 0.7444. Similar trends were observed in image benchmarks with injected label noise. On CIFAR-100 with 50% noise, Mixup's ECE was 0.0649, compared to a staggering 0.5846 for ERM + TS.

Quantitative comparison of calibration metrics across varying levels of class overlap (μ). Mixup variants significantly outperform ERM + TS as overlap increases.

Conclusion

While temperature scaling is a popular post-hoc fix, it fails fundamentally when data classes overlap. This research demonstrates that training-time interventions like Mixup are far more robust, offering a path to reliable uncertainty estimation even in messy, real-world datasets where post-hoc fixes fall short. Future work may explore even more sophisticated non-linear constraints to handle distribution overlaps more elegantly.

Summary updated

BibTeX
@inproceedings{chidambaram2024uniform,
  author = {Muthu Chidambaram and Rong Ge},
  title = {{A Uniform Confidence Phenomenon in Deep Learning and its Implications for Calibration}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=zavLQJ1XjB},
}
Figure