[Paper Review] Robust Calibration with Multi-domain Temperature Scaling
This paper proposes multi-domain temperature scaling, a method that learns domain-specific temperature parameters to improve model calibration across diverse data distributions. By leveraging heterogeneity across multiple domains, the approach achieves significantly better calibration on both in-distribution and out-of-distribution domains compared to standard temperature scaling, with empirical gains confirmed on three benchmark datasets.
Uncertainty quantification is essential for the reliable deployment of machine learning models to high-stakes application domains. Uncertainty quantification is all the more challenging when training distribution and test distribution are different, even the distribution shifts are mild. Despite the ubiquity of distribution shifts in real-world applications, existing uncertainty quantification approaches mainly study the in-distribution setting where the train and test distributions are the same. In this paper, we develop a systematic calibration model to handle distribution shifts by leveraging data from multiple domains. Our proposed method -- multi-domain temperature scaling -- uses the heterogeneity in the domains to improve calibration robustness under distribution shift. Through experiments on three benchmark data sets, we find our proposed method outperforms existing methods as measured on both in-distribution and out-of-distribution test sets.
Motivation & Objective
- Address the critical challenge of model calibration under distribution shifts, where test data distributions differ from training data.
- Recognize that existing calibration methods, such as temperature scaling, fail when applied to individual out-of-distribution domains despite good performance on pooled data.
- Develop a systematic calibration framework that ensures reliable uncertainty estimates across all observed domains and generalizes to unseen domains.
- Theoretical and empirical investigation into whether robust calibration is possible when models are trained on multiple domains with differing data distributions.
Proposed method
- Propose multi-domain temperature scaling, a generalization of single-temperature scaling that learns a domain-specific temperature parameter for each input.
- Use a neural network or function approximator to map input features to a temperature value, enabling adaptive calibration per domain.
- Train the calibration head using validation data from all domains, minimizing expected calibration error (ECE) across domains.
- The method implicitly learns a mixture distribution of in-distribution domains, which serves as a proxy for estimating generalization to out-of-distribution domains.
- Theoretically analyze the method using the H-divergence and pseudo-dimension, showing that good performance on in-distribution domains implies good generalization to unseen domains.
- Optimize domain mixture weights α to minimize the H-divergence between the mixture of in-distribution domains and the out-of-distribution domain, improving robustness.
Experimental results
Research questions
- RQ1Can we improve model calibration under distribution shift by exploiting multi-domain data structure?
- RQ2Does requiring calibration across all observed domains lead to better generalization to unseen domains?
- RQ3Is there a theoretical justification for why multi-domain calibration improves robustness to distribution shift?
- RQ4How does multi-domain temperature scaling compare to standard temperature scaling in terms of calibration error on both in- and out-of-distribution data?
- RQ5Can the mixture of in-distribution domains serve as a proxy for generalization to out-of-distribution domains under the H-divergence framework?
Key findings
- Multi-domain temperature scaling significantly outperforms standard temperature scaling on both in-distribution and out-of-distribution test sets across three benchmark datasets.
- On ImageNet-C, the method achieves substantially lower expected calibration error (ECE) on individual corruption domains compared to pooled-data temperature scaling, which fails to calibrate on individual domains.
- The method maintains well-calibrated confidence estimates even on unseen domains, suggesting improved generalization under distribution shift.
- Theoretical analysis shows that if a model is well-calibrated on all in-distribution domains and the mixture distribution is close to the out-of-distribution distribution in H-divergence, then generalization to unseen domains is likely.
- Empirical results confirm that calibration robustness improves when the method is trained to perform well on every domain, not just on average.
- The proposed method reduces the gap between in-distribution and out-of-distribution calibration, addressing a key limitation of existing approaches.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.