Environment-Adaptive Covariate Selection: Learning When to Use Spurious Correlations for Out-of-Distribution Prediction
Shuozhi Zuo, Yixin Wang
TL;DR
This work addresses the gap where invariant or purely causal covariate selection underperforms ERM in out-of-distribution (OOD) prediction when not all causal factors are observed. It shows that proxy covariates can be informative under some shifts but unreliable under others, making the optimal covariate set environment-dependent. The authors propose Environment-Adaptive Covariate Selection (EACS), which learns a mapping from unlabeled target-environment covariate summaries to environment-specific covariate subsets, with discrete and soft-gating implementations and theoretical guarantees. They further integrate prior causal knowledge as constraints to stabilize selection and demonstrate improved predictive performance across simulations and two real-world datasets (bike sharing and ACS Income). Overall, EACS offers a principled, data-driven alternative to fixed causal/invariant rules, enabling robust OOD predictions by leveraging observable signatures of distribution shifts.
Abstract
Out-of-distribution (OOD) prediction is often approached by restricting models to causal or invariant covariates, avoiding non-causal spurious associations that may be unstable across environments. Despite its theoretical appeal, this strategy frequently underperforms empirical risk minimization (ERM) in practice. We investigate the source of this gap and show that such failures naturally arise when only a subset of the true causes of the outcome is observed. In these settings, non-causal spurious covariates can serve as informative proxies for unobserved causes and substantially improve prediction, except under distribution shifts that break these proxy relationships. Consequently, the optimal set of predictive covariates is neither universal nor necessarily exhibits invariant relationships with the outcome across all environments, but instead depends on the specific type of shift encountered. Crucially, we observe that different covariate shifts induce distinct, observable signatures in the covariate distribution itself. Moreover, these signatures can be extracted from unlabeled data in the target OOD environment and used to assess when proxy covariates remain reliable and when they fail. Building on this observation, we propose an environment-adaptive covariate selection (EACS) algorithm that maps environment-level covariate summaries to environment-specific covariate sets, while allowing the incorporation of prior causal knowledge as constraints. Across simulations and applied datasets, EACS consistently outperforms static causal, invariant, and ERM-based predictors under diverse distribution shifts.
