Multiple Descent: Design Your Own Generalization Curve
Lin Chen, Yifei Min, Mikhail Belkin, Amin Karbasi
Introduction
The main goal of machine learning methods is to provide an accurate out-of-sample prediction, known as generalization. For a fixed family of models, a common way to select a model from this family is through empirical risk minimization, i.e., algorithmically selecting models that minimize the risk on the training dataset. Given a variably parameterized family of models, the statistical learning theory aims to identify the dependence between model complexity and model performance. The empirical risk usually decreases monotonically as the model complexity increases, and achieves its minimum when the model is rich enough to interpolate the training data, resulting in zero (or near-zero) training error. In contrast, the behaviour of the test error as a function of model complexity is far more complicated. Indeed, in this paper we show how to construct a model family for which the generalization curve can be fully controlled (away from the interpolation threshold) in both under-parameterized and over-parameterized regimes. Classical statistical learning theory supports a U-shaped curve of generalization versus model complexity . Under such a framework, the best model is found at the bottom of the U-shaped curve, which corresponds to appropriately balancing under-fitting and over-fitting the training data. From the view of the bias-variance trade-off, a higher model complexity increases the variance while decreasing the bias. A model with an appropriate level of complexity achieves a relatively low bias while still keeping the variance under control. On the other hand, a model that interpolates the training data is deemed to over-fit and tends to worsen the generalization performance due to the soaring variance.
Although classical statistical theory suggests a pattern of behavior for the generalization curve up to the interpolation threshold, it does not describe what happens beyond the interpolation threshold, commonly referred to as the over-parameterized regime. This is the exact regime where many modern machine learning models, especially deep neural networks, achieved remarkable success. Indeed, neural networks generalize well even when the models are so complex that they have the potential to interpolate all the training data points .
Modern practitioners commonly deploy deep neural networks with hundreds of millions or even billions of parameters. It has become widely accepted that large models achieve performance superior to small models that may be suggested by the classical U-shaped generalization curve . This indicates that the test error decreases again once model complexity grows beyond the interpolation threshold, resulting in the so called double-descent phenomenon described in , which has been broadly supported by empirical evidence and confirmed empirically on modern neural architectures by Nakkiran et al. . On the theoretical side, this phenomenon has been recently addressed by several works on various model settings. In particular, Belkin et al. proved the existence of double-descent phenomenon for linear regression with random feature selection and analyzed the random Fourier feature model . Mei and Montanari also studied the Fourier model and computed the asymptotic test error which captures the double-descent phenomenon. Bartlett et al. , Tsigler and Bartlett analyzed and gave explicit conditions for “benign overfitting” in linear and ridge regression, respectively. Caron and Chretien provided a finite sample analysis of the nonlinear function estimation and showed that the parameter learned through empirical risk minimization converges to the true parameter with high probability as the model complexity tends to infinity, implying the existence of double descent. Liu et al. studied the high dimensional kernel ridge regression in the under- and over-parameterized regimes and showed that the risk curve can be double descent, bell-shaped, and monotonically decreasing.
Among all the aforementioned efforts, one particularly interesting question is whether one can observe more than two descents in the generalization curve. d’Ascoli et al. empirically showed a sample-wise triple-descent phenomenon under the random Fourier feature model. Similar triple-descent was also observed for linear regression . More rigorously, Liang et al. presented an upper bound on the risk of the minimum-norm interpolation versus the data dimension in Reproducing Kernel Hilbert Spaces (RKHS), which exhibits multiple descent. However, a multiple-descent upper bound without a properly matching lower bound does not imply the existence of a multiple-descent generalization curve. In this work, we study the multiple descent phenomenon by addressing the following questions:
Can the existence of a multiple descent generalization curve be rigorously proven?
Can an arbitrary number of descents occur?
Can the generalization curve and the locations of descents be designed?
In this paper, we show that the answer to all three of these questions is yes. Further related work is presented in Section 2.
Our Contribution. We consider the linear regression model and analyze how the risk changes as the dimension of the data grows. In the linear regression setting, the data dimension is equal to the dimension of the parameter space, which reflects the model complexity. We rigorously show that the multiple descent generalization curve exists under this setting. To our best knowledge, this is the first work proving a multiple descent phenomenon.
On the one hand, we show theoretically that the generalization curve is malleable and can be constructed in an arbitrary fashion. On the other hand, we rarely observe complex generalization curves in practice, besides carefully curated constructions. Putting these facts together, we arrive at the conclusion that realistic generalization curves arise from specific interactions between properties of typical data and the inductive biases of algorithms. We should highlight that the nature of these interactions is far from being understood and should be an area of further investigations.
Related Work
Our work is directly related to the recent line of research in the theoretical understanding of the double descent and the multiple descent phenomenon . Here we briefly discuss some other work that is closely related to this paper.
In this paper we focus on the least square linear regression with no regularization. For the regularized least square regression, De Vito et al. proposed a selection procedure for the regularization parameter. Advani and Saxe analyzed the generalization of neural networks with mean squared error under the asymptotic regime where both the sample size and model complexity tend to infinity. Richards et al. proved for least square regression in the asymptotic regime that as the dimension-to-sample-size ratio grows, an additional peak can occur in both the variance and bias due to the covariance structure of the features. As a comparison, in this paper the sample size is fixed and the model complexity increases. Rudi and Rosasco studied kernel ridge regression and gave an upper bound on the number of the random features to reach certain risk level. Our result shows that there exists a natural setting where by manipulating the random features one can control the risk curve.
Over-Parameterization and Interpolation.
The double descent occurs when the model complexity reaches and increases beyond the interpolation threshold. Most previous works focused on proving an upper bound or optimal rate for the risk. Caponnetto and De Vito gave the optimal rate for least square ridge regression via careful selection of the regularization parameter. Belkin et al. showed that the optimal rate for risk can be achieved by a model that interpolates the training data. In a series of work on kernel regression with regularization parameter tending to zero (a.k.a. kernel ridgeless regression), Rakhlin and Zhai showed that the risk is bounded away from zero when the data dimension is fixed with respect to the sample size. Liang and Rakhlin then considered the case when , showed empirically the multiple descent phenomenon and proved a risk upper bound that can be small given favorable data and kernel assumptions. Instead of giving a bound, our paper presents an exact computation of risk in the cases of underparametrized and overparametrized linear regression, and proves the existence of the multiple descent phenomenon. Wyner et al. analyzed AdaBoost and Random Forest from the perspective of interpolation. There has also been a line of work on wide neural networks .
Sample-wise Double Descent and Non-monotonicity.
There has also been recent development beyond the model-complexity double-descent phenomenon. For example, regarding sample-wise non-monotonicity, Nakkiran et al. empirically observed the epoch-wise double-descent and sample-wise non-monotonicity for neural networks. Chen et al. and Min et al. identified and proved the sample-wise double descent under the adversarial training setting, and Javanmard et al. discovered double-descent under adversarially robust linear regression. Loog et al. showed that empirical risk minimization can lead to sample-wise non-monotonicity in the standard linear model setting under various loss functions including the absolute loss and the squared loss, which covers the range from classification to regression. We also refer the reader to their discussion of the earlier work on non-monotonicity of generalization curves. Dar et al. demonstrated the double descent curve of the generalization errors of subspace fitting problems. Fei et al. studied the risk-sample tradeoff in reinforcement learning.
Preliminaries and Problem Formulation
Distributions. Let () and (, ) denote the univariate and multivariate Gaussian distributions, respectively, where and is a positive semi-definite matrix. We define a family of trimodal Gaussian mixture distributions as follows
Let denote the noncentral chi-squared distribution with degrees of freedom and the non-centrality parameter . For example, if (for ) are independent Gaussian random variables, we have , where . We also denote by the (central) chi-squared distribution with degrees and the -distribution by where and are the degrees of freedom.
Problem Setup. Let be column vectors that represent the training data of size and let be a column vector that represents the test data. We assume that they are all independently drawn from a distribution
where the noise . We use the same setup as in (see Equations (1) and (2) in ). Moreover, in another closely related work , if the kernel is set to the linear kernel, it is equivalent to our setup.
where and . We call the term the bias and call the term the variance.
The next remark shows that in the underparametrized regime, the bias vanishes. The vanishing bias in the underparametrized regime is also observed by Hastie et al. and shown in their Proposition 2.
In the underparametrized regime, if is a continous distribution (our construction presented later satisfies this condition), the matrix has independent column almost surely. In this case, we have and therefore the bias vanishes irrespective of . In other words, in the underparametrized regime, equals .
According to Remark 1, we have in the underparametrized regime. It also holds in the overparametrized regime when . Without loss of generality, we assume in the underparametrized regime (for all ). In the overparametrized regime, we also assume for the case. In this case, we have
We assume a general (i.e., not necessarily being ) in the overparametrized regime when is non-zero.
We would like to study the change in the loss caused by the growth in the number of features revealed. Recall . Once we reveal a new feature, which adds a new row to and a new component to , we have .
Local Maximum and Multiple Descent. Throughout the paper, we say that a local maximum occurs at a dimension if and . Intuitively, a local maximum occurs if there is an increasing stage of the generalization loss, followed by a decreasing stage, as the dimension grows. Additionally, we define . If the generalization loss exhibits a single descent, based on our definition, a unique local maximum occurs at . For a double-descent generalization curve, a local maximum occurs at two different dimensions. In general, if we observe local maxima at multiple dimensions, we say there is a multiple descent.
Underparametrized Regime
First, we present our main theorem for the underparametrized regime below, whose proof is deferred to the end of Section 4. It states that the generalization loss is always non-decreasing as grows. Moreover, it is possible to have an arbitrarily large ascent, i.e., for any .
If , we have irrespective of the data distribution. Moreover, for any , there exists a distribution such that .
The first part of Theorem 1 holds irrespective of the data distribution. For the second part of the theorem ( i.e., for any there exists a distribution such that ) to hold, one extremely simple and elegant choice of the distribution is a product distribution such that for all , where is a Gaussian mixture for some . Since the second part of Theorem 1 is of independent interest, the result is summarized by Theorem 4.
In light of Remark 2, can be chosen to be a product distribution that consists . Note that one can simulate with through the inverse transform sampling. To see this, let and be the cdf of and , respectively. If , we have and therefore . In fact, we can use a multivariate Gaussian and a sequence of non-linear kernels , where the feature map is . Here is a simple rule for defining : if , we set to . Thus, the problem becomes a kernel regression problem on the standard Gaussian data.
The first part of Theorem 1, which says that is increasing (or more precisely, non-decreasing), agrees with Figure 1 of and Proposition 2 of . In , they proved that the risk increases with . Note that, at first glance, Theorem 1 may look counterintuitive since it does not obey the classical U-shaped generalization curve. However, we would like to emphasize that the U-shaped curve does not always occur. In Figure 1 and Proposition 2 of these two papers respectively, there is no U-shaped curve. The intuition behind Theorem 1 is that in the underparametrized setting, the bias is always zero and as approaches , the variance keeps increasing.
Coming to the second part of Theorem 1, we now discuss how we will construct such a distribution inductively to satisfy . We fix . Again, denote the first features of by . Let us add an additional component to the training data and test data so that the dimension is incremented by 1. Let denote the additional component that we add to the vector (so that the new vector is given as . Similarly, let denote the additional component that we add to the test vector . We form the column vector that collects all additional components that we add to the training data.
We consider the change in the generalization loss as follows
Note that the components are i.i.d. The proof of Theorem 1 starts with Lemma 2 which relates the pseudo-inverse of to that of . In this way, we can decompose into multiple terms for further careful analysis in the proofs hereinafter.
Let and , where . Additionally, let and , and define . If and the columnwise partitioned matrix has linearly independent columns, we have
In our construction of , the components are all continuous distributions. The matrix is an orthogonal projection matrix and therefore . As a result, it holds almost surely that , , and has linearly independent columns. Thus the assumptions of Lemma 2 are satisfied almost surely. In the sequel, we assume that these assumptions are always fulfilled.
Theorem 3 guarantees that if is finite and the -th features are i.i.d. sampled from or , is also finite.
Let be as defined in Lemma 2. If are i.i.d. and follow a distribution with mean zero, conditioned on and , we have
In particular, if and , conditioned on and , we have
If and , conditioned on and , we have
Using Theorem 3, we can show inductively (on ) that is finite for every . Provided that we are able to guarantee finite , Theorem 3 implies that is finite for every if the components are always sampled from or .
Making a large can be achieved by adding an entry sampled from when the data dimension increases from to in the previous step. Theorem 4 shows that adding a feature can increase the loss by arbitrary amount, which in turn implies the second part of Theorem 1.
For any and , there exists a such that if , we have
We follow the notation convention in (3):
Recall and the matrix is of size . Both matrices and are fat matrices. As a result, if , we have
Since , we get . Therefore, we obtain . The second part follows from Theorem 4. ∎
Overparametrized Regime
In this section, we study the multiple decent phenomenon in the overparametrized regime. Note that as stated in Section 3, we consider the minimum-norm solution here. We first consider the case where the model and is as defined in (2). Then we discuss the setting .
As stated in the following theorem, we require . This is merely a technical requirement and we can still say that starts at roughly the same order as . In other words, the result covers almost the entire spectrum of the overparametrized regime.
Let . Given any sequence , where , there exists a distribution such that for every , we have
In Theorem 5, the sequence , , , is just used to specify the increasing/decreasing behavior of the sequence for . Compared to Theorem 1 for the underparametrized regime, where always increases, Theorem 5 indicates that one is able to fully control both ascents and descents in the overparametrized regime. Fig. 2 is an illustration.
We now present tools for proving Theorem 5. Lemma 6 gives the pseudo-inverse of when .
Let and , where . Assume that matrix and the columnwise partitioned matrix have linearly independent rows. Let and . We have
Lemma 7 establishes finite expectation for several random variables. These finite expectation results are necessary for Theorem 8 and Theorem 9 to hold. Technically, they are the dominating random variables needed in Lebesgue’s dominated convergence theorem. Lemma 7 indicates that to guarantee these finite expectations, it suffices to set the first distributions to the standard normal distribution and then set to either a Gaussian or a Gaussian mixture distribution. In fact, in Theorem 8 and Theorem 9, we always add a Gaussian distribution or a Gaussian mixture.
Let be a product distribution where
if ; and
is either or for .
Let denote . Assume that every row of and are i.i.d. and follow . For any such that , all of the followings hold:
Theorems 8 and 9 are the key technical results for constructing multiple descent in the overparametrized regime. One can create a descent () by adding a Gaussian feature (Theorem 8) and create an ascent () by adding a Gaussian mixture feature (Theorem 9).
If and all equations in (4) hold, there exists such that if , we have
Theorem 9 shows that adding a Gaussian mixture feature can make .
Assume . For any , there exist , such that if , we have
The proof of Theorem 5 immediately follows from Theorem 8 and Theorem 9.
We construct the product distribution . We set for . For , is either or depending on being either or .
First we show that for each step , the assumption of Theorem 8 is satisfied. If , we know that almost surely. Since is a continuous distribution, the matrix has full row rank almost surely. Therefore, almost surely. Thus almost surely, which implies . In other words, almost surely. We reach a contradiction. Moreover, by Lemma 7, the assumption of Theorem 9 is also satisfied.
If , by Theorem 8, there exists such that if , then . Similarly if , by Theorem 9, there exists and such that guarantees .
Gaussian setting. In what follows, we study the case where the model is non-zero. In particular, we consider a setting where each entry of is i.i.d. . Recalling (1), define the biases
where and . The second term in and is the variance term. Note that is the expected value of in (1) and averages over . Theorem 10 shows that one can add a Gaussian mixture feature in order to make , and add a Gaussian feature in order to make .
Let , , , and , where . Assume that are jointly independent, . Moreover, assume that the matrix has linearly independent rows almost surely. The following statements hold:
If , for any , there exist such that .
If , there exists such that for all
we have .
Theorem 10 indicates that for obeying a normal distribution, one can still construct a generalization curve as desired by adding a Gaussian or Gaussian mixture feature properly. We make this construction explicit for any desired generalization curve in (the proof of) Theorem 11. Similar to the construction in the underparametrized regime (for all ) and overparametrization regime (for ), the distribution can be made a product distribution.
Let . Given any sequence , where , there exists and a distribution such that for and every , we have
Define the design matrix . Similar to the proof of Theorem 5, we construct the product distribution . We set for . For , is either or depending on being either or .
If , by Theorem 10, there exists and such that guarantees . If , define
By Theorem 10, there exists such that if and , then . We take
Conclusion
Our work proves that the expected risk of linear regression can manifest multiple descents when the number of features increases and sample size is fixed. This is carried out through an algorithmic construction of a feature-revealing process where the newly revealed feature follows either a Gaussian distribution or a Gaussian mixture distribution. Notably, the construction also enables us to control local maxima in the underparametrized regime and control ascents/descents freely in the overparametrized regime. Overall, this allows us to design the generalization curve away from the interpolation threshold.
We believe that our analysis of linear regression in this paper is a good starting point for explaining non-monotonic generalization curves observed in machine learning studies. Extending these results to more complex problem setups would be a meaningful future direction.
Funding Transparency Statement
LC: Funding in direct support of this work: postdoctoral research fellowship by the Simons Institute for the Theory of Computing, University of California, Berkeley, and Google PhD Fellowship by Google. Additional revenues related to this work: internships at Google.
MB acknowledges support from NSF IIS-1815697, and the support of the NSF and the Simons Foundation for the Collaboration on the Theoretical Foundations of Deep Learning through awards DMS-2031883 and #814639.
AK: Funding in direct support of this work: NSF (IIS-1845032) and ONR (N00014-19-1-2406).
References
Appendix A Almost Sure Convergence of Sequence of Normal Random Variables
In this paper, we need a sequence of random variables such that , , and almost surely. The following lemma shows the existence of such a sequence.
There exist a sequence of random variables such that , , and almost surely.
Let and . Define the event . We have
By the Borel–Cantelli lemma, we have , which implies that almost surely. ∎
Appendix B Proofs for Underparametrized Regime
Define . Since has linearly independent columns, the Gram matrix is non-singular. The Sherman-Morrison formula gives
where we use the facts and in the last equality. Therefore, we deduce
Therefore, we obtain the desired expression.
B.2 Proof of Theorem 3
First, we rewrite the expression as follows
where are defined in Lemma 2. Since has mean 0 and is independent of other random variables, so that the cross term vanishes under expectation over and :
where denotes the inner product. Therefore taking the expectation of (6) over and yields
We simplify the third term. Recall that is an orthogonal projection matrix and thus idempotent
We consider the first and second terms. We write and define . The sum of the first and second terms equals
The rank of is at most . To see this, we re-write in the following way
Notice that , , and .
It follows that . The matrix has at least zero eigenvalues. We claim that has two non-zero eigenvalues and they are and .
thus has a unique non-zero eigenvalue . Let denote the corresponding eigenvector such that . Since and is a projection, we have . Therefore we can verify that
To show that the other non-zero eigenvalue of is , we compute the trace of
where we use the fact that , ,
We have shown that has eigenvalue and has at most two non-zero eigenvalues. Therefore, the other non-zero eigenvalue is .
We are now in a position to upper bound (13) as follows:
Putting all three terms of the change in the dimension-normalized generalization loss yields
For , we have . Moreover, follows a distribution. Thus follows an inverse-chi-squared distribution with mean . Therefore the expectation .
Notice that follows a distribution and thus .
For , we need the following lemma.
Assume , and are fixed, where is an orthogonal projection matrix whose rank is . Define , where . If , we have and .
B.3 Proof of Lemma 13
Lemma 14 shows that a noncentral distribution first-order stochastically dominates a central distribution of the same degree of freedom. It will be needed in the proof of Lemma 13.
Assume that random variables and , where . For any , we have
In other words, the random variable (first-order) stochastically dominates .
Let and and all these random variables are jointly independent. Then and .
Since , we can rewrite where and the entries of satisfy . Furthermore, and are independent. Similarly, we can write , where and are independent. To bound , we have
Since is an orthogonal projection, there exists an orthogonal transformation depending only on such that
and that these two quantities are independent. It follows that
Putting the numerator and denominator together yields
B.4 Proof of Theorem 4
We start from (12). Taking expectation over all random variables gives
Our strategy is to choose so that is sufficiently large. This is indeed possible as we immediately show. Define independent random variables and . Since has the same distribution as , we have
Appendix C Proofs for Overparametrized Regime
Since and have full row rank, and exist. Therefore we have
Transposing the above equation yields to the promised equation.
C.2 Proof of Lemma 7
First note that by Cauchy-Schwarz inequality, it suffices to show there exists such that and .
We define to be the submatrix of that consists of all rows and first columns. Denote
We will prove by induction.
The base step is . Recall . We first show . Note that since is almost surely positive definite,
By our choice of , the matrix is an inverse Wishart matrix of size with degrees of freedom, and thus has finite fourth moment (see, for example, Theorem 4.1 in ). It then follows that
For the inductive step, assume for some . We claim that
under the Loewner order, where is the -th column of . Therefore, we have
and by induction, we conclude that for all .
Now we proceed to show . We have
where the last equality uses the fact that is positive semidefinite. Moreover, we deduce
Using the fact that established above, induction gives
where again we use that fact that inverse Wishart matrix has finite second moment.
Next, we demonstrate . Recall that every is either a Gaussian or a Gaussian mixture distribution. Therefore, every entry of has a subgaussian tail, and thus . Together with (14) and the fact that and are independent, we conclude that
C.3 Proof of Theorem 8
The randomness comes from and . We first condition on and being fixed.
Let and . Define
We compute the left-hand side but take the expectation over only for the moment
Let us first consider the first and third terms of the above equation:
Write , where is a diagonal matrix () and is an orthogonal matrix. Recall . Therefore . Taking the expectation over , we have
Let . We have
Notice that for any and , it has the same distribution if we replace by . As a result,
Thus the matrix is a diagonal matrix and
Moreover, by the monotone convergence theorem, we deduce
Again, by the monotone convergence theorem, we have
We apply a similar method to the term . We deduce
where .
Putting all three terms together, we have as
Therefore, there exists such that .
C.4 Proof of Theorem 9
Again we first condition on and being fixed. Let and as defined in Lemma 6. We also define the following variables:
We compute but take the expectation over only for the moment
Our strategy is to make arbitrarily large. To this end, by the independence of and we have
By definition of , with probability , is sampled from either or , which implies . For each , we have
Also note that is positive definite. It follows that
where we switch the order of expectation and limit using the monotone convergence theorem. Taking full expectation over and of (15) and using the assumption that we have
C.5 Proof of Theorem 10
If we define and , Lemma 6 implies
We obtain the expression for :
If or , it holds that , , and . Therefore we have
where the second equality is because is independent from the remaining random variables and the third step is because of . Recalling that and , we have
If , Theorem 9 implies that for any , there exist such that
If , we have as ,
From the proof of Theorem 8, we know that as
Appendix D Discussion
Recently, there has been growing interest in the comparison and connection between deep learning and classical machine learning methods. For example, clustering, a classical unsupervised machine learning method, was adapted to end-to-end training of image data . This paper studied the non-monotonic generalization risk curve of overparametrized linear regression. It would be an interesting future work to study the multiple descent phenomenon in other classical machine learning methods and theoretically understand this phenomenon in deep learning. Moreover, when the multiple descent phenomenon arises in different machine learning models, it remains open whether there is any deep reason in common that accounts for it.