The Power and Limitation of Pretraining-Finetuning for Linear Regression under Covariate Shift
Abstract
We study linear regression under covariate shift, where the marginal distribution over the input covariates differs in the source and the target domains, while the conditional distribution of the output given the input covariates is similar across the two domains.
We investigate a transfer learning approach with pretraining on the source data and finetuning based on the target data (both conducted by online
SGD) for this problem.
We establish sharp instance-dependent excess risk upper and lower bounds for this approach.
Our bounds suggest that for a large class of linear regression instances, transfer learning with O ( N 2 ) source data (and scarce or no target data) is as effective as supervised learning with N target data.
In addition, we show that finetuning, even with only a small amount of target data, could drastically reduce the amount of source data required by pretraining.
Our theory sheds light on the effectiveness and limitation of pretraining as well as the benefits of finetuning for tackling covariate shift problems.
Introduction
In transfer learning [Pan and Yang, 2009, Sugiyama and Kawanabe, 2012], an algorithm is provided with abundant data from a source domain and scarce or no data from a target domain, and aims to train a model that generalizes well on the target domain.
A simple yet effective approach is to pretrain a model with the rich source data and then finetune the model with the available target data via, e.g., stochastic gradient descent (SGD) (see, e.g., Yosinski et al.
Despite its wide applicability in practice, the power and limitation of the pretraining-finetuning based transfer learning framework is not fully understood in theory.
The focus of this work is to consider this issue in a specific transfer learning setup known as covariate shift [Pan and Yang, 2009, Sugiyama and Kawanabe, 2012], where the source and target distributions differ in their marginal distributions over the input, but coincide in their conditional distribution of the output given the input.
Regarding the theory of learning with covariate shift, there exists a rich set of results [Ben-David et al., 2010, Germain et al., 2013, Mansour et al., 2009, Mohri and Muñoz Medina, 2012, Cortes and
Mohri, 2014, Cortes et al., 2019, Kpotufe and Martinet, 2018, Hanneke and Kpotufe, 2019, Ma et al., 2022] for the (regularized) empirical risk minimizer, which minimizes the empirical loss over the source data and target data (if available) with potential regularization terms (e.g., ℓ 2 -regularization).
However, in most of these works [Ben-David et al., 2010, Germain et al., 2013, Mansour et al., 2009,
Mohri and Muñoz Medina, 2012, Cortes and Mohri, 2014, Cortes et al., 2019], the generalization error on the target domain is bounded by the sum of a vanishing term (e.g., the training error) and a divergence between the two domains (see, e.g., discussions in Kpotufe and Martinet [2018], with a few notable exceptions that we will discuss later).
Such bounds are very pessimistic because the additive error contributed by the source-target divergence only captures the worst case performance gap caused by distribution mismatch [David et al., 2010] and is too crude to describe the intriguing properties of pretraining-finetuning across different domains.
In this paper, we take a different approach to directly study the generalization performance of the pretraining-finetuning method.
In particular, we consider linear regression under covariate shift, and an online SGD estimator which is firstly trained with the source data and then finetuned with the target data.
We derive a target domain risk bound that is stated as a function of (i) the spectrum of the source and target population data covariance matrices, (ii) the amount of source and target data, and (iii) the (initial) stepsizes for pretraining and finetuning (see Theorem 3.1 for more details).
Moreover, a nearly matching lower bound is provided to justify the tightness of our upper bound.
The derived bounds comprehensively characterize the effects of pretraining and finetuning for each covariate shift problem and each algorithm configuration, based on which we make the following important observations:
• We compare the generalization performance (i
e., target domain excess risk) of pretraining (with source data) vs. supervised learning (with target data).
We show that, for a large class of problems, O ( N 2 ) source data is sufficient for pretraining to match the performance of supervised learning with N target data.
• We next show the benefits of finetuning with scarce target data.
In particular, for the problem class considered before, finetuning can reduce by at least constant factors the amount of source data required by pretraining.
Moreover, there exist problem instances for which the pretrainingfinetuning approach requires polynomially less amount of total data than pretraining (with source data) or supervised learning (with target data).
Finally, our bounds can also be applied to the supervised learning setting, i.e., linear regression with last iterate SGD.
In this case, our upper bound sharpens that of Wu et al.
[2021] by a logarithmic factor, and as a consequence we close the gap between the upper and lower bounds for last iterate SGD when the signal-to-noise ratio is bounded.
Notation.
For two positive-value functions f ( x ) and g ( x ) we write f ( x ) ≲ g ( x ) or f ( x ) ≳
g ( x ) if f ( x ) ≤ cg ( x ) or f ( x ) ≥ cg ( x ) for some absolute constant c > 0 respectively, and we write f ( x ) ≂ g ( x ) if f ( x ) ≲ g ( x ) ≲ f ( x ) .
For two vectors u and v in a Hilbert space, their inner product is denoted by ⟨ u , v ⟩ or equivalently, u ⊤ v .
For a matrix A , its spectral norm is denoted by ∥ A ∥ 2 .
For two matrices A and B of appropriate dimension, their inner product is defined as ⟨ A , B ⟩ := tr( A ⊤ B ) .
For a positive semi-definite (PSD) matrix A and a vector v of appropriate dimension, we write ∥ v ∥ 2 A :=
v ⊤ Av .
For a symmetric matrix A and a PSD matrix B , we write ∥ A ∥ 2 B :=
∥ B − 12 AB − 12 ∥ 22 .
The Kronecker/tensor product is denoted by ⊗ .
For a set S , we use | S | to denote its cardinality.
1.1 Additional Related Work
We review some additional works that are mostly related to ours.
Learning under Covariate Shift.
Kpotufe and Martinet [2018], Pathak et al.
[2022] proposed new similarity measures to the source and target domains, and proved covariate shift bounds that do not contain an additive error of the divergence between the source and target distribution.
Compared to our results, theirs can be applied to nonlinear regression/classifications as well; however in the case of linear regression, our bounds are more fine-grained and are tight upto constant factors for a broad class of problems (see Theorem 3.2), beyond being only optimal in the worst case.
It is worth noting that Hanneke and Kpotufe [2019] studied the value of target data in addressing covariate shift problems.
Their discussion is based on the minimax risk bounds afforded by a given number of source and target data.
In contrast, our discussion on the benefits of finetuning with target data is based on a completely different perspective, which is by comparing the sample inflation [Bahadur, 1967, 1971, Zou et al., 2021a] between pretraining-finetuning vs. pretraining vs. supervised learning, i.e., for each covariate shift problem instance, how much source (and target) data are necessary for pretraning (and finetuning) to match the performance of supervised learning with certain amount of target data.
More recently, Ma et al.
[2022] studied covariate shift problem in the nonparameteric kernel regression setting, with the assumption that the density ratio (or second moment ratio) between the target and source distribution is bounded.
Their results are similar to ours in that their bounds reflect the effect of the spectrum of the source population data covariance.
Since our results are dimension-free, our bounds can also be applied in the nonparameteric kernel regression setting.
There are two notable differences: firstly, their estimator is (weighted) ridge regression and ours is given by SGD; moreover, our results do not rely on the bounded density ratio or bounded second moment condition.
In addition, there is a vast literature on constructing more sample-efficient transfer learning algorithms, e.g., importance weighting methods [Shimodaira, 2000, Cortes et al., 2010] and learning invariant representations [Arjovsky et al., 2019, Wu et al., 2019], to mention a few.
Along this line, Lei et al. [2021] proposed nearly minimax optimal estimator for linear regression under distribution shift, but their method relies on the knowledge of target population covariance matrix.
Developing new transfer learning algorithms is beyond the agenda in this paper.
SGD.
The pretraining and finetuning discussed in this work are both conducted by online SGD, therefore our results are closely related to the generalization analysis of online SGD for linear regression in the supervised learning context [Bach and Moulines, 2013, Dieuleveut et al., 2017, Jain et al., 2017a,b, Ge et al., 2019, Zou et al., 2021b, Varre et al., 2021, Wu et al., 2021].
From a technical point of view, our theoretical results can be viewed as an extension of the SGD analysis from the supervised learning setting to the covariate shift setting.
Problem Setup
Transfer Learning.
We use x to denote a covariate in a Hilbert space (that can be d -dimensional or countably infinite dimensional), and y ∈ R to denote its response.
Consider a source and a target data distribution, denoted by D source and D target respectively.
In the problem of transfer learning , we are given with M data sampled independently from the source distribution, and N data sampled independently from the target distribution (where N ≪ M or even N = 0 ), denoted by ( x i , y i )
M + N i =1 , where ( x i , y i ) ∼ (cid:26) D source , i = , M ;
D
[Equation]
[Equation] + [Equation] The goal of transfer learning is to learn a model based on the M + N data that can generalize on the target domain.
We are particularly interested in the covariate shift problem in transfer learning, where the source and target distributions satisfy: D source ( y | x )
=
D target ( y | x ) but D source ( x ) ̸ =
D target ( x ) .
Linear Regression under Covariate Shift.
A covariate shift problem is formally defined in the context of linear regression by Definitions 1 and 2.
Definition 1 (Covariances conditions) .
Assume that each entry and the trace of the source and target data covariance matrices are finite.
Denote the source and target data covariance matrices by
[Equation]
respectively, and denote their eigenvalues by ( µ i )
i ≥ 1 and ( λ i ) i ≥ 1 , respectively.
For convenience assume that both G and H are strictly positive definite.
Definition 2 (Model conditions) .
For a parameter w , define its source and target risks by
[Equation]
respectively.
Assume that there is a parameter w ∗ that simultaneously minimizes both source and target risks, i.e., w ∗ ∈ arg min w Risk source ( w ) ∩ arg min w Risk target ( w ) .
For convenience assume that w ∗ is unique.
We remark that the strict positive definiteness of G and H in Definition 1 and the uniqueness of w ∗ in Definition 2 are only made for the ease of presentation.
Otherwise one can set w ∗ to be the minimum-norm solution, i.e., w ∗ =
arg min {∥ w ∥ 2 : w ∈ arg min w Risk source ( w ) ∩ arg min w Risk target ( w ) } , and our results still hold.
This argument also holds in a reproducing kernel Hilbert space
[Schölkopf et al., 2002].
Our definitions of linear regression under covaraite shift follow from Lei et al.
[2021], Ma et al.
In the literature, covariate shift problem often assumes the source and target distributions differ in their marginal distributions over the input, but coincide in their conditional distribution of the output given the input (see, e.g., Sections 1.3.3 and 1.3.4 in Sugiyama et al.
When applied to the well-specified linear regression models, i.e., E [ y | x ] = x ⊤ w ∗ for some parameter w ∗ , the latter condition turns out to require the optimal parameter w ∗ is identical for both source and target domains. Therefore, the problems described by Definitions 1 and 2 include at least all well-specified linear regression problems under standard covariate shift conditions. Excess Risk.
For linear regression under covariate shift, the performance of a parameter w is measured by its target domain excess risk , i.e.,
[Equation]
SGD.
The transfer learning algorithm of our interests is pretraining-finetuning via online stochastic gradient descent with geometrically decaying stepsizes 2 (SGD).
Without lose of generality, we assume the SGD iterates are initialized from w 0 = 0 .
Then the SGD iterates are sequentially updated as follows:
[Equation]
where
[Equation]
and the output is the last iterate, i.e., w M + N .
Here γ 0 and γ M are two hyperparameters that correspond to the initial stepsizes for pretraining and finetuning, respectively.
In both pretraining and finetuning phases, the stepsize scheduler in ( SGD ) is epoch-wisely a constant and decays geometrically every certain number of epochs, which is widely used in deep learning [He et al., 2015].
We note that such ( SGD ) for linear regression has been analyzed by Ge et al.
[2019], Wu et al.
[2021] in the context of supervised learning.
Our goal in this work is to understand the generalization of ( SGD ) in the covariate shift problems.
Assumptions.
The following assumptions [Zou et al., 2021b, Wu et al., 2021] are crucial in our analysis.
Assumption 1 (Fourth moment conditions) .
Assume that for both source and target distribution the fourth moment of the covariates is finite.
Moreover:
A There is a constant α > 0 such that for every PSD matrix A it holds that
[Equation]
Clearly, it must hold that α ≥ 1 .
B There is a constant β > {+
+} such that for every PSD matrix A it holds that
[Equation]
Assumption 1 holds with α = 3 and β = 1 given that D source ( x ) =
N ( 0 , G ) and D target ( x ) =
N ( 0 , H ) .
Moreover, Assumption 1A holds if both H − 12 · D source ( x ) and G − 12 · D target ( x ) have sub-Gaussian tails [Zou et al., 2021b].
For more exemplar distributions that satisfy Assumption 1, we refer the reader to Wu et al.
Assumption 2 (Noise condition) .
Assume that there is a constant σ 2 > 0 such that
[Equation]
Assumption 2 puts mild requirements on the conditional distribution of the response given input covariates for both source and target distribution.
In particular, Assumption 2 is directly implied by the following Assumption 2’ for a well-specified linear regression model under covariate shift.
Assumption 2’ (Well-specified noise) .
Assume that for both source and target distributions, the response (conditional on input covariates) is given by y = x
⊤ w ∗ + ϵ, where ϵ ∼ N (0 , σ 2 ) and ϵ is independent with x .
Additional Notation.
Let N + := { 1 , 2 , . . . } .
For an index set K ⊂ N + , its complement is defined by K c := N + − K .
Then for an index set K ⊂ N + and a scalar a ≥ 0 , we define
[Equation]
=
[Equation]
where ( λ i ) i ≥ 1 and ( v i )
i ≥ 1 are corresponding eigenvalues and eigenvectors of H .
One can verify that H − 1 K is equivalent to the (pseudo) inverse of H K .
Similarly, we define G J , G − 1 J and a I J + G J c according to the eigenvalues and eigenvectors of G .
Main Results
An Upper Bound.
We begin with presenting an upper bound for the target domain excess risk achieved by the pretraining-finetuning method.
Theorem 3.1 (upper bound) .
Suppose that Assumptions 1A and 2 hold.
Let w M + N be the output of ( SGD ) .
Let M eff := M/ log( M ) , N eff :
= N/ log( N ) .
Suppose that γ 0 , γ M < min { 1 / (4 α tr( G )) , 1 / (4 α tr( H )) } .
Then it holds that
[Equation]
Moreover, for any two index sets J , K ⊂ N + , it holds that
[Equation]
BiasError ≲
[Equation]
where
D finetuneeff
[Equation]
In particular, the upper bounds are optimized when
[Equation]
The upper bound in Theorem 3.1 contains a bias error stemming from the incorrect initialization w
̸ = w ∗ , and a variance error caused by the additive label noise y − x ⊤ w ∗ ̸ = 0 .
In particular, M eff and N eff are the effective number of source and target data , respectively, due to the effect of the geometrically decaying stepsizes in ( SGD ).
Moreover, D eff can be regarded as the effective dimension of supervised learning [Wu et al., 2021] and D finetuneeff can be regared as the effective dimension of pretraining-finetuning .
Note that D finetuneeff is determined jointly by the spectrum of the source and target population covariance matrices as well as the stepsizes for pretraining and finetuning.
To better illustrate the spirit of Theorem 3.1, let us consider an example where ∥ w 0 − w ∗ ∥ 22 , σ 2 ≲ 1 , γ 0 ≂ 1 , and tr( G )
≂ tr( H ) ≂ 1 (so that the spectrum of G and H must decay fast), then the bound in Theorem 3.1 vanishes provided that
[Equation]
For the first condition in (3) to happen one needs
[Equation]
which can be satisfied when (i) the number of target data N is large and the finetuning stepsize γ M ≂ 1 , or when (ii) N is small and γ M is also small (which can depend on N ).
The second condition in (3) can happen under various situations, e.g., when (i) N is large and γ M ≂ 1 , or when (ii) N , γ M are small but the amount of source data M is large and that
[Equation]
which will hold when G aligns well with H (as a sanity check these hold automatically when G = H and M is large).
To summarize, in case (i) the amount of target data is plentiful so that finetuning with large stepsize leads to generalization (which is essentially supervised learning); and in case (ii) , even though the target data is scarce, pretraining with abundant source data can still generalize given that the source and target population covariance matrices are well aligned.
A Lower Bound.
The following theorem provides a nearly matching lower bound.
Theorem 3.2 (lower bound) .
Suppose that Assumptions 1B and 2’ hold.
Let w M + N be the output of ( SGD ) .
Let M eff := M/ log( M ) , N eff :
= N/ log( N ) , and suppose that M eff , N eff ≥ 10 .
Suppose that γ 0 < 1 / ∥ G ∥ 2 , γ M < 1 / ∥ H ∥ 2 .
Then it holds that
ExcessRisk ( w M + N ) = BiasError + VarError .
Moreover, for the index sets K and J defined in (2) , it holds that
VarError
[Equation]
where D eff and D finetuneeff are as defined in (1) .
The lower bound in Theorem 3.2 suggests that the upper bound in Theorem 3.1 is tight upto constant factor in terms of variance error [Equation] and is also tight in terms of bias error except for the following additional parts in the respective places:
[Equation]
In particular [Equation] the upper and lower bounds match ignoring constant factors provided that
[Equation]
which hold in a statistically interesting regime where the signal-to-noise ratios, ∥ w 0 − w ∗ ∥ 2 G /σ 2 , ∥ w 0 − w ∗ ∥ 2 H /σ 2 , are bounded and G commutes with H .
Implication for Pretraining.
If target data is unavailable, Theorems 3.1 and 3.2 imply the following corollary for pretraining.
Corollary 3.3 (Learning with only source data) .
Suppose that Assumptions 1A and 2 hold.
Let w M +0 be the output of ( SGD ) with M > 100 source data and 0 target data.
Suppose that γ :=
γ 0 < 1 / (4 α tr( H )) .
Then it holds that
[Equation]
where D pretraineff := tr( HG − 1 J ) + M 2 eff γ 2 · tr( HG J c ) and J ⊂ N + can be any index set.
If in addition Assumptions 1B and 2’ hold, then for the index set J defined in (2) , it holds that
[Equation]
Corollary 3.3 sharply characterizes the generalization of pretraining method, and is tight upto constant factors provided with a bounded signal-to-noise ratio, i.e., ∥ w 0 − w ∗ ∥ 2 G ≲ σ 2 .
Corollary 3.3 can be interpreted in a similar way as Theorem 3.1.
Moreover, these sharp bounds for pretraining and pretraining-finetuning enable us to study the effects of pretraining and finetuning thoroughly, which we will do in Section 4.
Implication for Supervised Learning.
As a bonus, we can also apply Theorems 3.1 and 3.2 in the setting of supervised learning.
Corollary 3.4 (Learning with only target data) .
Suppose that Assumptions 1A and 2 hold.
Let w {+
 + N be+} the output of ( SGD ) with 0 source data and N > 100 target data.
Suppose that γ :=
γ M < 1 / (4 α (tr( G ))) .
Then it holds that
[Equation]
where D eff is as defined in (1) and K ⊂ N + can be any index set.
If in addition Assumptions 1B and 2’ hold, then for the index set K defined in (2) , it holds that
[Equation]
We remark that the upper bound in Corollary 3.4 improves the related bound in Wu et al.
[2021] by a logarithmic factor, and matches the lower bound upto constant factors given that ∥ w 0 − w ∗ ∥ 2 H ≲ σ [Equation]
For a more detailed comparison between the bounds in Theorem 3.1, Corollaries 3.3 and 3.4, we refer the reader to Table 1 in Appendix A.
Discussions
With the established bounds, we are ready to discuss the power and limitation of pretraining and finetuning by comparing them to supervised learning.
The Power of Pretraining.
For covariate shift problem, pretraining with infinite many source data can learn the true model.
But when there are only a finite number of source data, it is unclear how the effect of pretraining compares to the effect of supervised learning (with finite many target data).
Our next result quantitatively address this question by comparing Corollary 3.3 with Corollary 3.4.
Theorem 4.1 (Pretraining vs. supervised learning) .
Suppose that Assumptions 1 and 2’ hold.
Let w
+ N sl be the output of ( SGD ) with optimally tuned initial stepsize, 0 source data and N sl >target data.
Let w M +0 be the output of ( SGD ) with optimally tuned initial stepsize, M source data and 0 target data.
Let M eff := M/ log( M ) , N sleff :
=
N sl / log( N sl ) .
Suppose all SGD methods are initialized from 0 .
Then for every covariate shift problem instance ( w ∗ , H , G ) such that H , G commute, it holds that
[Equation]
provided that
[Equation]
where
[Equation]
and γ sl < 1 / ∥ H ∥ 2 refers to the optimal initial stepsize for supervised learning.
We now explain the implication of Theorem 4.1.
First of all, it is of statistical interest to consider a signal-to-noise ratio bounded from above, i.e., ∥ w ∗ ∥ 2 G /σ 2 ≲ 1 .
Note that D sleff ≥ 1 when N sl is large.
Moreover, recall that | K ∗ | ≤ D sleff
= o
( N sleff ) when supervised learning can achieve a vanishing excess risk.
Finally, ∥ H K ∗ ∥ G := ∥
G − 12 H K ∗ G − 12 ∥ 2 ≲ 1 can be satisfied if the top | K ∗ |
= o ( N sleff ) eigenvalues subspace of H mostly falls into the top eigenvalues subspace of G .
Under these remarks, Theorem 4.1 suggests that: in the bounded signal-to-noise cases, pretraining with O ( N 2 ) source data is no worse than supervised learning with N target data (ignoring constant factors), for every covariate shift problem such that the top eigenvalues subspace of the target covariance matrix aligns well with that of the source covariance matrix.
The Power of Pretraining-Finetuning.
We next discuss the effect of pretraining-finetuning by comparing Theorem 3.1 with Corollary 3.4.
Theorem 4.2 (Pretraining-finetuning vs. supervised learning) .
Suppose that Assumptions 1 and 2’ hold.
Let w
+ N sl be the output of ( SGD ) with optimally tuned initial stepsize, 0 source data and
N sl > 100 target data.
Let w M
+
N be the output of ( SGD ) with optimally tuned initial stepsize,
M source data and N target data.
Let M eff := M/ log( M ) , N eff :
= N/ log( N ) , N sleff :=
N sl / log( N sl ) .
Suppose all SGD methods are initialized from 0 .
Then for every covariate shift problem instance ( w ∗ , H , G ) such that H , G commute, it holds that
[Equation]
provided that
[Equation]
where
[Equation]
and K ∗ , D sleff , γ sl are as defined in Theorem 4.1.
Theorem 4.2 can be interpreted in a similar way as Theorem 4.1.
The only difference is that
Theorem 4.2 puts a milder condition regarding the alignment of H and G than Theorem 4.1.
In particular, Theorem 4.2 only requires the “middle” eigenvalues subspace of H mostly falls into the top eigenvalues subspace of G .
Moreover, the index set K † shrinks (hence ∥ H K † ∥ G decreases) as the number of target data for finetuning increases.
This indicates that finetuning can help save the amount of source data for pretraining.
The Limitation of Pretraining vs. the Power of Finetuning.
The following example further demonstrates the limitation of pretraining and the power of finetuning.
Example 4.3 (Pretraining-finetuning vs. pretraining vs. supervised learning) .
Let ϵ > 0 be a sufficiently small constant.
Consider a covariate shift problem instance given by
[Equation]
2 ϵ − 0 .
5 copies , 0 , 0 , . . . ) ,
G = diag( ϵ 2 , 1 , 0 , 0 , . . . ) .
One may verify that tr( H ) ≂ tr( G ) ≂ 1 and that ∥ w ∗ ∥ 2 H ≂ ∥ w ∗ ∥ 2 G ≂ σ 2 ≂ 1 .
The following holds for the ( SGD ) output:
• supervised learning: for ExcessRisk ( w 0+ N ) <
ϵ , it is necessary to have that N ≳
ϵ − 1 . 5 ; • pretraining: for ExcessRisk ( w M +0 ) <
ϵ , it is necessary to have that M ≳
ϵ − 2 ; • pretrain-finetuning: for ExcessRisk ( w M + N ) <
ϵ , it suffices to set γ 0 ≂ 1 , γ M ≂ ϵ , and M ≂ ϵ − 1 log( ϵ − 1 ) , N ≂ ϵ − 1 log 2 ( ϵ − 1 ) .
It is clear that whenever target data are available, the optimally tuned pretraining-finetuning method is always no worse than the optiamlly tuned pretraining method, as one can simply set the finetuning stepsize to be small (or zero) so that the former reduces to the latter.
Moreover, Example 4. shows a covariate shift problem instance such that pretraining-finetuning can save polynomially amount of data compared to pretraining (or supervised learning).
This example demonstrates the limitation of pretraining and the benefits of finetuning.
As a final remark for Example 4.3, direct computation implies that K ∗ = { 1 , 2 , . . .
, 2 ϵ − 0 .
5 + 1 } and K † = { 2 , 3 , . .
, 2 ϵ − 0 .
5 + 1 } ,
therefore ∥ H K ∗ ∥
G = ϵ − 2 ≫ ∥
H K † ∥ G = ϵ 0 .
5 , so the implication of Example 4.3 is consistent with Theorems 4.1 and 4.2.
Numerical Simulations.
We perform experiments on synthetic data to verify our theory.
The code and data for our experiments can be found on Github 3 .
Recall that the effectiveness of pretraining and finetuning depends on the alignment between source and target covariance matrices, therefore we design experiments where the source and target covariance matrices are aligned at different levels.
In particular, we consider commutable matrices G and H with eigenvalues { µ i } i ≥ 1 =
{ i − 2 } i ≥ 1 and ( λ i ) i ≥ 1 =
( i − 1 . 5 )
i ≥ 1 , respectively.
To simulate different alignments between G and H , we first sort them so that both of their eigenvalues are in descending order, and then reverse the top- k eigenvalues [Figure] of G .
In mathematics, for a given k > the problem instance P ( k ) :
= ( w ∗ , H , G , σ 2 ) is designed as follows: [Equation]
[Equation]
One can verify that tr( H ) ≂ tr( G ) ≂ 1 and that ∥ w ∗ ∥ 2 H ≂ ∥ w ∗ ∥ 2 G ≂ σ 2 ≂ 1 .
Clearly, a larger k implies a worse alignment between G and H .
We then test three problem instances P ( k = 5) ,
P ( k = 10) , and P ( k = 20) , and compare the excess risk achieved by pretraining, pretrainingfinetuning, and supervised learning.
The results are presented in Figure 1, which lead to the following informative observations:
• For problem P ( k = 5) where H and G are aligned very well, pretraining (without finetuning!) can already match the generalization performance of supervised learning.
This verifies the power of pretraining for tackling transfer learning with mildly shifted covariate. • For problem P ( k = 10) where H and G are moderately aligned, there is a significant gap between the risk of pretraining and that of supervised learning.
Yet, the gap is closed when the pretrained model is finetuned with scarce target data.
This demonstrates the limitation of pretraining and the power of finetuning for tackling transfer learning with moderate shifted covariate.
• For problem P ( k = 20) where H and G are poorly aligned, the risk of pretraining can hardly compete with that of supervised learning.
Moreover, for finetuning to match the performance of supervised learning, it requires nearly the same amount of target data as that used by supervised learning.
This reveals the limitation of pretraining and finetuning for tackling transfer learning with severely shifted covariate.
Concluding Remarks
We consider linear regression under covariate shift, and a SGD estimator that is firstly trained with source domain data and then finetuned with target domain data.
We derive sharp upper and lower bounds for the estimator’s target domain excess risk.
Based on the derived bounds, we show that for a large class of covariate shift problems, pretraining with O ( N 2 ) source data can match the performance of supervised learning with N target data.
Moreover, we show that finetuning with scarce target data can significantly reduce the amount of source data required by pretraining.
Finally, when applied to supervised linear regression, our results improve the upper bound in [Wu et al., 2021] by a logarithmic factor, and close its gap with the lower bound (ignoring constant factors) when the signal-to-noise ratio is bounded.
Several future directions are worth discussing.
Model Shift.
An immediate follow-up problem is to extend our results from the covariate shift setting to more general transfer learning settings, e.g., with both covariate shift and model shift , where the true parameter w ∗ could also be different for source and target distributions.
Under model shift, the power of pretraining with source data is limited, and we expect that finetuning with target data becomes even more important.
Ridge Regression.
For infinite-dimensional least-squares in the supervised learning context, instancewisely tight bounds for both ridge regression and SGD have been established by Bartlett et al.
Tsigler and Bartlett [2020], Zou et al.
[2021b], Wu et al.
For infinite-dimensional leastsquares under covariate shift, this paper presents nearly instance-wisely tight bounds for SGD.
As ridge regression is popular in covariate shift literature (see Ma et al.
[2022] and references herein), an interesting future direction is studying the instance-wisely tight bounds for ridge regression in the setting of infinite-dimensional least-squares under covariate shift — a tight bias analysis is of particular interest.
Unlabeled Data.
In this work we assume the provided source and target data are both labeled.
However in many practical scenarios, additional unlabeled source and target data are also available.
In this case our results cannot be directly applied as it remains unclear how to utilize unlabeled data with SGD.
An important future direction is to extend our framework to incorporate with unlabeled source and target data.
Acknowledgments and Disclosure of Funding
We would like to thank the anonymous reviewers and area chairs for their helpful comments.
This work was done when DZ was a Ph.D. student at UCLA. DZ is partially supported by Bloomberg data science Ph.D. fellowship and his startup funding in the institute of data science, the University of Hong Kong. JW and VB are supported by the Defense Advanced Research Projects Agency (DARPA) under Contract No. HR00112190130. QG is partially supported by the National Science
Foundation award IIS-1906169 and IIS-2008981.
SK acknowledges funding from the Office of Naval
Research under award N00014-22-1-2377 and the National Science Foundation Grant under award
CCF-1703574.
The views and conclusions contained in this paper are those of the authors and should not be interpreted as representing any funding agencies.
In Table 1, we make a detailed comparison of the bounds for (1) pretraining-finetuning with M source data and N target data, (2) pretraining with M source data, and (3) supervised learning with N target data.
The presented bounds are from Theorem 3.1, Corollaries 3.3 and 3.4.
For simplicity, we assume that all SGD iterates are initialized from w 0 = 0 , and that the signal-to-noise ratios are bounded from above. [Table] M + N M +
[Table]
+ N [Table] ( M [Table]
M log( M )
M log( M )
[Table]
( N
[Table]
N log( N )
N log( N )
[Table]
( D sourceeff ) tr (cid:16) N − 1 (cid:89) t
= ( I − γ M + t H ) 2 H · (cid:0) G − 1 J + M 2 eff γ 20 G J c (cid:1)(cid:17) tr
( HG − 1 J )
+
M 2 eff γ 20 tr( HG J c )
[Table]
( D targeteff ) | K | + N 2 eff
γ 2 M (cid:80) i/ ∈ K λ 2 i | K | + N 2 eff γ 20 (cid:80) i/ ∈ K λ 2 i learnableindexes
J = { j : µ j ≥ 1 / ( γ 0 M eff ) } ,
K = { k : λ k ≥ 1 / ( γ M N eff ) }
Signal to noise ratio ( SNR )
[Equation]
M
[Table]
−
[Table]
) w
[Table]
w
[Table]
N −
[Table]
t
[Table]
M
[Table]
−
[Table]
M −
[Table]
− γ t
[Table]
) w
[Table]
M
[Table]
+
D
[Table]
N
[Table]
B Preliminaries
Notations.
Define the following operators on symmetric matrices:
[Equation]
(cid:102) M G :=
G ⊗ G , (cid:102) M H :
= H ⊗ H ,
T G ( γ ) :
= G ⊗ I
+ I ⊗ G − γ M G ,
T H ( γ ) :
= H ⊗ I
+ I ⊗ H − γ M H , (cid:101) T G ( γ ) :
= G ⊗ I
+ I ⊗ G − γ G ⊗ G , (cid:101) T H ( γ ) :
= H ⊗ I
+ I ⊗ H − γ H ⊗ H
For the linear operators we have the following technical lemma from Zou et al.
[2021b].
Lemma B.1 (Lemma B.1, Zou et al.
[2021b]) .
An operator O defined on symmetric matrices is called PSD mapping, if A ⪰ 0 implies O ◦ A ⪰ 0 .
Then we have
M G , M H , (cid:102) M G and (cid:102)
M H are all PSD mappings.
I − γ T G ( γ ) , I − γ T H ( γ ) , I − γ (cid:101) T G ( γ ) and I − γ (cid:101) T H ( γ ) are all PSD mappings.
M G − (cid:102) M G , M H − (cid:102) M H , (cid:101) T G − T G and (cid:101) T H − T H are all PSD mappings.
If 0 < γ < 1 / ∥ G ∥ 2 , then (cid:101) T − 1 G exists, and is a PSD mapping.
Similarly, if 0 < γ < 1 / ∥ H ∥ 2 , then (cid:101) T − 1 H exists, and is a PSD mapping.
If 0 < γ < 1 / ( α tr( G )) , then T − 1 G ◦
A exists for PSD matrix A , and T − 1 G is a PSD mapping.
Similarly, if 0 < γ < 1 / ( α tr( H )) , then T − 1 H ◦
A exists for PSD matrix A , and T − 1 H is a PSD mapping.
For every γ > 0 and every PSD matrices A and B , we have ⟨ A ,
[Equation]
Proof.
Proof to the first five claims can be found in Lemma B.1 in Zou et al.
[2021b].
The last claim is by definition.
Define
[Equation]
Then for the SGD iterates [Equation] we can consider their associated bias iterates and variance iterates:
[Equation]
Lemma B [Equation] 2 (Bias-variance decomposition) .
Suppose that Assumption 2 holds.
Then we have
[Equation]
Proof.
This follows from Lemma 2 in Wu et al.
Lemma B.3 (Bias-variance decomposition, lower bound) .
Suppose that Assumption 2’ holds.
Then we have
[Equation]
Proof.
This follows from Lemma 3 in Wu et al.
C Variance Error Analysis C.1 Upper Bounds
The following Assumption 1’ is implied by Assumption 1A by setting R 2 = max { α tr( H ) , α tr( G ) } .
In this part we will work with the weaker Assumption 1’.
Assumption 1’ (Fourth moment condition, relaxed version) .
There exists a constant R > 0 such that
[Equation]
Lemma C.1 (Crude bound on the variance iterates) .
Suppose that Assumptions 1’ and 2 hold.
Suppose that max { γ 0 , γ M } ≤ γ < 1 /R 2 .
Then it holds that
[Equation]
I , for every t = 0 , 1 , . . .
M + N.
Proof.
The proof idea has appeared in Jain et al.
[2017a], Ge et al.
[2019], Wu et al.
We prove the lemma by induction.
For t = 0 , it is clear that C 0 =
⪯ γσ 2 1 − γR 2 I .
Now suppose that
[Equation] γR 2 I , and consider C t according to (6).
If t ≤ M , then according to (6) we have
[Equation]
If t > M , similarly according to (6) we have
[Equation]
Putting everything together we complete the induction.
Lemma C.2 (Upper bounds on the variance iterates) .
Suppose that Assumptions 1’ and 2 hold.
Suppose that max { γ 0 , γ M } ≤ γ < 1 /R 2 .
Let M eff := M/ log( M ) , N eff :
= N/ log( N ) .
• For every index set J ⊂ N + , it holds that
[Equation]
• For every index set K ⊂ N + , it holds that
[Equation]
Proof.
These are from the proof of Theorem 5 in Wu et al.
Theorem C.
(Variance error upper bound) .
Suppose that Assumptions 1’ and 2 hold.
Suppose that max { γ 0 , γ M } ≤ γ < 1 /R 2 .
Let M eff := M/ log( M ) , N eff :
= N/ log( N ) .
Then it holds that
[Equation]
where
[Equation]
and K , J can be arbitrary index sets.
Proof of Theorem C.1.
The core idea is to relate C M + N to C M via (6).
For every t = 0 , . . .
, N − 1 , according to (6) we have
[Equation]
Solving the above recursion from t = 0 to t = N − 1 we obtain
[Equation]
M
[Equation]
Therefore the variance error is
[Equation]
Finally, applying Lemma C.2 completes the proof.
C.2 Lower Bounds
Lemma C.3 (Lower bounds on the variance iterates) .
Suppose that Assumptions 1B and 2’ hold.
Suppose that γ 0 < 1 / ∥ G ∥ 2 , γ M < 1 / ∥ H ∥ 2 .
Let M eff := M/ log( M ) , N eff :
= N/ log( N ) .
• For J :=
{ j ∈ N + : µ j ≥ 1 / ( M eff γ 0 ) } , it holds that
[Equation]
• For K :=
{ k ∈ N + : λ k ≥ 1 / ( N eff γ M ) } , it holds that
[Equation]
Proof.
There are from the proof of Theorem 7 in Wu et al.
Theorem C.2 (Variance error lower bound ) .
Suppose that Assumptions 1B and 2’ hold.
Suppose that γ 0 < 1 / ∥ G ∥ 2 , γ M < 1 / ∥ H ∥ 2 .
Let M eff := M/ log( M ) , N eff :
= N/ log( N ) .
The it holds that
[Equation]
where
D eff
[Equation]
D
[Equation]
tr
[Equation]
, and
K :=
{ k ∈ N + : λ k ≥ 1 / ( N eff γ M ) } ,
J := { j ∈ N + : µ j ≥ 1 / ( M eff γ 0 ) } .
Proof of Theorem C.2.
The proof idea is similar to that of Theorem C.1.
For every t = 0 , . . .
, N − 1 , it holds that
[Equation]
Solving the above recursion from t = 0 to t = N − 1 we obtain
[Equation]
Therefore the variance error is
[Equation]
Finally
[Equation]
applying Lemma C [Equation] 3 completes the proof
[Equation]
D Bias Error Analysis D.1 Upper Bounds
Lemma D.1 (Bounds on the summation of bias iterates) .
Suppose that Assumption 1A holds.
Suppose that γ < 1 / ( α tr( G )) .
Then for every n ≥ [Equation] it holds that
[Equation]
Proof.
By definition and Assumption 1A, we have
[Equation]
Notice that T − 1 G ( γ ) is a PSD mapping (when operates on PSD matrices), therefore
[Equation]
Similarly, (cid:101) T − 1 G ( γ ) is also a PSD mapping and that we have
[Equation]
therefore
[Equation]
With the above, we prove the upper bound as follows:
[Equation]
( γ
[Equation]
( since (cid:101) T − T is PSD )
[Equation]
since T
[Equation]
( γ
[Equation]
The lower bound is because
[Equation]
( since (cid:101)
[Equation]
( since (cid:101) T − 1 G ( γ )
[Equation]
G
[Equation]
Lemma D.2 (Crude bounds on the bias iterates) .
Suppose that Assumption 1A holds.
Suppose that γ < 1 / (2 α tr( G )) .
Then the following holds for every n ≥ 0 :
[Equation]
In particular [Equation] the following holds for every n ≥ 1 and every index set J ⊂ N + :
[Equation]
Proof.
Notice the following decomposition:
[Equation]
[Equation]
Based on (10) we show the first conclusion as follows:
[Equation]
We now prove the second conclusion by induction.
For n = [Equation] it holds because of Lemma D.1:
[Equation]
Now consider n ≥ 2 based on (10).
We bound the second term in (10) separately for (cid:80) n/ 2 − 1 t = and (cid:80) n − 1 t = n/ 2 .
For the first part,
[Equation]
For the second part,
[Equation]
Inserting (11) and (12) into (10), and apply that ( I − γ G ) 2 n G ⪯ 1 2 nγ · I , we obtain that
[Equation]
[Equation]
We have completed the induction.
Lemma D.3 (Bounds on the summation of bias iterates) .
Suppose that Assumption 1A holds.
Suppose that γ 0 < 1 / (2 α tr( G )) .
Then the following holds for every index set J ⊂ N + :
[Equation]
Proof.
Notice that
[Equation]
Then we apply Lemma D.1 to obtain that
[Equation]
This completes the proof.
Lemma D.4 (Crude bounds on the bias iterates) .
Suppose that Assumption 1A holds.
Suppose that γ 0 < 1 / (2 α tr( G )) .
Then the following holds for every index set J ⊂ N + and t ≥ M eff :
[Equation]
Proof.
Let L ( t ) =
⌊ t log( M ) /M
⌋ =
[Equation] t [Equation] M eff ⌋ , then L ( t ) ≥ 1 as t ≥ M eff .
Notice that
[Equation]
We then recursively use Lemma D
[Equation]
2 to obtain that
[Equation]
Combining everything we complete the proof
[Equation]
Lemma D.5 (Upper bounds for the bias iterates) .
Suppose that Assumption 1A holds.
Suppose that γ 0 < 1 / (2 α tr( G )) .
Let M eff := M/ log( M ) .
Then the following holds for every index set J ⊂ N + :
[Equation]
Proof.
We begin with the following inequality:
[Equation]
which implies that
[Equation]
We next bound the second term in ( separately − =
· ) and − t = M
M
[Equation]
Lemma D.3 )
[Equation]
where in the last inequality we use that
[Equation]
For the second part, we apply Lemma D.4 to obtain that
[Equation]
where in the last inequality we use Lemma C.2 (by setting H to G ).
Finally, inserting (14) and (15) into (13) completes the proof.
Theorem D.1 (Bias error upper bound) .
Suppose that Assumption 1A holds.
Suppose that γ 0 < min { 1 / (4 α tr( G )) , 1 / ( α tr( H )) } , γ M < 1 / (4 α tr( H )) .
Let M eff := M/ log( M ) , N eff :=
N/ log( N ) .
Then it holds that
[Equation] [Equation]
where
[Equation]
and K , J can be arbitrary index sets.
Proof.
We first apply Lemma D [Equation] 5 by setting B 0 to B M , γ 0 to γ M , M to N and G to H
[Equation]
so that we have
[Equation]
Taking inner product with H we obtain
[Equation]
t =
( I − γ M + t
[Equation]
) (cid:69) +
[Equation]
· (cid:68)
I K
N [Equation] M [Equation]
N [Equation]
= (cid:68) N − 1 (cid:89) t
= ( I − γ M + t [Equation] ) 2 H [Equation]
B M
[Equation]
+
[Equation]
[Equation]
I K
N
[Equation]
M
[Equation] B M [Equation] D
[Equation]
N eff .
Now applying the upper bound for B M in Lemma D.5, we obtain ⟨ H , B M + N ⟩ ⪯ (cid:68) N − 1 (cid:89) t
= ( I − γ M + t H ) 2 H ,
M − 1 (cid:89) t
= ( I − γ t G ) B
M (cid:89) t
= ( I − γ t G ) (cid:69) (cid:124) (cid:123)(cid:122) (cid:125) ( ♠ )
+ 24 eα · (cid:68)
I J
M eff γ
+ G J c , B(cid:69) (cid:124) (cid:123)(cid:122) (cid:125) ( ♡ ) · D finetuneeff
M eff + 24 eα · (cid:68)
I K
N eff γ M + H K c ,
M − 1 (cid:89) t
= ( I − γ t G ) B
M (cid:89) t
= ( I − γ t G ) (cid:69) (cid:124) (cid:123)(cid:122) (cid:125) ( ♢ ) · D eff
N eff + 576 e 2 α · (cid:68)
I J
M eff γ
+ G J c , B(cid:69) (cid:124) (cid:123)(cid:122) (cid:125) (
[Equation]
By definition we know that
[Equation]
( ♢ ) =
(cid:13)(cid:13)(cid:13)
M − 1 (cid:89) t
= ( I − γ t G )( w 0 − w ∗ ) (cid:13)(cid:13)(cid:13)
I K
N eff γM + H K c .
As for ( ♣ ) , we can choose K = ∅ and J =
{ j : µ j ≥ 1 / ( M eff γ 0 ) } so that ( ♣ ) ≤ α ⟨ H , γ
I ⟩ ≤ αγ
tr( H ) ≤ 1 .
Putting everything together completes the proof.
D.2 Lower Bounds
Lemma D.6 (Lower bounds for the bias iterates) .
Suppose that Assumption 1B holds.
Suppose that γ 0 < 1 / ∥ G ∥ 2 .
Let M eff := M/ log( M ) and suppose that M eff ≥ 10 .
Let J :=
{ j : µ j ≥ 1 / ( M eff γ 0 ) } .
Then it holds that
[Equation]
Proof.
This is from Theorem 8 in Wu et al.
Theorem D.2 (Lower bounds for the bias error) .
Suppose that Assumption 1B holds.
Suppose that γ 0 < 1 / ∥ G ∥ 2 , γ M < 1 / ∥ H ∥ 2 .
Let M eff := M/ log( M ) , N eff :
= N/ log( N ) , and suppose that
M eff , N eff ≥ 10 .
Let J :=
{ j : µ j ≥ 1 / ( M eff γ 0 ) } , K :=
{ k : λ k ≥ 1 / ( N eff γ M ) } .
Then it holds that
[Equation]
where
[Equation]
Proof.
We first apply Lemma D.6 by setting B 0 to B M , γ 0 to γ M , M to N and G to H , so that we have
[Equation]
Taking inner product with H we obtain ⟨ H , B M + N ⟩ ⪰ (cid:68) H ,
[Equation]
t
[Equation]
Now applying the lower bound for B M in Lemma D. [Equation] we obtain
[Equation] [Equation]
which completes the proof.
E Proof of Theorems in Main Text E.1 Proof of Theorem 3.
Proof of Theorem 3.1.
This is by combining Theorems C.1 and D.1.
E.2 Proof of Theorem 3.
Proof of Theorem 3.2.
This is by combining Theorems C.2 and D.2.
E.3 Proof of Theorem 4.
Proof of Theorem 4.1.
During the proof, we use γ sl and γ 0 to denote the initial stepsizes for supervised learning and pretraining, respectively.
Then Corollaries 3.4 and 3.3 sharply characterize the risk bounds for supervised learning and pretraining, respectively.
In particular, let SNR := α ∥ w ∗ ∥ 2 G /σ 2 , then we have
[Equation]
[Equation]
ExcessRisk
[Equation]
[Equation]
Fix hyperparameters ( N sleff , γ sl ) for supervised learning, we now identify hyperparameters ( M eff , γ 0 ) for pretraining so that its risk (17) is no larger than that of supervised learning (16) upto a constant factor.
To this end, we claim that
[Equation]
given that γ [Equation] ≤
[Equation]
sl eff
[Equation]
[Equation]
N −
[Equation]
t
[Equation] [Equation]
sl [Equation] H
[Equation]
w
[Equation]
2 H given that M eff γ 0 ≥ 4 N sleff γ sl ∥ H 0: k ∗ ∥ G
[Equation]
To prove (18), we consider the optimal index set J ∗ :=
{ j : µ j ≥ 1 / ( M eff γ 0 ) } as defined in
Corollary 3.3, then by definition we have
[Equation]
which justifies (18).
To prove (19), we consider the bias error separately in its head part and its tail part, divided by the optimal index k ∗ :
= min { k : λ k ≥ 1 / ( N sleff γ sl ) } as defined in Corollary 3.4.
For a tail index k > k ∗ , we have
[Equation]
where the second inequality is because that γ sl λ k ≥ 1 /N sleff and N sleff ≥ 10 .
For a head index k ≤ k ∗ , we have
[Equation]
where the second inequality is because:
[Equation]
( since ab ≤ ( a + b ) / 2 for 0 < a, b < 1) ≤ [Equation] −
M eff
[Equation]
( since ∥ H 0: k [Equation] ∥ G := max { λ k /µ k : k ≤ k ∗ } ) [Equation]
sl
[Equation] k [Equation] ( use the condition in (19) )
Combining (20), (21) and the definition of bias error justifies (19).
Finally, we choose γ
=
D sleff / ( N sleff tr( H )) and
[Equation]
so that both (18) and (21) hold, which imply that the risk of pretraining (17) is no lager than of supervised learning (16) upto a constant factor.
E.4 Proof of Theorem 4.
Proof of Theorem 4.2.
During the proof, we use γ sl , γ 0 and γ M to denote the initial stepsizes for supervised learning, pretraining and finetuning, respectively.
Then Corollary 3.4 and Theorem 3. sharply characterize the risk bounds for supervised learning and pretraining-finetuning, respectively.
In particular, let SNR := α (cid:0) ∥ w ∗ ∥ 2 G + ∥ w ∗ ∥ 2 H ) (cid:14) σ 2 , then we have the following upper bound for pretraining-finetuning:
[Equation]
and we have a lower bound for supervised learning shown in (16).
Fix hyperparameters ( N sleff , γ sl ) for supervised learning, we now identify hyperparameters ( M eff , N eff , γ 0 , γ M ) for pretrainingfinetuning so that its risk (22) is no larger than that of supervised learning (16) upto a constant factor.
To this end, we claim that
[Equation]
given that
[Equation] [Equation]
To prove (23) and (24), one only needs to repeat the proof for (18).
To prove (25), we consider the bias error separately in its head part, middle part and tail part, divided by the index k † :=
{ k : λ k ≥ log( N sleff ) /
( N eff γ M ) } and the index k ∗ := min { k : λ k ≥ 1 / ( N sleff γ sl ) } as defined in Corollary 3.4.
For a tail index k > k ∗ , we have
[Equation]
where the second inequality is because that γ sl λ k ≥ 1 /N sleff and N sleff ≥ 10 .
For a middle index k † < k ≤ k ∗ , we have
[Equation]
where the second inequality is because:
[Equation]
( since ab ≤ ( a + b ) / 2 for 0 < a, b < 1)
[Equation]
since ∥ H k [Equation] : k ∗ ∥ [Equation]
max
[Equation]
k
[Equation]
k
[Equation]
[Equation]
( use the condition in (25) )
For a head index k ≤ k † , we have
[Equation]
28) where in the last inequality we use λ k ≥ λ k † ≥ log( N sleff ) /
( N eff γ M ) .
Combining (26), (27) (28) and the definition of bias error justifies (25).
Finally
[Equation]
we choose
[Equation]
and
[Equation]
so that all (23), (24) and (28) hold, which imply that the risk of pretraining (22) is no lager than of supervised learning (16) upto a constant factor.
E.5 Proof of Example 4.
Proof of Example 4.3.
One may verify that tr( H ) ≂ tr( G ) ≂ 1 and that ∥ w ∗ ∥ 2 H ≂ ∥ w ∗ ∥ 2 G ≂ σ 2 ≂ 1 .
Therefore
[Equation]
Pretraining.
From Corollary 3.3, we know that
[Equation]
for which to be smaller than ϵ one has to set
[Equation]
Supervised Learning.
As for supervised learning, we discuss its rate based on Corollary 3.4 and the choice of K = { k : λ k ≥ 1 / ( N eff γ 0 ) } .
• If | K | > ϵ − 0 .
5 , then by Corollary we have
[Equation]
for which to be smaller than ϵ one has to have N eff
≳
ϵ −
[Equation]
• If | K | ≤ ϵ − 0 .
5 , then by Corollary we have
[Equation]
for which to be smaller than ϵ one has to have
[Equation]
On the other hand, by Corollary 3.4 we have
[Equation]
for which to be smaller than ϵ one need to set
[Equation]
Then (29) and (30) together imply that N eff ≳
ϵ − 1 . 5 .
In sum, for ExcessRisk ( w 0+ N ) ≤ ϵ one has to set
[Equation]
Pretraining-Finetuning.
Now we consider pretraining-finetuning by Theorem 3.1.
We set
[Equation]
≂ 1 ,
[Equation]
Under (31), we see that
[Equation]
We now verify that ExcessRisk ( w M + N ) ≲ ϵ.
According to the proof of (18), it holds that
[Equation]
Now we choose J = { 1 , 2 } so that
[Equation]
by (32) ) ≲ ϵ [Equation]
For the bias error we have that
[Equation]
≤
[Equation]
γ M λ 1 )
[Equation]
N
[Equation]
ϵ
[Equation]
1 − γ 0 µ
[Equation]
M
[Equation]
≲ ϵ.
( by (32) and (31) )
[Equation]
35) (33), (34) and (35) together imply that ExcessRisk ( w M + N ) ≲ ϵ.