Off-Policy Evaluation and Learning for External Validity under a Covariate Shift

Masatoshi Uehara, Masahiro Kato, Shota Yasui

Introduction

Off-Policy Evaluation (OPE) is a critical task in machine learning, aimed at estimating the performance of a new "evaluation policy" using historical data collected by a different "behavior policy." A common but often unrealistic assumption in OPE is that the distribution of features (covariates) remains constant between the historical data and the target environment. In practice, real-world applications frequently encounter covariate shift, where the target population differs significantly from the source population. This paper addresses the "external validity" problem by providing a mathematically rigorous framework for OPE and Off-Policy Learning (OPL) under such shifts.

The Challenge of External Validity

The core issue is that standard OPE methods become biased when the feature distribution $p(x)$ of the historical data does not match the distribution $q(x)$ of the target evaluation environment. For instance, a policy optimized for a specific clinical trial population might fail when applied to the general public due to differences in demographics or health profiles.

Graphical representation of the covariate shift between historical data (left) and evaluation data (right).

To achieve external validity, estimators must account for both the policy difference (the ratio of evaluation policy $\pi^e$ to behavior policy $\pi^b$) and the population shift (the density ratio $q(x)/p(x)$).

The Doubly Robust Estimator under Covariate Shift (DRCS)

The authors propose the Doubly Robust Estimator under Covariate Shift (DRCS), which integrates three distinct components to ensure stability and accuracy:

  1. Density Ratio ($\hat{r}$): Estimates the shift between the target and historical population distributions ($q(x)/p(x)$).
  2. Policy Weighting ($\hat{w}$): Adjusts for the discrepancy between the behavior and evaluation policies.
  3. Reward Model ($\hat{f}$): A direct method that predicts expected rewards for given covariates and actions.

The DRCS estimator is "doubly robust" because it remains consistent if either the combined population-shift/policy model is correct or the reward prediction model is correct. Furthermore, the authors derive the semiparametric efficiency bound for this scenario and demonstrate that DRCS is asymptotically efficient, reaching the theoretical minimum Mean Squared Error (MSE) as sample sizes increase. To handle complex "black-box" models, a cross-fitting procedure is used to maintain statistical validity.

Empirical Evaluation

The proposed methods were evaluated using classification datasets (SatImage, Vehicle, PenDigits) transformed into contextual bandit problems with simulated covariate shifts.

Comparison of Mean Squared Error (MSE) and Standard Deviation (SD) for various estimators across different shift scenarios.

The experimental results highlight several key findings:

  • Superior Accuracy: The DRCS estimator consistently achieved the lowest MSE compared to standard Direct Methods (DM) and Inverse Probability Weighting (IPW) variants across all tested datasets.
  • Stability: While IPW-based methods often exhibited high variance or failed under extreme shifts, DRCS remained stable by leveraging the reward model.
  • Effective Learning: When extended to Off-Policy Learning (OPL), the DRCS-based objective successfully identified policies that maximized rewards specifically for the target population.

Conclusion

This work provides a robust foundation for evaluating and training policies in environments subject to covariate shift. While the method assumes "strong overlap"—requiring that the target population be represented within the historical data—it offers a significant step forward in ensuring the external validity of machine learning models. Future research may extend these concepts to more complex "transportability" scenarios involving causal relationships that change across environments.

Summary updated

BibTeX
@inproceedings{uehara2020off,
  author = {Masatoshi Uehara and Masahiro Kato and Shota Yasui},
  title = {{Off-Policy Evaluation and Learning for External Validity under a Covariate Shift}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=sIjUhpSzkHH},
}
Figure