[Paper Review] On Calibration and Out-of-domain Generalization
This paper proposes multi-domain calibration as a practical and theoretically grounded surrogate for out-of-domain (OOD) generalization in machine learning. By showing that concurrent calibration across multiple domains implies absence of spurious correlations, the authors introduce methods—model selection via multi-domain ECE, robust isotonic regression, and end-to-end calibration training—that improve OOD performance on WILDS and Colored MNIST benchmarks.
Out-of-domain (OOD) generalization is a significant challenge for machine learning models. Many techniques have been proposed to overcome this challenge, often focused on learning models with certain invariance properties. In this work, we draw a link between OOD performance and model calibration, arguing that calibration across multiple domains can be viewed as a special case of an invariant representation leading to better OOD generalization. Specifically, we show that under certain conditions, models which achieve \emph{multi-domain calibration} are provably free of spurious correlations. This leads us to propose multi-domain calibration as a measurable and trainable surrogate for the OOD performance of a classifier. We therefore introduce methods that are easy to apply and allow practitioners to improve multi-domain calibration by training or modifying an existing model, leading to better performance on unseen domains. Using four datasets from the recently proposed WILDS OOD benchmark, as well as the Colored MNIST dataset, we demonstrate that training or tuning models so they are calibrated across multiple domains leads to significantly improved performance on unseen test domains. We believe this intriguing connection between calibration and OOD generalization is promising from both a practical and theoretical point of view.
Motivation & Objective
- Address the challenge of out-of-domain (OOD) generalization in machine learning, where models fail on unseen distributions despite strong in-domain performance.
- Identify a critical gap in existing invariant representation learning methods, which struggle to scale to high-dimensional data and often fail to eliminate spurious correlations.
- Establish a theoretical link between model calibration across multiple domains and the absence of spurious correlations, framing calibration as a proxy for invariance.
- Develop practical, trainable, and measurable methods to improve multi-domain calibration, leading to better OOD generalization in real-world scenarios.
- Demonstrate empirically that optimizing for multi-domain calibration yields significant gains in OOD accuracy across diverse benchmarks, including WILDS and Colored MNIST.
Proposed method
- Propose a multi-domain Expected Calibration Error (ECE) score as a measure of calibration across multiple environments, defined as the average ECE over all training domains.
- Introduce model selection based on minimizing the multi-domain ECE while constraining in-domain accuracy to a desired threshold, enabling trade-offs between accuracy and robustness.
- Apply robust isotonic regression as a post-processing step to recalibrate models across domains, improving calibration without retraining.
- Formulate an end-to-end training objective that directly optimizes for multi-domain calibration using the method of Kumar et al. (2018), enabling deep networks to learn calibrated, invariant representations.
- Use causal modeling to distinguish between causal, anti-causal non-spurious, and anti-causal spurious features, grounding the theoretical analysis in structural causal models.
- Theoretical analysis proves that in Gaussian-linear models under general position, multi-domain calibration implies absence of spurious correlations, providing a formal justification for the approach.
Experimental results
Research questions
- RQ1Can multi-domain calibration serve as a measurable and trainable surrogate for out-of-domain generalization?
- RQ2Under what conditions does multi-domain calibration imply the absence of spurious correlations in a model?
- RQ3How does multi-domain calibration compare to existing invariance-based methods like Invariant Risk Minimization (IRM) in terms of OOD performance?
- RQ4To what extent can post-processing techniques like isotonic regression improve OOD generalization through enhanced calibration?
- RQ5Does optimizing for multi-domain calibration lead to consistent improvements in OOD accuracy across diverse benchmark datasets?
Key findings
- In Gaussian-linear models under a general-position condition, concurrent calibration across a sufficient number of domains provably eliminates spurious correlations.
- Model selection based on minimizing multi-domain ECE leads to a 64.98% OOD accuracy on a test environment with a 0.25,0.9 distribution, outperforming models selected solely on in-domain accuracy.
- The proposed method achieves significantly better OOD performance than IRMv1 in failure cases, such as when the IRMv1 penalty fails to rank models by OOD accuracy.
- Robust isotonic regression post-processing improves calibration across domains and enhances OOD generalization without retraining.
- Training deep networks with a multi-domain calibration objective leads to substantial gains in OOD accuracy on the WILDS benchmark, particularly on the CivilComments and CAMELYON17 datasets.
- The average ECE over training environments correlates more reliably with OOD performance than the IRMv1 penalty, especially in challenging distribution shifts where IRM fails.
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.