On Calibration and Out-of-domain Generalization
arXiv:2102.10395
Abstract
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.
24 pages, 6 figures. Published at NeurIPS 2021. Change log for each version: v2 - major revision, main additions are a trainable calibration loss (CLOvE) and experiments with fine-tuning. v3 - minor revision, main changes are added background material and technical details to the supplementary, and a fix to lemma 1. v4 - corrected caption of Table 3 and standard deviations in Tables 2 and 3
References in corpus (9)
- On Calibration of Modern Neural Networks
- On Fairness and Calibration
- Out-of-Distribution Generalization via Risk Extrapolation (REx)
- Evaluating model calibration in classification
- The Risks of Invariant Risk Minimization
- Calibrating Deep Neural Networks using Focal Loss
- In Search of Lost Domain Generalization
- Out-of-distribution Prediction with Invariant Risk Minimization: The Limitation and An Effective Fix
- Sample Complexity of Uniform Convergence for Multicalibration