Optimal Algorithms in Linear Regression under Covariate Shift: On the Importance of Precondition

Yuanshi Liu, Haihan Zhang, Qian Chen, Cong FangarXiv 2025

Abstract

A central challenge in modern statistical learning is achieving robust generalization when the deployment (target) distribution differs from the training (source) distribution—a phenomenon known as covariate shift. This paper provides the first information-theoretic minimax optimality results for high-dimensional linear regression in this setting. We establish that the optimal estimator is a specific linear transformation, or preconditioner, of the best source-distribution estimator. Furthermore, we demonstrate that common optimization algorithms, specifically Accelerated Stochastic Gradient Descent (ASGD), can achieve this theoretical limit under certain geometric conditions. Our findings provide a rigorous foundation for understanding how preconditioning and momentum drive generalization in out-of-distribution (OOD) scenarios.

Introduction

In the canonical setting of covariate shift, the relationship between features and labels remains constant, but the marginal distribution of the features changes. While this problem has been studied extensively, existing theoretical characterizations often rely on coarse metrics or asymptotic assumptions that fail to capture the fine-grained geometry of high-dimensional data. This research addresses two fundamental questions:

  1. What is the absolute lower bound of risk (minimax risk) for any algorithm given a specific source-target pair?
  2. Do standard optimization tools like Stochastic Gradient Descent (SGD) reach this theoretical speed limit?

Establishing the Minimax Limit

To find the "speed limit" of learning under shift, we derive a tight lower bound for generalization error using a multivariate version of the Bayesian Cramér-Rao inequality. This approach allows us to characterize the statistical bottleneck inherent in the shift between the source covariance matrix and the target covariance matrix.

We prove that the minimax optimal estimator is not necessarily a simple reweighting of samples. Instead, it is a preconditioned estimator. By applying a specific linear transformation to the standard least-squares solution, we can balance the trade-off between the bias introduced by the source distribution and the variance required by the target distribution. Crucially, we show that finding this optimal transformation is a convex optimization problem, ensuring that the theoretically optimal solution is also computationally reachable.

Optimization as Preconditioning

A significant contribution of this work is the bridge between statistical theory and optimization practice. We analyze an integrated framework of Accelerated Stochastic Gradient Descent (ASGD) with geometrically decaying step sizes. Our analysis reveals that ASGD naturally acts as a "greedy" preconditioner.

As the algorithm iterates, it prioritizes learning along the directions where the source data provides the most information. We decompose the resulting error into "effective bias" and "effective variance," showing that the internal dynamics of ASGD can be mapped directly to the ideal preconditioner derived in our minimax analysis.

The Role of Momentum

Beyond merely accelerating convergence, momentum plays a qualitative role in generalization. We find that momentum expands the "optimal region" of the feature space. It allows the algorithm to resolve finer details of the target distribution that vanilla SGD would ignore, effectively increasing the "effective dimension" of what the model can learn from the source data. This provides a formal justification for why momentum-based methods are often superior in OOD tasks.

Explaining "Emergence"

The framework also offers a mathematical perspective on the phenomenon of "emergence" often observed in Large Language Models (LLMs). In our model, sudden jumps in performance (phase transitions) occur when the sample size $n$ crosses a threshold that allows the algorithm to eliminate bias in the most critical parameters of the target task. This suggests that emergence may be a natural consequence of the geometric alignment between training data and task requirements.

Conclusion

This paper establishes that preconditioning is the fundamental mechanism for optimal linear regression under covariate shift. By proving that ASGD can achieve minimax optimality, we provide a theoretical link between the geometry of data distributions and the dynamics of gradient-based learning. While currently focused on linear models, these results suggest that the success of modern deep learning may depend heavily on how optimization trajectories implicitly precondition the model for target distributions.

Summary updated

BibTeX
@misc{liu2025optimal,
  author = {Yuanshi Liu and Haihan Zhang and Qian Chen and Cong Fang},
  title = {{Optimal Algorithms in Linear Regression under Covariate Shift: On the Importance of Precondition}},
  year = {2025},
  eprint = {2502.09047},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.09047},
}
Figure