Spectrum of inner-product kernel matrices in the polynomial regime and multiple descent phenomenon in kernel ridge regression
Theodor Misiakiewicz
Introduction
Kernel methods are among the most popular tools in statistics and machine learning and have been extensively studied in the classical bias-variance trade-off setting [BTA11, Wai19]. Over the past few years, they have attracted a renewed interest because of their connection to neural networks in the ‘neural tangent kernel’ regime [JGH18, LL18, DZPS18, LXS+19, AZLS19, COB19]. Moreover, it was argued in [BMM18] that kernel methods share a number of surprising phenomena with deep learning, which are not explained by classical theory. This prompted a number of works to study kernel methods in the ‘overfitted regime’, which brought to light several interesting behavior: near optimality of interpolators and benign overfitting [LR20, GMMM21, BLLT20], self-induced regularization [GMMM21, LRZ20] and double descent of the prediction risk [MM22, HMRT22]. These phenomena appear in the high-dimensional regime, when both the number of samples and the dimensionality of the data are large [RZ19], and are not captured by previous approaches such as capacity/source conditions [CDV07]. This motivates the development of theory specific to kernel methods in high-dimension.
[EK10] showed that when with , the random matrix can be approximated consistently in operator norm by its linearization (i.e., in probability):
1.2 Precise asymptotics of KRR prediction error in the polynomial regime
where is the RKHS norm associated to kernel in . The test error (or prediction error) of KRR is given by
1.3 Equivalence with a Gaussian covariates model
A recent string of work started showing equivalence between non-linear regression models and simpler Gaussian covariates models in high-dimension [MM22, GLR+20, HL20]. These results hint at some general universality phenomena in high-dimensional models, where the test error only depends on the covariance of the features [MS22] and a few properties of the non-linearity.
Here, we will simply make the following observation: the kernel ridge regression model has the same asymptotic prediction error in the polynomial regime as a simpler linear regression model with Gaussian covariates. Consider a target function:
where is the polynomial basis that diagonalizes inner-product kernels on , i.e., is an eigenfunction of the kernel operator with eigenvalue . Let us now state the equivalent linear regression model: we are given i.i.d. pairs with
We fit this model using ridge regression with ridge parameter :
Such models were studied in the overfitted regime in [BLLT20, TB20, RMR21]. Here, we show that kernel ridge regression has the same asymptotic test error as the Gaussian covariates model (7):
Under the same assumptions as Theorem 3, for any and as , we have
2 Notations
Related work
The prediction error of kernel ridge regression in the linear high-dimensional regime was studied in [LR20, LLS21, BMR21] using the linearization of the kernel in this regime [EK10]. In particular, [LR20] points out that the minimum RKHS norm interpolating solution (KRR with ridge penalty ) can still generalize well. Another line of work considers linear regression models with Gaussian or sub-Gaussian covariates as in Eq. (7), which are technically easier to study and allows to focus on the interaction between eigenvalue decay and target function in the prediction error [BLLT20, TB20, RMR21, CLKZ21].
Inner-product kernel matrices in the polynomial regime
We start by recalling some basic properties of functional spaces over (see Appendix C for a complete exposition). Let be the space of square-integrable functions on with scalar product and norm denoted by and given by
where we denoted . For ease of notation, we will write and . Note that for any , by assumption of being positive semi-definite.
We define the empirical Gegenbauer matrices . Note that with the above notations . We can therefore decompose the empirical kernel matrix in terms of the Gegenbauer matrices:
2 Limiting spectral distribution of the empirical kernel matrix
We will make the following genericity assumption on the kernel functions :
as the sum of a low-rank spiked matrix with diverging eigenvalues plus a multiple of the identity matrix (the high-degree part of the kernel plays the role of a ‘self-induced ridge regularization’). In particular, [GMMM21, MMM21a] used this decomposition to show that kernel ridge regression with any target function learns exactly the projection on degree- polynomials and none of the high-degree part .
Recall the definition of the Marchenko-Pastur distribution: given a parameter ,
where .
3 Proof of Theorem 2
Several sufficient conditions for the Marchenko-Pastur law have been proved in the literature for matrices without independent entries [BZ08, Ada11, PS11, O’R12, Yas16]. Here, we use a simple condition presented for example in [Yas16, Remark 2.2] (see also [BZ08, PS11]), which applies to random matrices with iid isotropic rows, and which will directly imply Theorem 2.
Note that is a symmetric matrix and we have
Application: kernel ridge regression in the polynomial regime
where is the RKHS norm associated to kernel and we denoted . The test error (or prediction error) of KRR is given by
where . We will also consider the training error and the RKHS norm of the KRR solution, which are given by
In this section, we characterize the asymptotic test error with high probability over a class of random target functions. We will discuss in Section 4.2 how to extend these results to fixed target functions.
We assume the following distribution over the sequence of target functions :
Let be a sequence of target functions with decomposition in the polynomial basis
where we recall that with the -th Gegenbauer coefficient of (see Eq. (10)).
We are now in position to state our main theorem:
where is the Stieljes transform of the Marchenko-Pastur distribution (see Eq. (14)).
as , where the convergence in probability is over the randomness in . Furthermore,
A detailed proof of Theorem 3 can be found in Appendix B. Let us give some intuition on the asymptotic formula for the test error (19). It will be instructive to consider the contribution to the test error of the three subspaces
2 Pointwise asymptotic test error
In order to prove the asymptotic test error formula, we would need to show that
As shown in [HMRT22], this can be reduced to showing that
Acknowledgements
This work was supported by NSF through award DMS-2031883 and the Simons Foundation through Award 814639 for the Collaboration on the Theoretical Foundations of Deep Learning. We also acknowledge the NSF grant CCF-2006489 and the ONR grant N00014-18-1-2729.
References
Appendix A Proof of Proposition 1: the case of spherical harmonics
The proof of Proposition 1 will rely on an explicit representation of spherical harmonics in terms of the generalized spherical coordinate system in dimension . See for example [Ave12, DX13].
where and for . The uniform probability measure on the unit sphere is given by
where , ,
A proof of this proposition can be found for example in [DX13]. For completeness, we include here the proof with our notations and normalization choice.
In order to check that Eq. (27) is a homogeneous polynomial, recall that in the spherical coordinates (25), we have
is a polynomial of degree . We can further write as the real part or the imaginary part of the polynomial (or a constant if ), depending on . We deduce that
A.2 Proof of Proposition 1
We will show that both these terms are , which implies the concentration in probability of the quadratic form.
We proceed similarly than in the main text. Consider the square matrix of size such that for any and ,
By assumption . Hence, it is sufficient to show
A.3 Technical lemmas
First note that by Hölder inequality followed by hypercontractivity on the sphere (Lemma 14),
Consider the representation (27). If , then the expectation (36) is simply . Assume that , then from the bound (37), we can decompose
Let us decompose the expectation using the representation (27):
The different terms contribute as follows in the above product. First, we can’t have and at the same time, hence
If ,
Combining these contributions in Eq. (44) yields
Hence to prove the lemma, it is sufficient to show that .
Expanding yields
where if and is (similarly for ). Note that on the first line, the product can be simplified by telescoping the terms and we obtain
Appendix B Proof of Theorem 3: asymptotic characterization of KRR
In this section, we focus on the test error (we will write for simplicity):
where we recall that the kernel ridge regression solution is given by
with , and .
We will decompose into three orthogonal subspaces and bound the risk along each of them:
Recall that we can decompose the inner-product kernel in terms of Gegenbauer polynomials associated to :
Recall that we denote the matrix of the -th Gegenbauer polynomial evaluated on the inner-product of the inputs. We will further denote:
By Theorem 6 in [MMM21a] (see also Proposition 6 and Corollary 1 in Section B.3.2), the high-degree component of the kernel matrices satisfy
Under the assumptions of Theorem 3, we have:
The proofs of Propositions 3 and 4 can be found in Sections B.2 and B.3 respectively. The characterization of the test error in Theorem 3 follows directly from these two propositions.
B.2 Proof of Proposition 3
For the second term, notice that by Theorem 6 in [MMM21a] (see also Proposition 6 and Corollary 1 in Section B.3.2), we have
Similarly, by Eq. (58) of Lemma 5 with , we get
Combining Eqs. (49), (50) and (51) in Eq. (48) yields the first of the three contributions:
Let us now simplify : applying Theorem 6 in [MMM21a], we have
we can use Lemma 6 and simplify the expression of the different terms:
Follow the assumptions and notations in the proof of Theorem 3. We have
Follow the assumptions and notations in the proof of Theorem 3. We have
The first bound (56) follows simply from Lemma 4. For the second bound 57, we have
For the third bound (58), we follow some of the notations introduced in the proof of Lemma 4. In particular, by Sherman-Morrison-Woodbury formula, we have
Follow the assumptions of Theorem 3. We have
B.3 Convergence to expectation: proof of Proposition 4
Proposition 4 is a direct implication of the following proposition:
Under the assumptions of Theorem 3, we have
This proposition is proved in Section B.3.1, while some more technical bounds in expectation (instead of in probability, as in Section A.3) are deferred to Section B.3.2.
This directly imply the claim in Proposition 4.
Let us bound each term separately. First,
where we used that , , and Corollary 1 and Lemma 9.
Combining the bounds Eqs. (68), (69) and (70) yields
where we used the bound (81) in Proposition 7. For the high degree part, notice that , and therefore, by Assumption 3, there exists such that
where we used the bound (80) in Proposition 7. The cross-terms can be bounded in a similar manner. We conclude that
The term can be bounded similarly as and . The proposition follows by combining bounds (65), (71), (72), (75) and (76).
B.3.2 Technical results: bounds in expectation
In this section, we gather some -bounds necessary for the proof of Proposition 5 (instead of bounds in probability, as in Section A.3). We first recall some concentration results on matrices of spherical harmonics (or Fourier basis) proved in [GMMM21] and [MMM21a].
Then, there exists a constant such that for any ,
The following is a reformulation of Proposition 3 proved in [GMMM21] (see also Proposition 4 in [MMM21a] for a more general proof).
In the case of the hypercube , the same result holds for .
Note that for , using Eq. (77), we have and therefore the equality .
Follow the same setting as Proposition 6. We have for any fixed and any constant ,
Denote . By Jensen’s inequality,
and conclude by taking sufficiently large (i.e., sufficiently large). ∎
It will be useful to state the following bound, which is a direct consequence of the above results.
which combined with Eq. (78) concludes the proof. ∎
In the proof of Proposition 5, we will use the following bounds on matrix :
Assume the same setting as Proposition 5. For any fixed , we have
Furthermore, for any fixed integer , we have
For the second bound, we use again the matrix identity of Lemma 11 on :
On the event , we use that
which concludes the proof of this proposition. ∎
B.4 Proof of the asymptotic formula of the training error and RKHS norm
The proof is very similar to the proof for the prediction error and we will simply outline the main steps. First recall that the training error is given by
The RKHS norm of the KRR solution is given by
Similarly, for the RKHS norm, we have the decomposition:
For the first term, we have by Sherman-Morrison-Woodbury formula,
We see that it is sufficient to show that
Similarly, we decompose as in the proof of Proposition 5 and bound each term separately:
Similarly to the proof in Section B.1, combining the convergence in probability of the expectation in step 1, and the bound on the variance in step 2 yields the results for the training error and RKHS norm of Theorem 3.
B.5 Auxiliary lemmas
From the assumption, there exists a constant such that
The following proposition is a simple modification of the proof of Theorem 5.48 in [Ver10]:
The proof follows from the same argument as in the proof of Theorem 5.45 in [Ver10]. We will denote a generic constant that only depends on . By symmetrization, we have
where the are independent Rademacher random variables.
By noncommutative Khinchine’s inequality, we have
Denoting , this implies Eq. (84). Equation (85) is a simple consequence of bound (84). ∎
Finally, the following lemma provides a useful matrix algebra identity:
where , and is the Moore-Penrose inverse of (here by assumption, ).
Denote for convenience . This identity comes from the observation that
and by repeatedly applying Sherman-Morrison-Woodbury identity. First,
We can then use the identity again on its inverse:
By the definition of the pseudo-inverse, . We apply a third time the SMW formula:
Appendix C Technical background
The dimension of each subspace is given by
C.1.2 Gegenbauer polynomials
We will use the following properties of Gegenbauer polynomials
These properties imply that —up to a constant— is a representation of the projector onto the subspace of degree - spherical harmonics
then we have the following equation holds in sense
By rotational invariance, the space of homogeneous polynomials of degree is an eigenspace of , and we will denote the corresponding eigenvalue by . In other words . The eigenvalues can be computed via
C.1.3 Hermite polynomials
Here and below, for a polynomial, is the vector of the coefficients of . As a consequence, for any fixed integer , we have
where and are given in Eq. (98) and (94).
C.2 Functions on the hypercube
Fourier analysis on the hypercube is a well studied subject [O’D14]. The purpose of this section is to introduce some notations that make the correspondence with proofs on the sphere straightforward. For convenience, we will adopt the same notations as for their spherical case.
It is easy to verify that (notice that if is odd and if is even)
C.2.2 Hypercubic Gegenbauer
Notice that the right hand side only depends on and therefore these polynomials are uniquely defined. In particular,
Notice that by weak convergence of to the normal distribution, we have also convergence of the (rescaled) hypercubic Gegenbauer polynomials to the Hermite polynomials, i.e., for any fixed , we have
C.3 Hypercontractivity of the uniform distribution on the sphere and the hypercube
By Holder’s inequality, we have for any and any . The reverse inequality does not hold in general, even up to a constant. However, for some measures, the reverse inequality will hold for some sufficiently nice functions. These measures satisfy the celebrated hypercontractivity properties [Gro75, Bon70, Bec75, Bec92].
Besides this classical result, we will also use the following simple observation:
Note that for any , we have Y_{S}({\bm{x}})=\big{(}\prod_{i\in[d]}x_{i}\big{)}\cdot Y_{S^{c}}({\bm{x}}). Hence, we have
Finally, we have the following similar hypercontractivity property on the sphere: