NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Rethinking Calibration of Deep Neural Networks: Do Not Be Afraid of Overconfidence

Deng-Bao Wang, Lei Feng, Min-Ling Zhang

Introduction

While modern deep neural networks are notoriously overconfident, this paper argues that overconfidence isn't the "nightmare" we think it is. In machine learning, calibration refers to the harmony between a model's confidence and its actual accuracy. If a well-calibrated model says it is 90% sure about a prediction, it should be right 90% of the time. Unfortunately, modern deep neural networks (DNNs) are famously "overconfident"—they often predict with 99% certainty even when they are wrong.

The research community has responded by developing training-time regularizers (like Label Smoothing or Focal Loss) that penalize high-confidence outputs. While these methods produce models that look better "out of the box," this paper identifies a hidden cost: these models become less calibratable. They lose the internal information necessary for post-hoc calibration methods (adjustments made after training) to work effectively. The authors demonstrate that intentionally overconfident models often achieve superior final calibration when paired with post-hoc methods like Temperature Scaling.

Methods

The authors conduct an extensive empirical study comparing standard training against popular regularization techniques:

  • Standard Cross-Entropy (CE): The baseline, which typically leads to overconfident models.
  • Label Smoothing (LS): Replacing "hard" labels (0 or 1) with "soft" labels (e.g., 0.1 and 0.9) to discourage extreme confidence.
  • Focal Loss (FL): A loss function that down-weights "easy" samples to focus on "hard" ones.
  • $L_p$ Norm Regularization: Penalizing the magnitude of the network's output logits.
Effect of varying regularization hyperparameters on ECE across different datasets.

The core of their investigation involves applying post-hoc calibration—specifically Temperature Scaling (TS) and Histogram Binning (HB)—to all these models.

Most importantly, they propose a novel, counter-intuitive loss function called Inverse Focal Loss (IFL). Unlike standard Focal Loss, which focuses on hard samples, IFL gives more weight to easy, high-confidence samples. This intentionally drives the model toward extreme overconfidence to see if it improves "calibratability."

Datasets

The study utilizes four diverse benchmarks to ensure the findings are robust across different domains:

  • SVHN: Street View House Numbers (image classification).
  • CIFAR-10 & CIFAR-100: Standard image recognition datasets.
  • 20 Newsgroups: A text classification dataset.

They tested these using architectures like ResNet-32, ResNet-110, and an 8-layer 1D-CNN.

Key Insights and Ideas

  • The "Calibratability" Trap: A model can be "well-calibrated" (low error initially) but "poorly calibratable" (unable to improve further). Regularization methods often achieve the former by squashing the model's output range, which destroys the fine-grained information needed for the latter.
  • Information Loss via Logit Compression: By visualizing logit distributions, the authors show that regularization forces all samples—regardless of how "hard" they are to learn—into a narrow confidence band. Standard Cross-Entropy, by contrast, spreads them out, preserving a "hardness signal."
  • Overconfidence as a Feature, Not a Bug: Overconfidence is essentially a scaling issue. As long as the relative ordering of confidence is preserved (i.e., the model is more confident on easy samples than hard ones), a simple mathematical "nudge" like Temperature Scaling can fix the absolute values.
  • The Power of IFL: In complex tasks like CIFAR-100, the proposed Inverse Focal Loss—which makes the model more overconfident—actually resulted in the best final calibration after Temperature Scaling.

Key Results

  • Post-hoc Superiority: While regularized models (LS, FL) had lower initial Expected Calibration Error (ECE), the standard CE model consistently outperformed them after Temperature Scaling. For example, on CIFAR-100, CE + TS achieved an ECE of 1.35%, while Label Smoothing + TS only reached 1.37% and $L_1$ Norm + TS was much worse at 3.92%.
  • Temperature Sensitivity: Models trained with standard CE required much higher "temperatures" (e.g., $T=4.18$ for 20 Newsgroups) to calibrate, confirming their high initial overconfidence. However, these models had a much higher "ceiling" for improvement.
  • Validation Efficiency: The authors found that standard CE models achieve excellent calibration even with very small validation sets, whereas methods like Histogram Binning require significantly more data to be effective.
ECE vs. Size of Validation set, showing CE achieves excellent calibration even with small validation sets.

Limitations and Future Work

  • Dataset Dependency: The "best" loss function isn't universal. While IFL worked well for complex image tasks, standard Focal Loss was still superior for the 20 Newsgroups text dataset. The authors suggest the optimal training strategy depends heavily on the specific characteristics of the data.
  • Unified Framework: The paper points toward a need for a "unified framework" that considers training and post-hoc calibration as a single pipeline rather than two independent steps.
  • Distribution Shift: A major remaining question is how these "calibratable" models handle distribution shift (when the test data looks different from the training data). The authors flag this as a critical area for future research.

Summary updated

BibTeX
@inproceedings{wang2021rethinking,
  author = {Deng-Bao Wang and Lei Feng and Min-Ling Zhang},
  title = {{Rethinking Calibration of Deep Neural Networks: Do Not Be Afraid of Overconfidence}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
}
Figure