[Paper Review] Soft Calibration Objectives for Neural Networks
This paper proposes differentiable, soft-binning-based calibration objectives—SB-ECE and S-AvUC—that enable end-to-end training of neural networks to improve predictive uncertainty calibration. By replacing discrete binning with continuous, overlapping bins, the method achieves state-of-the-art expected calibration error (ECE) with less than 1% accuracy drop, outperforming standard cross-entropy training and post-hoc methods like temperature scaling, especially under distribution shift.
Optimal decision making requires that classifiers produce uncertainty estimates consistent with their empirical accuracy. However, deep neural networks are often under- or over-confident in their predictions. Consequently, methods have been developed to improve the calibration of their predictive uncertainty both during training and post-hoc. In this work, we propose differentiable losses to improve calibration based on a soft (continuous) version of the binning operation underlying popular calibration-error estimators. When incorporated into training, these soft calibration losses achieve state-of-the-art single-model ECE across multiple datasets with less than 1% decrease in accuracy. For instance, we observe an 82% reduction in ECE (70% relative to the post-hoc rescaled ECE) in exchange for a 0.7% relative decrease in accuracy relative to the cross entropy baseline on CIFAR-100. When incorporated post-training, the soft-binning-based calibration error objective improves upon temperature scaling, a popular recalibration method. Overall, experiments across losses and datasets demonstrate that using calibration-sensitive procedures yield better uncertainty estimates under dataset shift than the standard practice of using a cross entropy loss and post-hoc recalibration methods.
Motivation & Objective
- To address the poor calibration of deep neural networks, which often produce over- or under-confident predictions despite high accuracy.
- To overcome the limitation of standard calibration error estimators (e.g., ECE) being non-differentiable due to discrete binning, preventing gradient-based optimization.
- To develop differentiable, continuous alternatives to hard binning for estimating calibration error, enabling direct optimization during training and post-hoc recalibration.
- To improve uncertainty estimation under distribution shift by using calibration-sensitive training objectives instead of standard cross-entropy loss followed by post-hoc methods.
- To demonstrate that soft calibration objectives yield better generalization of uncertainty estimates than conventional approaches in both in-distribution and out-of-distribution settings.
Proposed method
- Proposes a soft-binning mechanism where confidence scores are mapped to overlapping, continuous bins using a differentiable kernel function (e.g., Gaussian), replacing discrete, hard binning.
- Defines a soft version of Expected Calibration Error (SB-ECE) by computing expected confidence and accuracy as weighted integrals over continuous bins, enabling gradient computation.
- Introduces S-AvUC, a soft variant of the AvUC loss, to serve as a secondary training objective for improving calibration in non-Bayesian neural networks.
- Uses interleaved training to apply soft calibration objectives even when the primary loss (e.g., cross-entropy) causes memorization, maintaining low ECE without sacrificing accuracy.
- Applies the soft calibration objective as a primary loss in post-hoc recalibration, optimizing the temperature parameter directly for SB-ECE instead of log-likelihood (TS-SB-ECE).
- Employs equal-mass binning with ℓ₂ norm for ECE computation and evaluates performance across CIFAR-10, CIFAR-100, and ImageNet under various primary losses and data shift conditions.
Experimental results
Research questions
- RQ1Can differentiable, continuous binning improve the optimization of calibration error during neural network training?
- RQ2How does using soft calibration objectives (SB-ECE, S-AvUC) as secondary losses compare to existing calibration-incentivizing losses in reducing expected calibration error (ECE)?
- RQ3Does optimizing for soft calibration error in post-hoc recalibration (e.g., via TS-SB-ECE) outperform standard temperature scaling?
- RQ4How do soft calibration objectives generalize under dataset shift compared to standard training with cross-entropy and post-hoc recalibration?
- RQ5Can soft calibration objectives improve both top-label and marginal calibration error in multiclass settings?
Key findings
- The S-AvUC secondary loss achieves the largest improvement in ECE across datasets and primary losses, with a Cohen’s d effect size indicating a large to huge improvement.
- On CIFAR-100, the method reduces ECE by 82% (70% relative to post-hoc rescaled ECE) while incurring only a 0.7% relative accuracy drop compared to cross-entropy baseline.
- TS-SB-ECE, the post-hoc recalibration method using soft calibration error, consistently outperforms standard temperature scaling across datasets and calibration error measures.
- Soft calibration objectives generalize better under distribution shift than standard training with cross-entropy and post-hoc temperature scaling.
- Even when training with cross-entropy leads to memorization (100% training accuracy), soft calibration objectives reduce test ECE via interleaved training.
- The method achieves state-of-the-art single-model ECE on CIFAR-10, CIFAR-100, and ImageNet with less than 1% accuracy degradation, demonstrating strong trade-off efficiency.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.