Modern deep neural networks often suffer from miscalibration, where their confidence scores do not accurately reflect the actual likelihood of being correct. For instance, a model might predict a class with 99% confidence but only be correct 70% of the time. While various reweighted loss functions like Focal Loss and Inverse Focal Loss have been proposed to mitigate this, the theoretical underpinnings of why certain weights improve calibration have remained unclear. This work establishes a principled link between neural network calibration and selective classification, proposing a novel loss function that targets low-confidence regions to improve model reliability.
The Selective Risk Connection
The authors demonstrate that minimizing calibration error is mathematically equivalent to optimizing for selective classification—a paradigm where a model can choose to "abstain" from making a prediction if its confidence is too low. A perfectly calibrated model acts as an optimal selective classifier. To achieve this, the training objective should "polarize" confidence: maximizing it for correct samples while collapsing it toward a uniform distribution for incorrect ones.
Existing methods like Focal Loss emphasize hard examples (low $p$), while Inverse Focal Loss focuses on easy ones (high $p$). However, these methods weight samples based on absolute probability magnitudes. The authors argue that the relative rank of confidence scores is more critical for calibration than absolute values.
The $AU\mathbb{P}_{\mathcal{X}_\tau}$ Loss
Inspired by the Area Under the Risk-Coverage Curve (AURC), the authors propose the $AU\mathbb{P}_{\mathcal{X}_\tau}$ loss. This function specifically targets the "uncertain region" (low-confidence samples $\mathcal{X}_\tau$). By focusing on samples that are most likely to be miscalibrated, the model avoids wasting capacity on ranking high-confidence samples where the relative order is less impactful.
To make this approach computationally feasible, the authors implemented a differentiable bin-based Cumulative Distribution Function (CDF) approximation. Standard rank-based metrics require $O(n \log n)$ sorting; the proposed sigmoid-based smoothed step functions reduce this complexity to $O(nM)$, where $M$ is the number of bins, allowing for efficient gradient-based optimization even in large-scale architectures.
Experimental Results
The method was evaluated on CIFAR-10, CIFAR-100, and Tiny-ImageNet using a variety of architectures, including ResNets, WideResNets, and Vision Transformers (ViT/Swin).
As shown in the reliability diagrams, the proposed $AU\mathbb{P}_{\mathcal{X}_\tau}$ loss consistently outperformed state-of-the-art trainable calibration methods. On CIFAR-10 with a PreResNet-56, it achieved an Expected Calibration Error (ECE) of 0.92%, significantly lower than standard Cross-Entropy (2.62%) and Focal Loss (5.83% in this setup). The method also demonstrated superior class-wise calibration (cwECE), ensuring reliability across all possible labels rather than just the top prediction.
Conclusion
By framing calibration as a selective classification problem, this research provides a theoretical foundation for reweighted risks. The resulting $AU\mathbb{P}_{\mathcal{X}_\tau}$ loss offers a robust, efficient, and highly effective way to train well-calibrated neural networks across diverse datasets and modern architectures.
Summary updated