Abstract
Modern deep neural networks often suffer from overconfidence, where predicted probabilities significantly exceed actual accuracy. This phenomenon, linked to excessive logit magnitudes, undermines the reliability of model outputs. We present ρ-Norm Scaling, a post-hoc calibration method that regulates logit amplitudes using a learnable norm. By optimizing a multi-level loss function that balances bin-level calibration and instance-level distribution similarity, our method achieves state-of-the-art calibration performance across various datasets and architectures without compromising classification accuracy.
Introduction
In critical applications, deep learning models must not only be accurate but also well-calibrated. A well-calibrated model's predicted probability of 0.9 should correspond to a 90% success rate. However, high-capacity networks tend to produce overconfident predictions due to "output magnitude amplification." During training, raw logit scores often grow excessively large, pushing the Softmax function into saturation and clustering probabilities near 1.0.
The Calibration Challenge
Existing post-hoc solutions like Temperature Scaling (TS) often lack expressivity, using a single scalar to dampen all outputs. Furthermore, many methods focus solely on bin-level metrics like Expected Calibration Error (ECE), which can lead to overfitting on validation sets and the loss of instance-specific uncertainty information. This paper, presented at AAAI-2025, addresses these gaps by introducing a more flexible scaling structure and a multi-level optimization objective.
Proposed Method: ρ-Norm Scaling
1. Parametric ρ-Norm Scaling Structure
The core of the proposed method is the ρ-norm scaling of logits ($z$): $$r_j(z) = \frac{z_j}{\gamma \|z\|_\rho + \beta}$$ where $\|z\|_\rho$ is the ρ-norm of the logit vector, and $\gamma, \beta$, and $\rho$ are learnable parameters. This transformation adaptively "squashes" outputs based on their overall magnitude. Importantly, this scaling is decision-invariant, meaning it changes the confidence score but never alters the predicted class, preserving the original model's accuracy.
2. Multi-level Optimization Objective
To maintain the model's inherent uncertainty structure while improving calibration, the authors employ a dual-purpose loss function: $$l = l_{SCE} + \alpha l_{KL}$$ * Square Calibration Error ($l_{SCE}$): A bin-level loss ensuring average confidence aligns with average accuracy within discrete bins. * KL Divergence ($l_{KL}$): An instance-level regularizer that penalizes the calibrated distribution if it drifts too far from the shape of the original model's distribution. This ensures the model retains its relative uncertainty between classes.
Experimental Results and Insights
The method was evaluated on a wide variety of standard image classification benchmarks, including CIFAR-10/100, SVHN, 102 Flower, and Tiny-ImageNet, across architectures such as ResNet and VGG.
Key Findings
- Amplitude as the Culprit: As shown in the training curves, output amplitudes steadily increase over time, which directly correlates with rising calibration error. Taming this amplitude is more effective than simple score shifting.
- The Power of ρ: Ablation studies showed that the best results usually occur when ρ is around 1.75 to 2.25. This suggests that the "geometry" of model uncertainty isn't strictly Euclidean (ρ=2) or Manhattan (ρ=1), but something in between that needs to be learned.
- Superior Performance: ρ-Norm Scaling consistently outperformed baselines. On CIFAR-100 with ResNet18, the ECE dropped from 0.160 (uncalibrated) to 0.009, significantly better than Temperature Scaling (0.033).
Conclusion
ρ-Norm Scaling provides a robust, efficient, and expressive framework for model calibration. By treating the original model's output as a prior and regulating logit amplitude, it achieves superior generalization on unseen data. Future work will explore differentiable learning of the ρ parameter and applications to large language models (LLMs), which are notoriously overconfident.
Summary updated