Abstract
Modern neural networks often suffer from over-confidence, providing high-probability predictions that do not reflect their true accuracy. We present ReCal (Recursive Lossy Label-Invariant Calibration), a post-hoc calibration method that leverages the model's response to information-reducing transformations. By grouping inputs based on their sensitivity to these transformations and iteratively applying group-specific scaling, ReCal significantly reduces Expected Calibration Error (ECE) on large-scale datasets like ImageNet without requiring retraining or affecting classification accuracy.
Introduction
While deep learning models have achieved remarkable accuracy, they remain poorly calibrated. A miscalibrated model might assign a 99% confidence score to a prediction that is only correct 70% of the time. This lack of reliability is a major hurdle for deploying AI in safety-critical domains. Existing solutions often fall into two camps: simple global methods like Temperature Scaling, which lack the nuance to handle diverse miscalibration patterns, and complex manifold-based methods that are computationally prohibitive for large-scale datasets. ReCal addresses these limitations by providing an expressive yet scalable post-hoc calibration framework.
Methodology: Lossy Label-Invariant Transformations
The fundamental premise of ReCal is that a model's internal state is revealed by its reaction to information loss. The method utilizes Lossy Label-Invariant Transformations—modifications like zooming out or reducing brightness that make an object harder to recognize without changing its semantic label.
The ReCal algorithm operates in three stages:
- Grouping: A transformation is applied, and the model's response is monitored. Inputs are sorted into four groups based on whether the prediction changed and how the confidence score shifted.
- Iterative Calibration: For each group, a specific "temperature" scaling factor is calculated. If a model maintains high confidence despite significant information loss (e.g., a zoomed-out blur), it indicates over-confidence requiring a stronger correction.
- Recursion: This process is repeated across a pool of various transformations (e.g., different zoom levels, brightness settings), refining confidence scores until the calibration error is minimized.
Crucially, ReCal is a post-hoc method. It only adjusts the final logits, ensuring that the model's original classification decisions remain unchanged.
Experimental Setup
The effectiveness of ReCal was evaluated across multiple architectures, including LeNet5, DenseNet, ResNet, and Wide ResNet. Testing was conducted on three benchmark datasets: CIFAR-10, CIFAR-100, and ImageNet. ImageNet serves as the primary benchmark for scalability, as many competing calibration methods struggle to remain efficient at this scale.
Results and Discussion
ReCal consistently achieved the lowest Expected Calibration Error (ECE) across nearly all tested models and datasets. On ImageNet, it outperformed established baselines like Temperature Scaling and modern approaches like Dir-ODIR.
A key insight is the importance of Group-Wise Nuance. As shown in the figure above, different images react differently to various transformations. By applying "surgical" corrections to specific groups rather than a global scaling factor, ReCal achieves superior calibration. Furthermore, the method is highly efficient; by storing only logits rather than transformed images, memory overhead is reduced to just a few kilobytes per sample. Statistical analysis using the Friedman test confirmed that ReCal's improvements are significant (p < 0.0016).
Conclusion and Future Work
ReCal provides a robust, scalable solution for improving neural network calibration. While the current implementation relies on image-specific transformations like zooming and brightness, the framework is extensible. Future work could involve engineering "lossy" transforms for other modalities like audio or video. Additionally, exploring the simultaneous application of multiple transformations (e.g., combined blurring and zooming) may further enhance the expressiveness of the calibration groups. Despite the iterative nature of the calibration map generation, ReCal remains a practical choice for production-grade models where reliability is paramount.
Summary updated