Minimax Optimal Two-Stage Algorithm For Moment Estimation Under Covariate Shift

Zhen Zhang, Xin Liu, Shaoli Wang, Jiaye Teng

Introduction

In many machine learning applications, the distribution of data during model training (the source distribution) differs significantly from the distribution encountered during deployment (the target distribution). This phenomenon, known as covariate shift, presents a fundamental challenge for statistical estimation. While much of the existing literature focuses on predicting the underlying function $f(x)$ itself, many practical tasks—such as risk assessment in finance or patient monitoring in medicine—require the estimation of specific functionals, particularly the $q$-th moments (e.g., mean, variance) of the function under the target distribution.

Standard approaches to this problem often rely on likelihood ratio reweighting. However, when the shift between distributions is substantial, these methods frequently become unstable, suffering from high variance or even divergence. This paper introduces a minimax optimal two-stage algorithm designed to calibrate nonparametric estimators, ensuring they maintain theoretical optimality for moment estimation even under significant covariate shift.

The Two-Stage Algorithm

The authors propose a structured framework that separates the learning of the function from the estimation of the moment. The algorithm proceeds in two distinct stages using a data-splitting strategy to prevent overfitting:

  1. Stage I: Nonparametric Estimation The source data is split into two halves. The first half is used to train an optimal nonparametric estimator $\hat{f}$ (such as a Random Forest or moving least squares model) to approximate the function $f$ under the source distribution.

  2. Stage II: Calibration and Debiasing The second half of the data is used to "debias" the initial estimate. The algorithm employs a likelihood ratio $w(x) = p^*(x)/p^\circ(x)$ to reweight the residuals of the first-stage estimator. This ensures that the final moment estimate is adjusted for the target distribution.

Key Innovations

  • Truncated Likelihood Ratios: In practice, the true likelihood ratio is often unknown and must be estimated. If the estimated ratio $\hat{w}(x)$ becomes excessively large, the estimator's variance can explode. The authors introduce a truncation operator $\tau_T(\hat{w}(x))$ that caps weights at a threshold $T$. While this introduces a controlled amount of bias, it drastically improves the stability and convergence rate of the estimator.
  • Double Robustness: The framework is "doubly robust," meaning the moment estimator remains consistent if either the function estimator $\hat{f}$ or the likelihood ratio estimator $\hat{w}$ is consistent.
  • Minimax Optimality: The authors derive the theoretical "speed limit" (minimax lower bound) for moment estimation under covariate shift and prove that their two-stage algorithm achieves this limit, up to a logarithmic factor.

Theoretical Insights

The difficulty of estimating moments under shift is explicitly linked to three primary factors:

  1. Shift Intensity ($B$): The magnitude of the difference between source and target distributions.
  2. Source Irregularity ($\bar{b}$): The local behavior of the source distribution.
  3. Smoothness vs. Order ($s, q$): The interplay between the smoothness of the function ($s$) and the order of the moment being estimated ($q$).

The paper demonstrates a critical bias-variance trade-off: in cases of extreme shift, an unbiased estimator is practically unusable. By strategically selecting the truncation point $T$, the two-stage algorithm achieves a superior convergence rate compared to unbiased versions when the shift is large.

Empirical Results

The algorithm was validated using both synthetic Sobolev space functions and the UCI Airfoil Self-Noise Dataset, which contains NASA observations of airfoil characteristics.

  • Performance: On the Airfoil dataset, the two-stage method significantly outperformed standard Monte Carlo and simple "one-stage" plug-in estimators.
  • Stability: As the intensity of the covariate shift ($B$) increased, the error rates of competing methods spiked, while the two-stage algorithm remained stable. Truncation was shown to produce much tighter error distributions across multiple trials, confirming its role in stabilizing the estimation process.

Conclusion

This work bridges the gap between nonparametric function estimation and functional estimation under distribution shift. By providing a unified theoretical framework and a minimax optimal algorithm, the authors offer a robust solution for moment estimation in real-world scenarios where training and testing data diverge. Future research may extend these principles to more complex functionals, such as those found in causal inference or reinforcement learning, and explore more flexible boundedness assumptions.

Summary updated

BibTeX
@inproceedings{zhang2025minimax,
  author = {Zhen Zhang and Xin Liu and Shaoli Wang and Jiaye Teng},
  title = {{Minimax Optimal Two-Stage Algorithm For Moment Estimation Under Covariate Shift}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=oc4yw7zX9T},
}
Figure