Abstract
Covariate-shift generalization, a typical case in out-of-distribution (OOD) generalization, requires a good performance on the unknown test distribution, which varies from the accessible training distribution in the form of covariate shift. Recently, independence-driven importance weighting algorithms in stable learning literature have shown empirical effectiveness to deal with covariate-shift generalization on several learning models, including regression algorithms and deep neural networks, while their theoretical analyses are missing. In this paper, we theoretically prove the effectiveness of such algorithms by explaining them as feature selection processes. We first specify a set of variables, named minimal stable variable set, that is the minimal and optimal set of variables to deal with covariate-shift generalization for common loss functions, such as the mean squared loss and binary cross-entropy loss. Afterward, we prove that under ideal conditions, independence-driven importance weighting algorithms could identify the variables in this set. Analysis of asymptotic properties is also provided. These theories are further validated in several synthetic experiments.
Introduction
Standard machine learning models are typically built on the Independent and Identically Distributed (i.i.d.) assumption, where training and testing data are drawn from the same distribution. However, real-world applications frequently encounter covariate shift, a scenario where the distribution of input features changes between training and deployment, while the underlying relationship between features and labels remains constant.
To address this, "stable learning" algorithms have emerged, utilizing independence-driven importance weighting to improve robustness. While methods like Decorrelated Weighting Regression (DWR) and Stable Regression via Density Optimization (SRDO) have shown empirical success, a rigorous theoretical explanation for why they work has been lacking. This paper bridges this gap by framing stable learning as a principled feature selection process.
The Minimal Stable Variable Set
The core theoretical contribution is the definition of the Minimal Stable Variable Set ($S$). This is the smallest subset of features that preserves the full predictive power of the entire feature set, formally defined such that $E[Y|S] = E[Y|X]$.
Unlike the Markov Boundary, which includes all variables useful for prediction in a specific environment, the Minimal Stable Variable Set is a more robust subset sufficient for predicting the conditional mean of the target variable. This makes it inherently more resilient to distribution shifts. The authors prove that independence-driven importance weighting (IW) algorithms effectively act as a filter, identifying this set by forcing statistical independence among features in the weighted training distribution.
Theoretical Guarantees
The paper treats IW algorithms as a two-step process: first, learning sample weights that decorrelate features, and second, performing Weighted Least Squares (WLS) on the weighted data. The authors provide theoretical guarantees (Theorems 1.1 and 1.2) showing that under ideal conditions, the variables with non-zero coefficients in the WLS step correspond exactly to the minimal stable variable set.
This explains the "Aha!" moment of stable learning: it isn't just about reweighting samples; it is a mechanism for "filtering out" spurious variables that appear predictive only due to coincidental correlations in the training data. The authors also provide a non-asymptotic analysis to account for real-world constraints like finite sample sizes and imperfectly learned weights.
Experimental Validation
The theories were tested using synthetic datasets with both non-linear MLP-based ($Y_{MLP}$) and polynomial ($Y_{poly}$) outcome functions. Features were divided into "stable" (causal) and "unstable" (spurious) variables. To simulate covariate shift, the authors generated 10 different test environments by varying the "spurious correlation strength" ($r_{tr}$).
As shown in the results, SRDO and DWR significantly outperform traditional feature selection methods like LASSO, XGBoost, and Mutual Information. Specifically, they maintain high F1 scores for feature identification and consistent Root Mean Squared Error (RMSE) across varying levels of distribution shift, whereas standard models degrade as spurious correlations change. Forcing statistical independence (as SRDO does) proved more powerful than simple linear decorrelation (DWR), especially for highly non-linear relationships.
Conclusion and Future Work
This work provides the first rigorous foundation for stable learning, identifying feature selection as the underlying mechanism for its success. While the current framework is optimized for regression and binary classification, the authors note that the "minimal stable variable set" is currently tied to loss functions where the conditional mean is the global optimum. Future research may extend these principles to multi-class settings and deeper neural network architectures. By identifying the minimal stable variable set, researchers can build models that are not just accurate on training data, but truly robust to the unpredictable shifts of the real world.
Summary updated