Two models of double descent for weak features
Mikhail Belkin, Daniel Hsu, Ji Xu
Introduction
The “double descent” risk curve was proposed by [Bel+19] as a general way to qualitatively describe the out-of-sample prediction performance of variably-parameterized machine learning models. This risk curve reconciles the classical bias-variance trade-off with the behavior of predictive models that interpolate training data, as observed for several model families (including neural networks) in a wide variety of applications (see Section 1.1 for references). In these studies, a predictive model with parameters is fit to a training sample of size , and the test risk (i.e., out-of-sample error) is examined as a function of . When is below the sample size (for regression or binary classification), the test risk is governed by the usual bias-variance decomposition. As is increased towards , the training risk (i.e., in-sample error) is driven to zero, but the test risk shoots up, sometimes toward infinity. The classical bias-variance analysis identifies a “sweet spot” value of at which the bias and variance are balanced to achieve low test risk. However, in the “modern regime”, as grows beyond , the training risk remains zero, but the test risk decreases again, even when fitting noisy data, provided that the model is fit using a suitable inductive bias (e.g., least norm solution). In many (but not all) cases from [Bel+19], the limiting risk as is lower than what is achieved at the “sweet spot” value of .
In this article, we show that key aspects of the “double descent” risk curve can be observed with the least squares/least norm predictor in two simple random features models. The first is a Gaussian model studied by [BF83] in the classical regime, while the second is a Fourier series model for functions on the circle. In both cases, we prove that the risk is infinite around , and decreases again as increases beyond . When the signal-to-noise ratio is high, the minimum risk is, in fact, achieved in the modern regime, when . Our results provide a precise mathematical analysis in a simple and tractable setting of the mechanism that was qualitatively described by [Bel+19]. In particular, it captures a key aspect of many practical over-parameterized models: that increasing the number of parameters to the maximum can lead to better performance. We also establish some non-asymptotic concentration phenomena in the Gaussian model.
We note that in both of the models, the features are selected randomly, which makes them useful for studying scenarios where features are plentiful but individually too “weak” to be selected in an informed manner. Such scenarios are commonplace in machine learning practice, and they should be contrasted with “scientific” scenarios where features are carefully designed or curated, as is often the case in scientific applications. For comparison, we give an example of “prescient” feature selection, where the features a priori known to be most useful are included in the model. In this case, the optimal test risk is achieved at some , which is consistent with the classical analysis of [BF83].
The “double descent” risk curve was posited by [Bel+19] to connect the classical bias-variance trade-off to behaviors observed in over-parameterized regimes for a variety of machine learning models. The shape and features of the risk curve itself appear throughout in the literature in a number of contexts [[, e.g.,]]vallet1989linear,opper1990ability,le1991eigenvalues,krogh1992generalization,bos1998dynamics,watkin1993statistical,advani2017high; see also [Loo+20] for a “brief prehistory” that focuses on the curious peak in the curve. These prior works analyze the risk of linear classification and regression models and neural networks in high-dimensional asymptotic regimes. Our analysis in the Gaussian model gives an exact expression for the risk for any finite sample size and number of parameters.
More recently, [Nea+18] observe that similar phenomena in neural networks can be explained by a variance reduction effect of increasing network width. The transition from under- to over-parametrized regimes was recently analyzed by [Spi+18] by drawing a connection to the physical phenomenon of “jamming” in a class of glassy systems. Our analysis makes these ideas concrete and explicit in the context of simple regression models. For instance, our analysis captures the transition from under- to over-parameterized regimes at a point where an inverse Wishart random matrix has no finite expectation. It also allows us to compare the risks at any points in the curve and explain how the risk in the over-parameterized regime can be lower than any risk in the under-parameterized regime.
The initial version of this article [BHX19] appeared concurrently with the works of [Has+19], [Mut+20], and [Bar+20], all of which also study the behavior of the least squares/least norm predictor in over-parameterized linear regression. [Mut+20] focus on the well-specified scenario (essentially, ) and provide upper-bounds on the risk that go to zero as . (A related variance analysis was carried out by [Nea+18].) [Has+19] provide a much broader range of analyses in the high-dimensional asymptotic regime, including a “misspecified” setup that is related to ours. Their analyses require weaker distributional assumptions than ours, owing to their reliance on asymptotic analysis. (A special case of the results in the follow-up work by [XH19] further broadens the range of analyses to allow highly non-isotropic designs, but again only in the high-dimensional asymptotic regime.) The analysis of [Has+19] also considers the effect of ridge regularization; in particular, they show that when the optimal level of regularization is used, the risk curve no longer shows the “double descent” shape. Finally, [Bar+20] study non-asymptotic upper and lower bounds on the risk in the over-parameterized regime, and provide a characterization in terms of certain “effective dimensions” based on the tail of the eigenvalue sequence of the covariance operator.
Gaussian model
Given iid copies of , we fit a linear model to the data only using a subset of variables.
Let be the design matrix, and let be the vector of responses. For a subset and a -dimensional vector , we use to denote its -dimensional subvector of entries from ; we also use to denote the design matrix with variables from . For , we denote its complement by . Finally, denotes the Euclidean norm.
We fit regression coefficients with
Above, the symbol † denotes the Moore-Penrose pseudoinverse. In other words, we use the solution to the normal equations of least norm for and force to all-zeros.
In this section, our analysis assumes a model in which follows a standard multivariate Gaussian distribution. This Gaussian model was also studied by [BF83], although their analysis is restricted to the case where the number of variables used is always at most ; our analysis will also consider the regime.
We derive a formula for the (prediction) risk of for an arbitrary choice of features , and then examine this risk under particular selection models for .
The proof of Theorem 1 is not hard, we give the details in Section 2.2. We now turn to the risk of under a random selection model for .
Let be a uniformly random subset of of cardinality . In the setting of Theorem 1, the risk of (taking expectation with respect to the random choice of in addition to the random design matrix and response vector) satisfies
Since is a uniformly random subset of of cardinality ,
Plugging into Theorem 1 completes the proof. ∎
Thus, assuming , we observe that the risk first increases with up to the “interpolation threshold” (), after which the risk decreases with . Moreover, when the signal-to-noise ratio is larger than , the risk is smallest at ; in particular, it is smaller than the risk at any . This is the “double descent” risk curve where the first “descent” is degenerate (i.e., the “sweet spot” that balances bias and variance is at ). See Figure 1 for an illustration.
It is worth pointing out that the behavior under the random selection model of can be very different from that under a deterministic model of . Consider including variables in by decreasing order of —a kind of “prescient” selection model studied by [BF83]. The behavior of the risk as a function of , illustrated in Figure 2, reveals a striking difference between the random selection model and the “prescient” selection model.
2 Proof of Theorem 1
Since , it follows that the risk of is
The risk of was computed by [BF83] in the regime where :
We consider the regime where . Recall that the pseudoinverse of can be written as . Thus, letting ,
On the right hand side, the first term is the orthogonal projection of onto the null space of , while the second term is a vector in the row space of . By the Pythagorean theorem, the squared norm of their sum is equal to the sum of their squared norms, so
We analyze the expected values of these two terms by exploiting properties of the standard normal distribution.
Note that is the orthogonal projection matrix for the row space of . So, by the Pythagorean theorem, we have
By rotational symmetry of the standard normal distribution, it follows that
where the second equality holds almost surely because is almost surely invertible. Since and are uncorrelated, it follows that
Combining the first and second terms gives the claimed expression for the risk. ∎
3 Concentration
We briefly consider the measure concentration of .
Consider the setting from Theorem 1, and fix any . If , then
The proof is given in Appendix A. The main idea for the case is as follows. From the proof of Theorem 1, we have the decomposition
The same arguments can be used to give fixed-level confidence bounds; see Proposition 2 in Appendix B.
Finally, it is also possible to compare to (and to ) under the random selection model of from Corollary 1 using concentration inequalities for sampling without replacement [BM15, see, e.g.,]. The following is a simple consequence of Proposition 1.4 of [BM15].
For any , with probability at least ,
where .
The proof is in Appendix C. The crucial parameter has range . It is small when there are many relevant “weak” features, each with a relatively small coefficient in ; conversely, it is large when is concentrated on a sparse subset of features.
Fourier series model
In this section, we consider a noise-free Fourier series model, which can be regarded as a one-dimensional version of the random Fourier features model studied by [RR08] for functions defined on the unit circle.
and are independent random subsets of . For any , the membership of in (respectively, ) is determined by an independent Bernoulli variable with mean (respectively, ).
We observe the design matrix and -dimensional vector of responses . Here, is the submatrix of with rows from and columns from , and is the subvector of of entries from .
We fit regression coefficients with
One important property of the discrete Fourier transform matrix that we use is that the matrix has rank for any . This is a consequence of the fact that is Vandermonde. Thus, we have
In the remainder of this section, we analyze the risk of under a random model for , where
Following the arguments from Section 2.1, we have
Now we take (conditional) expectations with respect to , given and :
Since has rank , the first trace expression is equal to
For the second trace expression, we use the explicit formula for and the fact that to obtain
where the are the eigenvalues of . Therefore, from Equation 1, we have
To determine the asymptotic behavior of , we use a recent result of [Far11]:
as with and held fixed. Further, under this limit, we have
since . Hence we have the following:
Assume the setting as above, with and and held fixed. Then
Note that the right-hand side in the equation from Theorem 3 is well-defined in the limit because the ratios are fixed. It diverges to when is close to , and decreases as approaches . This is the same behavior as in the Gaussian model from Section 2 with random feature selection; we depict a non-asymptotic instantiation of it in Figure 3.
Discussion
Our analysis shows that when features are chosen in an uninformed manner, it may be optimal to choose as many as possible—even more than the number of data—rather than limit the number to that which balances bias and variance as suggested by classical analyses. This choice is simple, both conceptually and algorithmically (although it may incur a computational penalty for processing large numbers of parameters), and avoids the need for precise control of regularization parameters. It is reflective of the practice in modern machine learning applications like image and speech recognition, where signal processing-based features are individually weak but in great abundance, and models that use all of the features, notably neural networks, are highly successful. This stands in contrast to the “scientific” scenarios with informed selection of features; for example, in many science and medical applications, features are purposefully chosen based on the detailed understanding of the underlying phenomena. As illustrated by the “prescient” model that selects the best features, in that case choosing the number of features to balance bias and variance can be better than incurring the costs that come with using all of the features.
Finally we remark, that there appears to be a sharp divide between the classical analyses of statistics and machine learning in regimes and the modern “weak but plentiful features” interpolating settings. While the former are deeply explored, an understanding of the latter is only starting to emerge. It is clear that the best practices for model and feature selection depend crucially on the regime of the application.
We thank the anonymous referees for their remarks and suggestions (which, in particular, led to the inclusion of Section 2.3). This work was carried out in part while MB was at The Ohio State University. This research was supported by NSF CCF-1740833 and IIS-1815697 awards, a Sloan Research Fellowship, a Google Faculty Award, and a Cheung-Kong Graduate School of Business Fellowship.
References
Appendix A Proof of Theorem 2
We first consider (i.e., ). From the proof of Theorem 1, we have the decomposition
The second term is a (random) quadratic form in . Let , which is non-singular almost surely. By Lemma 4 from [Das00], we have for any ,
where is the ratio of the largest singular value of to the smallest singular value of . For any ,
These inequalities follow from Gaussian comparison inequalities and concentration of measure on the sphere and in Gaussian space [RV09, Ver18, see, e.g.,]. Therefore, for ,
Finally, observe that has a -distribution with degrees of freedom. Therefore, again using Lemma 4 from [Das00] and a union bound, we have for any ,
Putting these probability inequalities together (with ) completes the proof for .
Now we consider (i.e., ). We have
The matrix is non-singular almost surely, so also holds almost surely. Note that has the same eigenvalues as , and hence has the same eigenvalues as . Therefore, following essentially the same arguments as above for handling (but switching the roles of and , and hence replacing with ) completes the proof for . ∎
Appendix B Confidence bounds
Fixed-level confidence bounds can be immediately derived from the probability inequalities in Appendix A.
Consider the setting from Theorem 1 and fix any . If , then with probability at least ,
If , then with probability at least ,
In the expressions above, we assume and are large enough (perhaps in relation to each other) so that all denominators are positive.
Appendix C Proof of Proposition 1
Let denote a random sample of cardinality from the finite population , drawn without replacement, so that . Since , we have
Observe that the finite population has mean , variance , and range . Therefore, Proposition 1.4 of [BM15] and a union bound implies, with probability at least ,
If is more than , then we can replace by on the right-hand side by analogously applying the previous argument to the random sample of cardinality that determines . ∎