TL;DR
Deep neural networks often provide overconfident predictions when encountering data outside their training distribution (domain drift). This paper introduces a simple yet effective post-hoc calibration method that perturbs the validation set to better train existing calibration techniques, leading to significantly improved uncertainty estimates under domain drift.
What Problem Does This Paper Address?
Deep neural networks (DNNs) are powerful tools, but their confidence scores (how sure they are about a prediction) are often unreliable, especially when faced with data that differs from what they were trained on – a phenomenon known as "domain drift." This unreliability is a major hurdle for deploying DNNs in safety-critical applications like healthcare or in dynamic environments where data distributions change over time. While post-hoc calibration methods exist to improve confidence scores on in-domain data, their performance degrades significantly under domain drift, leading to overly confident, incorrect predictions. This paper aims to bridge this gap by developing a calibration strategy that remains effective even when the data distribution shifts.
Methods
The core contribution of this paper is a novel strategy for perturbing the validation set before applying existing post-hoc calibration methods. Instead of using a standard validation set drawn from the same distribution as the training data, the authors propose to artificially introduce domain shifts to the validation data. This is achieved by applying random transformations (like rotations, shifts, or adding noise) to the validation samples.
The intuition is that by training calibration methods on this "domain-drifted" validation set, they learn to be more robust and provide better uncertainty estimates when encountering similar shifts in real-world test data. The paper then evaluates several established post-hoc calibration techniques (like Temperature Scaling, Isotonic Regression, and their variants) using this perturbed validation set, comparing their performance against standard in-domain calibration.
Datasets
The paper uses several datasets for evaluation:
- CIFAR-10: A widely used benchmark for image classification.
- ImageNet: A large-scale dataset for image classification.
- ObjectNet: A recently proposed large-scale dataset designed to challenge object recognition models by introducing biases and variations in viewpoints, backgrounds, and rotations, making it particularly suitable for evaluating domain drift robustness.
The authors also introduce a method for generating perturbed validation sets, which can be seen as a synthetic benchmark for domain drift scenarios.
Key Insights and Ideas
- Standard calibration fails under domain drift: Existing post-hoc calibration methods, while effective for in-domain data, become highly overconfident when faced with domain shifts, failing to reflect the true uncertainty.
- Perturbing the validation set is key: The simple act of applying domain-like perturbations to the validation set before calibration training significantly improves the robustness of calibration methods.
- Generic domain shifts are effective: The proposed method uses generic random perturbations to simulate domain drift, demonstrating that this approach is broadly applicable and doesn't require prior knowledge of the specific type of domain shift.
- Isotonic Regression benefits most: While the perturbation strategy improves most calibration methods, Isotonic Regression (IR) and its accuracy-preserving variant (IRM) show particularly strong gains, especially in challenging out-of-distribution scenarios.
- Trade-off between accuracy and calibration: Some accuracy-preserving calibration methods (like TS-P, ETS-P) might slightly increase in-domain calibration error, highlighting a potential trade-off that practitioners need to consider.
Key Results
- The proposed perturbed validation set approach consistently improves calibration error (measured by Expected Calibration Error - ECE) across various architectures and datasets when tested under domain drift scenarios.
- For instance, Figure 3 shows that their approach significantly reduces the mean ECE compared to standard tuning for all tested post-hoc calibrators on CIFAR-10 and ImageNet.
- In out-of-distribution (OOD) scenarios, the perturbed tuning strategy leads to substantially lower confidence scores for incorrect predictions, indicating better uncertainty awareness (Figure 6).
- Table 1 and Figure 4 demonstrate that their method outperforms baseline calibrators across numerous affine transformations and image perturbations.
Limitations and Future Work
- Accuracy vs. Calibration Trade-off: While the perturbed validation set generally improves calibration, some accuracy-preserving methods might see a slight increase in in-domain ECE. The paper notes that IR-P might cause minor accuracy changes, but this is often outweighed by its improved calibration under drift.
- Validation Set Size: Figure 10 suggests that for methods like IR-P, a sufficiently large validation set is crucial to maintain accuracy, especially when dealing with domain drift.
- Future Work: The authors suggest that their approach can be readily applied to any post-hoc calibration method. They also highlight that combining their method with expressive non-parametric techniques like Isotonic Regression offers a promising path towards well-calibrated predictions across all levels of domain shift, from in-domain to truly OOD.
Summary updated