Precise High-Dimensional Asymptotics for Quantifying Heterogeneous Transfers

Fan Yang, Hongyang R. Zhang, Sen Wu, Christopher Ré, Weijie J. Su

TL;DR

This paper uses Random Matrix Theory to provide the first precise mathematical characterization of "negative transfer" in high-dimensional linear regression. The authors prove that adding more data from a source task can actually degrade performance on a target task—a phenomenon known as a phase transition—and demonstrate exactly how covariate and model shifts dictate the success or failure of transfer learning.

What Problem Does This Paper Address?

In machine learning, we often try to improve a model for a "target task" by using data from a related "source task." Intuitively, more data should be better. However, practitioners frequently encounter negative transfer, where including source data actually makes the target model perform worse than if it had been trained on target data alone.

While the community has observed this empirically, precisely quantifying the trade-offs has been difficult. The effect of transfer depends on a complex interplay between sample sizes ($n_1, n_2$), the dimensionality of the data ($p$), the alignment of feature distributions (covariate shift), and the differences in the underlying ground-truth models (model shift). This paper aims to move beyond loose bounds and provide exact asymptotic formulas for the risk of transfer learning estimators in high-dimensional settings.

Methods

The authors focus on Hard Parameter Sharing (HPS), a classical approach where a single parameter vector is learned by minimizing the combined squared error across both tasks.

To analyze this, they employ the proportional limit framework, where the number of samples ($n$) and the number of features ($p$) both go to infinity at a fixed ratio. Their primary tools come from Random Matrix Theory (RMT) and Free Probability Theory:

  • Stieltjes Transforms and Local Laws: Used to derive the precise variance of the estimator by analyzing the spectral properties of the sum of two different sample covariance matrices.
  • Free Additive Convolution: Used to handle the bias term, which involves asymmetric combinations of matrices that are notoriously difficult to analyze using standard multivariate statistics.
  • Random-Effects Model: A specific statistical setup used to illustrate the findings, where each task's model is a combination of a shared component and a task-specific random "nudge."

Datasets

As a theoretical work, the paper relies on synthetic simulations to validate its asymptotic results.

  • Isotropic and Anisotropic Gaussian Designs: Covariates are sampled from Gaussian distributions with varying population covariance matrices to simulate different levels of covariate shift.
  • Linear Model Simulations: Labels are generated following linear relationships with varying degrees of model shift ($\mu$) and noise ($\sigma^2$).

The simulations demonstrate that the theoretical predictions hold remarkably well even for finite dimensions (e.g., $p=100$).

Key Insights and Ideas

  • The Phase Transition of Transfer: The most striking finding is a mathematically proven phase transition. As you increase the number of source samples ($n_1$), the target task's risk often follows a U-shaped curve. Initially, the source data helps by reducing variance (positive transfer). Eventually, the bias introduced by the model shift outweighs the variance reduction, and the risk climbs above the single-task baseline (negative transfer).
  • Covariate Shift can be a Blessing: Surprisingly, having different feature distributions isn't always bad. If the source task has a "complementary" spectrum (e.g., it provides information in directions where the target task is data-poor), it can significantly improve the combined estimator's stability.
  • Optimal Downsampling: The theory suggests that if the model shift is high, the minimax optimal strategy is to "downsize" or even completely discard the source task. This provides a formal justification for data selection and reweighting strategies used in practice.

Key Results

The authors provide exact formulas for the asymptotic bias and variance of the HPS estimator.

Figure 1: The phase transition from positive to negative transfer. As $n_1$ increases, the excess risk for HPS (colored lines) initially drops below the OLS baseline (gray line) but eventually crosses back above it if the model shift $\mu$ is large enough.

As seen in Figure 1, when the model shift is low ($\mu=0.2$), transfer is almost always beneficial. However, for higher shifts ($\mu=0.45$), the HPS estimator is immediately worse than simple Ordinary Least Squares (OLS) on the target data.

Additionally, the paper proves that an adjusted HPS estimator—one that chooses between HPS and OLS based on the estimated shift—achieves the minimax optimal rate, matching the theoretical lower bounds for this problem.

Limitations and Future Work

  • Gaussian Assumptions: While the variance results are quite general, the precise bias limits currently assume Gaussian covariates. The authors conjecture these results hold for broader distributions but leave the formal proof for future work.
  • Asymmetric Matrices: Characterizing the bias under arbitrary anisotropic covariate shifts remains technically challenging due to the asymmetry of the resulting random matrices (specifically the Fisher-like matrices mentioned in Remark 11).
  • Over-parameterized Regime: This study focuses on the under-parameterized setting ($n > p$). Extending these precise asymptotics to the "double descent" regime where $p > n$ is a natural next step.

Summary updated

Abstract

The problem of learning one task using samples from another task is central to transfer learning. In this paper, we focus on answering the following question: when does combining the samples from two related tasks perform better than learning with one target task alone? This question is motivated by an empirical phenomenon known as negative transfer, which has been observed in practice. While the transfer effect from one task to another depends on factors such as their sample sizes and the spectrum of their covariance matrices, precisely quantifying this dependence has remained a challenging problem. In order to compare a transfer learning estimator to single-task learning, one needs to compare the risks between the two estimators precisely. Further, the comparison depends on the distribution shifts between the two tasks. This paper applies recent developments of random matrix theory to tackle this challenge in a high-dimensional linear regression setting with two tasks. We show precise high-dimensional asymptotics for the bias and variance of a classical hard parameter sharing (HPS) estimator in the proportional limit, where the sample sizes of both tasks increase proportionally with dimension at fixed ratios. The precise asymptotics apply to various types of distribution shifts, including covariate shifts, model shifts, and combinations of both. We illustrate these results in a random-effects model to mathematically prove a phase transition from positive to negative transfer as the number of source task samples increases. One insight from the analysis is that a rebalanced HPS estimator, which downsizes the source task when the model shift is high, achieves the minimax optimal rate. The finding regarding phase transition also applies to multiple tasks when covariates are shared across tasks. Simulations validate the accuracy of the high-dimensional asymptotics for finite dimensions.
BibTeX
@misc{yang2020precise,
  author = {Fan Yang and Hongyang R. Zhang and Sen Wu and Christopher Ré and Weijie J. Su},
  title = {{Precise High-Dimensional Asymptotics for Quantifying Heterogeneous Transfers}},
  year = {2020},
  eprint = {2010.11750},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.11750},
}

Loading related content...

Figure