Introduction
Modern deep neural networks are notoriously poorly calibrated, often exhibiting overconfidence where a "90% confidence" score does not correspond to a 90% success rate. While Temperature Scaling (TS) is a common post-hoc solution, it is limited: it only rescales the final output, failing to improve underlying accuracy or maintain calibration under distribution shifts (e.g., blurry or noisy data).
Layer-Stack Temperature Scaling (LATES) addresses these limitations by aggregating predictions from intermediate layers. By treating these layers as a "committee," LATES captures general-purpose features from early layers that can correctly classify "easy" examples, thereby improving both accuracy and uncertainty estimation with negligible computational overhead.
Methodology
LATES is a post-hoc calibration method that extends temperature scaling across the network's depth using a stacking technique. The process involves three primary stages:
- Probing: Linear probes (small classifiers) are inserted into the intermediate layers of a frozen, pre-trained model. These probes learn to predict targets based on layer-specific activations.
- Stacking Logits: During inference, logits from all intermediate probes and the original classifier are concatenated into a single matrix.
- Aggregation: A lightweight aggregator—a linear layer with one weight ($\beta$) per layer—is trained on a small validation set to learn the optimal weighted combination of these "votes."
Crucially, LATES does not require retraining the backbone architecture, making it highly efficient. For a ResNet50, it adds less than 1% to the parameter count and less than 0.7% to GFlops.
Experimental Results
The authors evaluated LATES on standard benchmarks (CIFAR-10/100, ImageNet) and corrupted datasets to test out-of-distribution (OOD) robustness.
Performance Gains
Unlike standard calibration methods that only adjust probabilities, LATES can change the final predicted class by leveraging intermediate features. This allows it to break the traditional accuracy-calibration trade-off. On ImageNet with a ResNet50 backbone, LATES significantly outperformed standard Temperature Scaling (T) across multiple metrics.
As shown in the table above, LATES reduced the Expected Calibration Error (ECE) from 0.060 to 0.023 while simultaneously boosting Top-1 accuracy from 73.8% to 74.5%.
Robustness and Efficiency
LATES demonstrates superior stability in low-data regimes, where standard TS often degrades calibration. Furthermore, it shows consistent improvements in Area Under the ROC Curve (AUC) and calibration under distribution shifts, outperforming baseline methods as data corruption levels increase. When combined with other techniques like Monte Carlo (MC) Dropout, LATES matches or exceeds state-of-the-art uncertainty estimation results.
Conclusion and Limitations
LATES provides a lightweight, post-hoc path to more reliable neural networks. While it introduces a one-time training overhead for probes (roughly 25% of initial training time), the inference-time cost is minimal. Future work may explore its application beyond CNNs and Vision Transformers to architectures like LSTMs or Large Language Models (LLMs).
Summary updated