T HE F INAL A SCENT : W HEN B IGGER M ODELS G ENERALIZE W ORSE ON N OISY -L ABELED D ATA
Anonymous authors
Paper under double-blind review
A BSTRACT
Increasing the size of overparameterized neural networks has been shown to improve their generalization performance.
However, real-world datasets often contain a significant fraction of noisy labels, which can drastically harm the performance of the models trained on them.
In this work, we study how neural networks’ test loss changes with model size when the training set contains noisy labels.
We show that under a sufficiently large noise-to-sample size ratio, generalization error eventually increases with model size.
First, we provide a theoretical analysis on random feature regression and show that this phenomenon occurs as the variance of the generalization loss experiences a second ascent under large noise-to-sample size ratio.
Then, we present extensive empirical evidence confirming that our theoretical results hold for neural networks.
Furthermore, we empirically observe that the adverse effect of network size is more pronounced when robust training methods are employed to learn from noisy-labeled data.
Our results have important practical implications: First, larger models should be employed with extra care, particularly when trained on smaller datasets or using robust learning methods.
Second, a large sample size can alleviate the effect of noisy labels and allow larger models to achieve a superior performance even under noise.
I NTRODUCTION
Modern neural networks of ever-increasing size, with billions of parameters, have achieved an unprecedented success in various tasks.
However, real-world training datasets are usually unlabeled and the commonly used crowd-sourcing and automatic-labeling techniques can introduce a lot of noisy labels (Krishna et al., 2016).
Over-parameterized models can easily overfit the noisy labels and suffer a drastic drop in their generalization performance (Zhang et al., 2016).
This phenomenon has inspired a recent body of work on dealing with high levels of noisy labels (Han et al., 2018; Zhang & Sabuncu, 2018; Jiang et al., 2018;
Mirzasoleiman et al., 2020;
Liu et al., 2020; Li et al., 2020).
However, the effect of model size on neural networks’ generalization performance on noisy data has been overlooked, and the following important question has remained unanswered: can large models trained on noisy-labeled data be trusted and safely used?
Contradictory to the classical view of bias-variance trade-off, increasing the size of overparameterized neural networks only improves generalization Neyshabur et al.
To explain this, (Belkin et al., 2019) proposed the the double descent phenomenon, suggesting that the test error follows a U-shaped curve until the training set can be fit exactly, but then it begins to descend again and reaches its minimum in the overparameterized regime.
This has further been investigated by a body of recent work (see Section 2) focusing on confirming or reproducing the double descent curve.
Here, we instead show that label noise can change the above picture and introduce a final ascent to the monotonically decreasing loss curve in the overparameterized regime.
Specifically, we analyze the generalization performance of models of increasing size, in terms of both network width and density , under varying sample size and levels of noisy labels.
We find that, when noise-to-sample-size ratio is sufficiently large, increasing the width or density of the model beyond a certain point only hurts the generalization performance.
We first provide theoretical evidence from random feature regression studied in prior work (Yang et al., 2020) and show that the test generalization loss can be decomposed into a decreasing bias, a unimodal noise-independent variance and an increasing noise-dependent variance.
The noisedependent variance is more pronounced when the noise-to-sample size ratio is large, which leads to a second ascent in the total variance ( c.f. Figures 1, and 2) and an ascent in the test loss.
Interestingly, our analysis also demonstrates that under a large noise-to-sample size ratio, reducing model density by keeping a randomly selected fraction of weights can improve the generalization.
Our analysis complements the double-descent phenomena, by providing a complete picture of the generalization curve vs. model size under various levels of noisy labels.
Through extensive experiments, we corroborate our theoretical results and show their validity for neural networks by showing that (1) sufficiently large label noise can lead to the final ascent in test loss and (2) sufficiently large sample size can eliminate the final ascent.
In addition, we study the effect of model size on the performance of state-of-the-art methods for robust learning against noisy labels.
We show that, perhaps surprisingly, the adverse effect of larger models can be observed even under a smaller noise-to-sample size ratio, when robust methods are employed.
Finally, we take a closer look into the smoothness of the learned networks trained with noisy labels.
We show that noisy labels can turn the previously suggested negative correlation between network size and model complexity into a positive one.
Our work is a step toward understanding the complicated overfitting and generalization behavior of modern machine learning models trained on large real-world data.
In practice, our results also have several important implications: First, reducing width or dropping a fraction of (even randomly selected) weights can alleviate the effect of noisy labels.
Second, when training large models, larger sample size can effectively counter the effect of noisy labels and even remove the final ascent.
This explains why the harm of larger models on noisy-labeled data have not been observed by prior work (Arpit et al., 2017).
Finally, large models should be used with extra care even on large datasets when training with robust methods, as larger width or density can hurt the performance of the robust learning algorithms.
R ELATION TO P RIOR W ORK
A bulk of recent work has studied the double descent phenomena by analyzing the error of linear regression (Hastie et al., 2019;
Belkin et al., 2020; Derezinski et al., 2020), random feature regression (Mei & Montanari, 2019; Adlam & Pennington, 2020a;
Yang et al., 2020; d’Ascoli et al., 2020) or even
NTK regression Adlam & Pennington (2020b), showing these models can capture some important features of double descent.
The primary focus of these works has been on the behavior of the total test error.
A few of them decompose the test error into bias and variance (Mei & Montanari, 2019; Yang et al., 2020).
Most relevant to our analysis are (Adlam & Pennington, 2020a; d’Ascoli et al., 2020) which decompose the variance into several sources.
However, we take different asymptotic limit than theirs.
Given n training examples and d input dimensions, we let nd tend to infinity instead of constant.
The benefit of this limit is that we can derive closed-form expression of different terms in the test error and therefore obtain more interpretable result.
Our setting is particularly comparable to that of (Yang et al., 2020) which analyzed the noiseless case, in the same asymptotic limit.
Our result shows that label noise contributes a monotonically increasing term in the variance, in addition to the bias and noise-independent variance term derived in (Yang et al., 2020).
Furthermore, we include model density into the analysis by adding another layer and show that density plays a different role than width.
In noiseless setting, our Theorem 2 reproduces the empirical observation made by Golubeva et al.
(2020) that increasing width while keeping the number of parameters fixed by reducing density improves generalization (see Appendix A.7), which separates the benefit of width from the effect of model capacity.
The role of label noise in double descent has been discussed before in either empirical Nakkiran et al.
(2021) or theoretical Adlam & Pennington (2020a) studies.
However, these works focus on the settings where double descent still holds and only highlight that label noise exacerbates the peak of test loss at the interpolation threshold.
In contrast, we find that label noise can essentially change the monotonicity of the loss curve by adding a final ascent.
Furthermore, we show that this ascent can be removed by using sufficiently large sample size.
10 − 1010p/d 0.
V a r i a n c e ( t h e o r y ) κ = 0.
10 − 1010p/d 0.
κ = 0.
Variance Variance clean Variance noise
Width 0.
V a r i a n c e ( e x p e r
i m e n t ) noise ratio = 0.
Width 0.
[Figure]
1010 2 Width 0.
V a r i a n c e 0.2 0.
T HEORETICAL A NALYSIS OF R ANDOM F EATURE R EGRESSION
We first provide theoretical evidence for our main finding by analyzing the risk of a two layer neural network with a random first layer.
Our result builds on (Yang et al., 2020), which studied the case where the model is trained without label noise.
In particular, we extend their result to the noisy setting and show that the last ascent can be understood through the lens of bias-variance decomposition.
Moreover, in Section 3.2 we show that with a simple modification to the setting, we can include model density into the analysis.
It turns out that reducing the density of wide models is equivalent to using a stronger regularization in the limit, which leads to better generalization in noisy settings.
3. T HE S ECOND A SCENT IN V ARIANCE C AUSED BY L ABEL N OISE
Suppose we have a training dataset ( X , y )
where X =
[ x 1 , x 2 , . . .
, x n ] and y =
[ y 1 , y 2 , . . .
, y n ] ⊤ , with x i ∈ R d and y i ∈ R are feature vector and label point data point i .
We assume each x i is independently drawn from a Gaussian distribution N (0 , I d /d ) and labels are generated by y i =
x ⊤ i θ + ϵ i where θ ∈ R d with entries independently drawn from N (0 , 1) and ϵ i ∈
R is the label noise drawn from N (0 , σ 2 ) for each x i .
The learned function is given by random feature ridge regression.
Specifically, we learn a two-layer linear network where the first layer W ∈ R p ×
d has each entry randomly drawn from N (0 , 1 /d ) and the second layer is given by
[Equation]
where ϵ =
[ ϵ 1 , ϵ 2 , . . .
, ϵ n ] ⊤ .
Given a clean test example ( x , y ) where x ∼ N (0 , I d /d ) and y = x ⊤ θ , the prediction of the learned model is given by f ( x ) =
( W x ) ⊤ ˆ β .
The expected risk can then be written as
[Equation]
where A := W ⊤ ( W XX ⊤ W ⊤ + λIII ) − 1 W X and B := AX ⊤ .
See the derivation in Appendix
A.1.
Here we first decompose the risk into bias and variance and then further decompose the variance into two terms where the second term Variance noise captures the role of label noise.
Our analysis is performed in the high-dimensional asymptotic limit where n, d, p → ∞ , with nd = ψ , pd = γ , σ 2 ( n/d ) = κ held constant.
To further simplify the analysis we let ψ = ∞ .
Note that here the noise-to-sample size ratio κ is still finite.
Yang et al.
(2020) analyzed bias-variance decomposition in the same setting without considering label noise.
Therefore we can simply use their expressions for Bias 2 and Variance clean , in Appendix A.2.
Bias 2 is monotonically decreasing and Variance clean is unimodal.
We derive the explicit expression for Variance noise in Appendix A.3 and show the result below.
Theorem 1.
For a 2-layer linear network with p hidden neurons and a random first layer, consider learning the second layer by ridge regression with parameter λ on n training examples with feature dimension d and label noise with variance σ , let λ = nd λ 0 and σ 2 = nd κ for some fixed λ 0 and κ .
The asymptotic expression (where n, d, p → ∞ with nd = ∞ and pd = γ ) of Variance noise is given by
[Equation]
[Figure]
[Equation]
[Figure]
[Equation]
[Figure]
[Equation]
[Figure]
[Equation]
[Figure]
We plot the above expression as well as the expression of Variance clean in the top row of Figure 1.
We set λ 0 = 0 . 075 .
Variance noise monotonically increases and Variance clean is unimodal.
Since Variance noise scales with κ , a second ascent in the variace occurs when κ is large enough.
As result, the risk, which is the sum of Variance and monotonically decreasing
Bias 2 (Figure 3), finds its minimum at intermediate width.
3. I NCORPORATING M ODEL D ENSITY INTO THE A NALYSIS
When the width of the model is beyond optimal, instead of directly reducing the width, one can mask a fixed set of the parameters throughout training to have fewer trainable parameters.
We call this reducing the model density , with density defined as the fraction of remaining parameters.
We study the effect of density for two reasons: First, changing density gives us more fine-grained capacity control.
In practice, by changing width one can only get ( width × m ) parameters where m is the number of parameters at width 1 .
However, changing density can yield arbitrary number of parameters ≤ ( width × m ) and therefore achieves more fine-grained and architecture-independent capacity control.
This is even more important for heavily engineered architectures whose width is particularly hard to reduce, e.g. InceptionResNet-v2 Szegedy et al.
(2017), where we experiment with in Section 4.3.
Second, As we will show below (Figure 4d), under smaller density we can always find lower test loss than the test loss achieved by the optimal density at a larger width.
In our analysis below, we consider the case where the set of trainable weights are selected randomly instead of following any weight selection strategies.
This is to make sure the selected subset of weights are independent of other factors, e.g., initialization and the data, since otherwise the observed change in generalization can not be merely attributed to the number of parameters.
The setting of Theorem 1 where the first layer of the network is random and the second layer is trained can not distinguish reducing density from reducing width because the parameter of the second layer is a vector.
Therefore we instead consider a three-layer linear network where the first layer is the same as in Theorem 1 whose output yields random features, the second layer is randomly masked and trained, and the last layer is also random.
Formally, the function represented by the network is f ( x ) =
(( V ⊙ M ) W x ) ⊤ µ .
The first layer parameter W and input data X are the same as in Theorem 1.
V ∈ R q × p is the second-layer parameters and M ∈ { 0 , 1 } q × p is the mask applied to V , whose entries are independently drawn from Bernoulli ( α ) where α ∈ [0 , 1] is the density.
µ ∈ R q is the last-layer parameter whose entries are independently drawn from N (0 , 1 /q )
(we set the variance to 1 /q , so that q does not appear in the final expressions and we can plot the risk against only α and γ in a 2-D plane.
We study other variants, e.g, set it to 1 /d and let q = p in Appendix
A.6).
We show that, the above setting, in terms of the risk and its decomposition, is equivalent to replacing the λ 0 in Theorem 1 with λ 0 /α .
See the proof in Appendix A.4.
[Figure]
[Figure] [Figure]
γ 0.
[Figure]
γ
[Figure]
[Figure]
[Figure] [Figure] [Figure]
[Figure]
[Figure]
10 − 1010 1 p/d 0.
R i s k α=1 α=0.
[Figure]
α
[Figure] [Figure]
α
[Figure] [Figure]
Theorem 2.
For a 3-layer linear network with p first-layer hidden neurons and both the first and last layers random, consider learning the second layer by ridge regression with random masks drawn from Bernoulli ( α ) .
Let λ , n and σ be the ridge regression parameter, number of training examples and noise level, respectively.
Let λ = nd λ 0 and σ 2 = nd κ for some fixed λ 0 and κ .
The asymptotic expressions (where n, d, p → ∞ with nd = ∞ and pd = γ ) of Risk , Bias 2 , Variance clean and Variance noise are given by their counterparts in Theorem 1 with λ 0 substituted with λ 0 /α .
We plot the risk and variance given by Theorem 2 in Figure 4.
We set λ 0 to 0 .
Plots of variance under κ =
( Variance clean ), bias, decomposition of variance are in Appendix A.5.
Under zero noise, the risk monotonically decreases along both axes.
In contrast, when κ is large, both the risk and variance increase along both axes when width and density are large.
In Figure 4d we further show that tuning both width and density can achieve better generalization than only tuning width.
Therefore, when looking for an optimal model capacity, it is necessary to consider the effect of density.
We note that our theorem also subsumes the phenomenon empirically observed by Golubeva et al.
(2020) that increasing width while keeping the number of parameters fixed improves generalization, although this is not the main focus of this paper.
And sufficiently large noise can change this picture (see risk curve with fixed αγ in Appendix A.7).
E XPERIMENTS ON N EURAL N ETWORKS — W HEN L ARGER M ODELS G ENERALIZE W ORSE ON N OISY - LABELED D ATA
The main purpose of this section is to provide empirical evidence for our theoretical analysis.
We show that the final ascent in test loss can be observed across datasets, model architectures and noise types.
In Section 4.2.1, we also demonstrate that the second ascent in variance (analyzed in section 3.1 for linear models) occurs for neural networks, providing insights to understand the observed generalization behavior through bias-variance trade-off.
4. E XPERIMENTAL S ETUP
Noise Type.
Our theoretical example (Section 3) is a regression problem where label noise follows a Gaussian distribution.
The experiments below are for classification tasks since it is the most commonly considered task for neural networks and also empirically studied for confirming the double descent phenomenon Belkin et al.
; Yang et al.
; Nakkiran et al.
We consider three different noise types.
On MNIST, CIFAR-10 and CIFAR-100, if not stated otherwise, the noise type is random label flipping (also called symmetric noise).
In addition, we consider asymmetric noise on CIFAR-10 and CIFAR-100 where wrong labels are generated in a class-dependent way to mimic real-world noise.
Images in Red Stanford Car are crawled from the web and therefore have real-world web noise.
MNIST and CIFAR-10 with symmetric noise.
We train two-layer ReLU networks on MNIST
LeCun (1998) and ResNet34 (He et al., 2016) on CIFAR-10 (Krizhevsky et al., 2009).
The width of the two-layer network is controlled by the number of hidden neurons.
And the width of ResNet is
T e s t L o ss monotonic 0.
double descent 0.
10 1 10 2 10 3 10 4 Width 0.
T e s t L o ss last ascent 0.
10 1 10 2 10 3 10 4 Width 0.
last ascent 0.
[Figure]
1010 2 Width 0.
T e s t L o ss 0.2 0.3 0.
(b) CIFAR-10, 10K, Sym.
T e s t L o ss
CIFAR10 (50000) 0.
1010 2 Width 0.
T e s t L o ss
CIFAR100 (10000) 0.
(c) CIFAR-10/100, Asym. controlled by the number of convolutional layer filters: for width w , there are w , 2 w , 4 w , 8 w filters in each layer of the four Residual Blocks, respectively.
Measuring bias and variance: To empirically verify Theorem 1 which says label noise can lead to a second ascent in the variance, we measure the variance using the unbiased estimator proposed in Yang et al.
(2020): we randomly split the training set for each model into N subsets ( N = 20 for MNIST and N = 5 for CIFAR-10), train a copy of the model for each subset and compute the variance of the network output across the subsets.
In both settings we use MSE loss because the bias-variance decomposition is only well-defined for MSE (see
Eq. 1).
(Yang et al., 2020) also proposed an estimator for Cross Entropy loss, but it is biased and therefore may skew the results.
Details of training hyperparameters are in Appendix B.
CIFAR10/100 with asymmetic noise.
We also perform experiments on CIFAR-10 and CIFARwith 40% asymmetric noise.
Details of noise generalization can be found in Appendix B.1.
We use
Cross Entropy loss.
Red Stanford Car.
We train InceptionResNet-v2 (Szegedy et al., 2017) on Red Stanford Cars (Jiang et al., 2020) that contains controlled real-world web noise.
We consider noise levels 30% and 70%.
The details of the dataset are in Appendix B.1 and the training setup is in Appendix B.2.
Due to the intricate nature of the model architecture, we only vary the density of this model.
For each density, we repeat the experiment 4 times and take the average of the performance.
4. L ARGER W IDTH H URTS G ENERALIZATION
We first train models of increasing width under various levels of label noise.
Results are presented in Figure 5.
Under small label noise, the test loss is either monotonically decreasing (0% noise in 5a) or double descent (60% noise in 5a, 20% and 40% noise in 5b).
When the noise level is sufficiently large, there is eventually a width beyond which the test loss increases.
For MNIST with 80% and 95% label noise (Figure 5a), and CIFAR-10 with 60% and 80% noise (Figure 5b), the final ascent occurs and the loss curve is a double U-shape, with the globally optimal width in the under parameterized regime, i.e., the bottom of the first U-shape.
Figure 5c shows the final ascent under asymmetric noise.
We note that the noise threshold where the final ascent happens can depend on both dataset and noise type.
Plots of the test accuracy can be found in appendix C.1.
4.2. T HE S ECOND A SCENT IN V ARIANCE
Our next experiment shows that the behavior shown in Figure 5 can be explained through biasvariance decomposition, as is in our theoretical example.
In Section 3.1, we attributed the final ascent in test loss to the second ascent in total variance for random feature regression.
Here, the same applies to neural networks trained on MNIST (Figures 1 bottom row) and CIFAR-10 (Figure 2).
The shape of the variance curve is exactly as predicted by our theorem (Figure 1 top row).
Plots of the bias curve can be found in appendix C.1.
[Figure]
[Figure] [Figure]
L o ss
[Figure] [Figure]
[Figure] [Figure]
T e s t L o ss
T e s t
A cc u r a c y
Loss
[Figure]
0.0 0.2 0.4 0.6 0.8 1.0 Density 4.
T e s t L o ss
T e s t
A cc u r a c y
Loss 7.5 10.
Accuracy
[Figure]
Car
[Figure] [Figure]
4. S MALLER D ENSITY H ELPS G ENERALIZATION
Next we vary the model density.
At initialization, we randomly select a certain fraction of weights and keep them zero throughout the training.
Figure 6 shows how the performance changes with density under different noise levels.
Under small label noise, test loss decreases when density increases.
Under larger label noise, the test loss is U-shaped.
Notably, for InceptionResNet-v2 (Figure 6d), there is no straightforward way to reduce the width, however reducing density allows us to further control the capacity and achieve better generalization.
Smaller density vs. stronger regularization.
One may notice that Theorem 2 implies reducing density is equivalent to increasing the strength of l 2 regularization by the inverse factor.
Such equivalence may not hold for neural networks considering the non-linearity and the non-convexity.
Interestingly, our experiment shows that reducing density can achieve a better generalization than increasing l 2 regularization.
We defer the plots and discussion to Appendix C.3.
4.3. J OINT E FFECT OF D ENSITY AND W IDTH
We conduct further experiments on MNIST and CIFAR-10 with 80% label noise and vary both width and density.
Comparing Figure 7 with Figures 4b and 4c confirms that empirical results align well with our theory.
Figures 7b and 7d show the variance of the test loss.
In both figures there is an increasing trend towards the top-right corner, though for CIFAR-10 the behavior is non-monotonic and more complicated.
Figures 7a and 7c demonstrate the test loss with the annotated number in red showing which model achieves the lowest test loss.
As we can see, there is an increasing trend in the loss towards the top-right corner.
Notably, in both settings the lowest loss is achieved by models with small densities.
This happens for two reasons: (1) reducing density is a more fine-grained capacity control; (2) as suggested by our theoretical example (Figure 4d), models of optimal width under smaller density has better generalization.
Plots for the test accuracy and monotonically decreasing (along both axes) bias are in Figure 17 Appendix C.2.
[Figure]
L
[Figure]
ss
[Figure] [Figure]
[Figure]
[Figure] [Figure]
T e s t
L
[Figure]
ss
[Figure] [Figure]
[Figure]
OF S AMPLE S IZE ON G ENERALIZATION
In Theorem 1, the scale of Variance noise is controlled by the noise-to-sample-size ratio instead of noise itself.
This implies that increasing sample size alleviates the effect of noise.
In this section, we explore whether the same applies to neural networks.
We fix the noise ratio and vary the number of training examples.
The experiment on MNIST is in the same setting as in Section 4 and we set noise level to 80% .
For CIFAR-10 and CIFAR-100 we use Cross Entropy loss and the experimental details can be found in B.3.
We consider 60% symmetric noise.
We plot the test loss curve in Figure 8.
On MNIST and CIFAR-10, the final ascent is less pronounced and eventually removed as we increase the sample size.
However, on CIFAR-100 the final ascent still occurs even on the full dataset (although the test accuracy shows a different pattern (see Appendix C.4).
We suspect it is because
CIFAR-100 has fewer examples (and thus larger fraction of wrong labels) per class, which leads the shape of the curve to be affected more drastically by noise.
Discussion.
Nakkiran et al.
(2021) empirically observed that increasing sample size shrinks the area under the double descent curve and shifts the curve to the right.
This suggests the possibility that in our case the final ascent is only shifted, i.e., it still occurs but at a size larger than the largest width in
Figure 8, rather than being eliminated.
Although it is impossible to exclude such possibility through experiments, we note that, this possibility is not supported by our theorem that implies sufficiently large sample size should completely remove the final ascent.
W HEN R OBUST A LGORITHMS ARE A PPLIED
The above experiments are all conducted with standard training procedures.
In practice, robust learning methods are usually applied to achieve satisfactory test performance when the noise level is high.
One may expect the final ascent to be mitigated in this case, since robust methods are specially designed to encounter the effect of label noise.
However, perhaps surprisingly, we find that robust methods only make the final ascent more pronounced.
We experiment with two SOTA algorithms,
ELR Liu et al.
and DivideMix Li et al.
We train ResNet34 on full CIFAR-10 and
CIFAR-100 with the same training setup as reported in the original papers (Liu et al., 2020; Li et al., 2020) (see details in Appendix B.4) and plot the test performance in Figure 9.
When the models are tained on CIFAR-10/100 with ELR, the final ascent occurs under only 40% noise.
In Figure
9a we also see that asymmetric noise exacerbates the phenomenon.
When models are trained with
DivideMix, the final ascent occurs under 60% symmetric noise on CIFAR-100 (Figure 9c) but does not occur on CIFAR-10 as is also the case with standard training procedure.
Experiments for more noise levels are shown in Appendix C.5.
The density experiments are also in Appendix C.5, which includes training InceptionResNet-v2 with ELR on Red Stanford Car.
A C LOSER L OOK INTO THE C OMPLEXITY OF LEARNED FUNCTIONS
[Figure]
A hypothesis for double descent made by Belkin et al.
(2019) is: the learning algorithm happens to have the right inductive bias towards the ‘low complexity’ function which generalizes better while fitting the training set.
A larger model size, i.e., a richer function class, provides more choices for the algorithm thus letting it find a function with lower complexity.
Given our finding that large noise flips the correlation between model size and generalization, it is natural to ask ‘does large noise also flip the correlation between model size and the complexity of learned functions?’.
In this section, we provide empirical evidence suggesting that the answer is yes.
Recently,
Kalimeris et al.
(2019) qualitatively measured complexity of neural networks based on how much their prediction can be explained by a smaller model.
This can be problematic in our case since it already takes ‘smaller models have lower complexity’ as a premise.
We instead make use of the result in (Loukas et al., 2021), which shows bias parameter of the first layer of a neural network travels longer during training when it is fitting a more complex function (a function with larger Lipschitz constant on the data).
We use the same setting as in Section 6 of Loukas et al.
(2021) to get tight estimates for complexity: we train a CNN with one identify layer plus 2 convolutional layers on CIFAR-10, DOG vs AIRPLANE classes.
The per epoch bias trajectory length of models at different widths is plotted in Figure 10.
The result shows that wider models have shorter trajectory length on clean dataset.
Thus, a larger size implies lower complexity of the learned function.
In contrast, with 40% label noise, larger models have longer trajectory thus learning functions of higher complexity.
We refer the readers to Appendix D for more experimental results including: measuring variance of the first layer bias (which is also correlated with complexity Loukas et al.
and spectral norm (known as an upper bound for the Lipschitz constant (Szegedy et al., 2013)) and the above measures at different densities.
C ONCLUSION
Our work provides new insights into the overfitting and generalization of neural networks by showing a counter example for the recently observed generalization benefits of increasing model size.
We considered two ways of varying model size: changing width and randomly dropping a fraction of trainable parameters.
We made two key observations: (1) when noise is sufficiently large, generalization gets worse if we increase the model size beyond some point, leading to the final ascent; (2) sufficiently large sample size can alleviate or even eliminate the final ascent.
We provided theoretical evidence from random feature regression and explain such phenomenon through the lens of bias-variance decomposition.
We also performed extensive experiments verifying that the above holds for neural networks.
Additionally, training models with SOTA robust methods, namely ELR and DivideMix, does not mitigate the final ascent but even exacerbates it in some settings.
We also provided empirical evidence which suggests the originally positive correlation between size and complexity of learned functions can be flipped by label noise.
While our analysis in this paper is limited to label noise, it would be valuable to investigate whether same conclusion holds for input feature noise.
A T HEORETICAL R ESULTS
Notations: We use bold-faced letter for matrix and vectors.
The training dataset is denoted by ( X , y )
where X =
[ x 1 , x 2 , . . .
, x n ] and y =
[ y 1 , y 2 , . . .
, y n ] ⊤ , with x i ∈ R d and y i ∈ R are feature vector and label point data point i .
We assume each x i is independently drawn from a Gaussian distribution
N (0 , I d /d ) and labels are generated by y i =
x ⊤ i θ + ϵ i where θ ∈ R d with entries independently drawn from N (0 , 1) and ϵ i ∈
R is the label noise drawn from N (0 , σ 2 ) for each x i .
And we assume each test example ( x , y ) is clean,
i.e., y = x ⊤ θ .
A. B IAS -V ARIANCE D ECOMPOSITION OF THE MSE L OSS IN S ECTION
Here we show the derivation of Equation 1.
[Equation]
A. E XPRESSIONS OF B IAS AND V ARIANCE _ CLEAN
Yang et al.
(2020) analyzed the bias-variance decomposition without considering label noise.
Hence the variance in their analysis corresponds to Variance clean in ours.
We show their expressions below, based on which we plot the dashed line in Figure 1 ( Variance clean ) and dashed gray in Figure( Bias 2 ).
[Equation]
where
[Equation]
λ 0 , γ )
[Equation]
Φ 2 ( λ 0 , γ ) − λ 0 − γ + 1 .
A. P ROOF OF T HEOREM
Lemma 3.
Define ˜ B = W ⊤ ( W W ⊤ + λ 0 III ) − 1 W .
∥
˜ B ˜ B ⊤ − nd AA ⊤ ∥ 2 = 0 almost surely, i.e.,
P ( ∥ ˜ B ˜ B ⊤ − nd AA ⊤ ∥ 2 ≤ ϵ ) ≥ 1 − δ where ϵ and δ both tend to 0 under the asymptotics n → ∞ , d → ∞ and n/d → ∞ .
Proof.
Define
[Equation]
Then we have
[Equation]
By triangle inequality and the sub-multiplicative property of spectral norm we have
[Equation]
It remains to show that with the asymptotic assumption n/d → ∞ , ∥ Ω ∥ 2 = 0 and ∥
∆ ∥ 2 = 0 almost surely, and ∥ W ∥ 2 and ∥ Ψ ∥ can be bounded from above Yang et al.
[Equation]
Therefore we have ∥ ˜ B ˜ B ⊤ − nd AA ⊤ ∥ 2 = 0 almost surely.
Corollary 4.
σ 2 d ∥ A ∥ 2 F = κd ∥ ˜ B ∥ 2 F almost surely.
Proof.
By lemma 3 we have
[Equation]
which yields 1 d ∥ A ∥ 2 F = 1 n ∥ ˜ B ∥ 2 F and thus σ 2 d ∥ A ∥ 2 F = κd ∥ ˜ B ∥ 2 F .
Now it only remains to compute 1 d ∥ ˜ B
∥ 2 F .
By Sherman–Morrison formula,
[Equation]
where α = λ − 1 0 , Q = ( d/p ) W ⊤ W and η = d/p = 1 /γ .
Let F Q be the empirical spectral distribution of Q , i.e.,
[Equation]
where # S denotes the cardinality of the set S and λ j denotes the j -th eigenvalue of Q .
Then
[Equation]
By Marchenko-Pastur Law Bai & Silverstein (2010)
[Equation]
Combining equation 2 and corollary 4 and substituting α = λ − 1 0 , η = γ − 1 into the result completes the proof.
A. P ROOF OF T HEOREM
Define the following shorthand
[Equation]
The parameter of the second layer is given by ridge regression:
[Equation]
Solving the above yields
[Equation]
Given a clean test example ( x , y ) , the expression of the risk is
[Equation]
Observe that the diagonal matrix Σ , whose diagonal entries (cid:80) qi =1 µ 2 i M i,j = 1 q
[Equation]
qi =1 ( √ qµ
[Equation]
2 M i,j converge in probability to α as q → ∞ , captures all the effects of µ and M on the risk.
Thus we can replace Σ with α I p
[Equation]
It remains to show that the expression of the risk is exactly the same as the risk in the setting of Section 3.1 with λ replaced by λ/α .
Write down the risk in Section 3.1 (for convenience denote it by Risk 0 ):
[Equation]
Equation 4 is obtained by applying Woodbury matrix identity to ( F F ⊤ + λ I ) − 1 .
It is easy to check that replacing λ in RHS of equation 4 with λ/α yields the same as RHS of equation 3.
[Figure]
[Figure]
α 0.05 0.
γ 0.
(c) Variance ( κ = 0 ) 0.010.020.030.040.
α 0.05 0.
γ 0.
(d) Variance ( κ = 0 . 64 )
A. B IAS 2 AND V ARIANCE NOISE /κ IN S ECTION 3.
In Figure 11 we plot the expressions of Bias 2 and Variance noise /κ based on Theorem 2.
Biasmonotonically decreases along both axes and Variance noise /κ
monotonically increases along both axes.
Variance clean variance is unimodal along y-axis (width), manifests more complicated behavior along x-axis (density), and decreases along both axes once width is sufficiently large, and thus it differs from the variance in classical bias-variance tradeoff.
A. V ARIANTS OF T HEOREM
In Theorem 2 we let µ ’s entries be drawn from N (0 , 1 /q ) so that q does not appear in the expression of the risk.
Alternatively we can let µ ’s entries be drawn from N (0 , 1 /d ) and assume q/d = τ .
Then the risk and its decomposition are dependent on γ, τ, α .
Similar to the proof in A.4, we can show that in this case one just need to replace λ 0 in the setting of Theorem 1 with λ 0 / ( τα ) to get the expressions of risk.
We further let τ = γ and plot the result in Figures 12 and 13.
A. C ONNECTION TO THE OBSERVATION MADE BY G OLUBEVA ET AL . (2020)
Our Theorem 2 confirms the observation in Golubeva et al.
that increasing width while keeping the number of parameters fixed (via reducing density) benefits generalization.
This disentangles the benefit of increasing width from the effect of enlarging model capacity.
In our setting, the expected number of parameters is in proportion to γα .
We fix γα and plot the risk curve with varied γ ( s.t.α ≤ 1 ) in Figure 14.
When κ = 0 the test loss decreases with width.
However, large noise here can still change the shape of the curve.
When κ = 0 .
64 , the test loss is either U-shaped or increasing.
B D ETAILS OF E XPERIMENTAL S ETTING
All experiments are implemented using PyTorch.
We use eight Nvidia A40 to run the experiments.
[Figure] [Figure]
1010 2 p/d 0.
γα=10.
B. N OISE T YPES
Symmetric noise Symmetric noise is generated by randomly assigning labels to a certain fraction of examples.
Asymmetric noise Asymmetric noise is class-dependent.
We follow the scheme proposed in Patrini et al.
(2017) which is also widely used in robust method papers (e.g., ELR Liu et al.
(2020) and
DivideMix Li et al.
For CIFAR-10, labels are randomly flipped according to the following map:
[Equation]
For CIFAR-100, since the 100 classes are grouped into 20 superclasses, e.g. AQUATIC MAMMALS contains BEAVER, DOLPHIN, OTTER, SEAL and WHALE, we flip labels of each class into the next one circularly within super-classes.
For both datasets, the fraction of mislabeled examples in the training set is the noise level.
Web Noise Red Stanford Car Jiang et al.
(2020) contains images crawled from web.
There are 10 different noise levels {0%, 5% 10%, 15%, 20%, 30%, 40%, 60%, 80%} for this dataset
and we choose 40% and 80%.
For each noise level, the mislabeled web images can only be downloaded from the provided URLs.
The training splits and labels are in provided files 1 .
The original dataset size is 8144.
For 80% noise, there are 6469 web images.
However, 590 of the URL links are not functional and among the downloaded JPG files 1871 are corrupted/unopenable, hence we end up with 1675 clean examples and 4008 noisy examples, i.e., the actual noise level is 70.53%.
For 40% noise, there are 3241 web images with 313 non-downloadable and 963 not unopenable.
Therefore the actual noise level is 29.03%.
B. B ASIC E XPERIMENTS
MNIST and CIFAR-10 with symmetric noise On MNIST, we train a two-layer ReLU network for 200 epochs using SGD with batch size 64, momentum 0.9, initial learning rate 0.1, a weight decay of 5 × 10 − 4 , a learning rate decay of 0.1 every 50 epochs.
On CIFAR-10 We train ResNet34 forepochs using SGD with batch size 128, momentum 0.9, initial learning rate 0.1, weight decay of 5 × 10 − 4 , learning rate decay of 0.1 every 400 epochs.
For width w , there are w , 2 w , 4 w , 8 w filters in each layer of the four Residual Blocks, respectively.
We use MSE loss in both settings.
CIFAR-10/100 with asymmetric noise On CIFAR-10, we train ResNet34 for 500 epochs using SGD with batch size 128, momentum 0.9, initial learning rate 0.1, weight decay of 5 × 10 − 4 , learning rate decay of 0.1 every 100 epochs. On CIFAR-100, we train ResNet34 for 1000 epochs using SGD with batch size 128, momentum 0.9, initial learning rate 0.1, weight decay of 5 × 10 − 4 , learning rate decay of 0.1 every 200 epochs.
We use Cross Entropy loss in both settings.
Red Stanford Car On Red Stanford CarJiang et al.
(2020) with 80% noise.
We train InceptionResNetv2Szegedy et al.
(2017) for 160 epochs with an initial learning rate of 0.1, and a weight decay of 1 × 10 − 5 using SGD and momentum of 0.9 with a batch size of 32.
We anneal the learning rate by a factor of 10 at epochs 80 and 120, respectively.
We use Cross Entropy loss.
B. V ARYING SAMPLE SIZE
MNIST
The setup is the same as in B.2.
CIFAR-10/
On both datasets the noise level is 60%.
On CIFAR-10, we train ResNet34 forepochs using SGD with momentum 0.9, initial learning rate 0.1, weight decay of 5 × 10 − 4 , learning rate decay of 0.1 every 100 epochs.
The batch size is 128 for sample size 50000, 64 for sample size 25000, 10000, 5000, and 32 for sample size 2500.
We set batch size this way to make sure the model can converge and the largest few models can fit each of the training set (e.g., when trained with batch size 128 on 2500 examples even the largest model does not fit the training set; when trained with batch size 64 on 50000 examples the model converges too slowly).
On CIFAR-100, we train
ResNet34 for 500 epochs using SGD with momentum 0.9, initial learning rate 0.1, weight decay of 5 × 10 − 4 , learning rate decay of 0.1 every 100 epochs.
B. E XPERIMENTS WITH R OBUST M ETHODS
ELR leverages the early learning phenomenon where the network fits clean examples first and then mislabeled examples.
It hinders learning wrong labels by regularizing the loss with a term that encourages the alignment between the model’s prediction and the running average of the predictions in previous rounds.
DivideMix dynamically discards labels that are highly likely to be noisy and trains the model in a semi-supervised manner.
For both ELR and DivideMix we use the same setup in the original papers.
Liu et al.
; Li et al.
ELR We train ResNet-34 using SGD with momentum 0.9, a weight decay of 0.001, and a batch size of 128.
The network is trained for 120 epochs on CIFAR-10 and 150 epochs on CIFAR-100.
The learning rate is 0.02 at initialization, and decayed by a factor of 100 at epochs 40 and 80 for CIFARand at epochs 80 and 120 for CIFAR-100.
We use 0 .
7 for the temporal ensembling parameter, andfor the ELR regularization coefficient.
DivideMix We train ResNet-34 for 200 epochs using SGD with batch size 64 , momentum 0 .
9 , initial learning rate 0 .
02 , a weight decay of 5 × 10 − 4 , and a learning rate decay of 0 .
1 at epoch 150.
We use 150 for the unsupervised loss weight.
C A DDITIONAL P LOTS FOR S ECTIONS 4 TOC. B ASIC EXPERIMENTS : VARYING WIDTH
Bias 2 and test accuracy on MNIST and CIFAR-10 are shown in Figure 15.
Test accuracy on CIFAR10/100 with asymmetric noise is shown in Figures 16a and 16b. We also plot test loss and test accuracy of models trained on CIFAR-10 with 30% asymmetric noise in Figures 16c and 16d. Here
[Figure]
B
[Figure] [Figure]
[-Density 8192 40961024 512128 
-][Figure]
[Figure] [Figure]
e
[Figure]
[Figure]
T e s t
A cc u r a c y
[Figure]
[Figure]
we can still observe a slight ascent from width 128 to 256.
As expected, the final ascent in this setting is less pronounced than under 40% noise (Figure 5c).
C. B ASIC EXPERIMENTS : JOINT EFFECT OF WIDTH AND DENSITY
We plot test accuracy and bias in Figure 17.
The bias decreases when density and width increase.
In both settings, the optimal accuracy is achieved by models with smallest density.
C. S MALLER DENSITY VS . STRONGER l 2 REGULARIZATION
In Theorem [Figure] we show that reducing density is equivalent to increasing the strength of l 2 regularization.
To see whether this applies to more complex settings
[Figure]
we train ResNet34 at width 16 on
CIFAR-10 with 50% symmetric noise.
We vary weight decay and network density.
Results are shown in Figure 18.
Both loss curves are U-shaped, but reducing density can achieve a lower loss/higher accuracy than increasing l 2 regularization.
The non-equivalence itself is not unexpected given the non-linearity in neural networks and how dropping a large amount of connection can significantly change the training dynamics of SGD.
However, it would be interesting to investigate why reducing density is better and whether it is the same case in other settings.
C. V ARYING SAMPLE SIZE
We plot test accuracy with varied sample size in Figure 19.
1.0 inverse of wd scale or density 0.
T e s t
L o ss wd density 0.
1.0 inverse of wd scale or density T e s t A cc u r a c y ( % ) [Figure]
[Figure]
[Figure]
u
[Figure]
[Figure]
T e s t
L o ss     30 T e s t
A cc u r a c y ( % )
[Figure]
M ORE RESULTS FOR MODELS TRAINED WITH ROBUST METHODS
In addition to the experiments presented in the main paper, we vary width of models trained with
ELR under 80% noise and vary density
We show the results of the following experiments on CIFAR-10/100: width experiments with ELR under 80% noise 20, density experiments with ELR 21, density experiments with DivideMix under 60% noise 22.
We also show the result of density experiments on Red Stanford Car (70% noise) where we train InceptionResNet-v2 with ELR 23.
In Figures 20 and 21, ‘best_acc’ refers to the highest test accuracy observed during training, which is usually reported in robust method papers.
D M EASURING COMPLEXITY OF LEARNED FUNCTIONS
We consider three measures:
• Trajectory length of the first layers bias.
(cid:80) t ∈ T ∥
b ( t +1)
[Equation]
where T is a set of iteration indices, b ( t ) 1 is the parameter of the first layer bias at iteration t , and ϵ f ( t ) is the gradient
[Table]
2 0.4 0.6 0.8 1.0 Density 4.
T e s t
L o ss
T e s t
A cc u r a c y ( % ) (f) C100, 80% sym, width
0.2 0.4 0.6 0.8 1.0 Density 1.
T e s t L o ss test loss 72.4 72.
73.6 T e s t
A cc u r a c y ( % ) acc
1.0 Density 6.
T e s t L o ss
T e s t
A cc u r a c y Loss
Accuracy of the loss w.r.t. the network’s output at epoch t . Loukas et al. (2021) shows that, under certain conditions, the above can be both upper and lower bounded in terms of the Lipschitz constants of functions represented by the network at iterations in T (see their Theorem 1).
This implies that the first layer bias travels longer during training when it is fitting a more complex function.
• Variance of the first layer bias avg t ∈ T ∥
b ( t ) 1 − avg t ∈ T b ( t ) 1 ∥ 22 .
Loukas et al.
(2021) also provides a lower bound for the above in terms of the Lipschitz constant and ϵ f ( t ) ( their Corollary
Thus a larger Lipschitz constant leads to a higher lower bound, meaning that when fitting a lower complexity function, the network’s bias will update more frequently during training.
• Product of spectral norms of the layer parameters.
This is known as an upper bound for the network’s Lipschitz constant Szegedy et al.
For convolutional layers, the spectral norm is computed using the FFT-based algorithm in Sedghi et al.
Our setting the same as in Loukas et al.
(Task 2 in Section 6).
We train a CNN on CIFARDOG vs AIRPLANE.
The CNN has one identify layer, 2 convolutional layers with kernel size 5, a [Figure] [Figure] fully connected ReLu layer with size 384 and a linear layer.
The width is controlled by the number of convolutional channels.
For width w there are 16 w channels in each convolutional layer.
We use BCE loss and train the models for 200 epochs using vanilla SGD with batch size 1.
We use exponential learning rate decay with a factor 10 − 50 .
The trajectory length and variance are computed every epoch, i.e., we let T be the iterations of each SGD epoch.
Thus they capture the complexity of the function represented by the CNN at every epoch.
The results are shown in Figure 24.
We see that noise does change the relative complexity of functions learned by models at increasing width/density.
The pattern is more clear for width (Figures 24a and 24c) where both quantities decrease under 0% noise, and increase under 40% noise, when width increases.
In Figure 25 we plot the product of layer-wise spectral norms of the neural network at the last epoch and it shows a similar pattern.
These results suggest that the originally negative correlation between size and complexity/smoothness can be flipped by label noise.
E P OTENTIAL C ONNECTION TO B ENIGN OVERFITTING
Benign overfitting refers to the phenomenon where models trained to overfit the training set still achieve nearly optimal generalization performance Bartlett et al.
; Tsigler & Bartlett (2020);
Chatterji et al.
; Cao et al.
Frei et al.
; Mallinar et al.
Recently Cao et al.
(2022) shows that sufficiently large models overfit benignly if the product between sample size and signal-to-noise ratio (SNR) is large, and catastrophically otherwise.
Interestingly, this is the same condition for the final ascent to not occur in our theoretical setting (Section 3, the SNR in our setting is 1 /σ 2 ).
Therefore one can explain our result from the perspective of benign overfitting: when the condition is satisfied, a sufficiently large model overfits benignly, and therefore increasing model size toward sufficiently large can possibly help generalization.
That said, our result has broader implications because it (1) compares models at arbitrary size that may not be sufficiently large and (2) does not restrict to the benign overfitting regime.
Indeed, neural networks along with many other real interpolating methods are in the tempered overfitting regime Mallinar et al.
Our result suggests that the condition for benign overfitting identified in Cao et al.
(2022) can be possibly extended to judge the relative benignity of tempered overfitting at different model sizes.
We see theoretically establishing the above as an important direction of future work.
20 40 60 80 100 Width 0.
{+R i s k σ =  20 
+}
60 80 100 Width 0.
R i s k σ =0.
{+20 40 60 80 100 Width
+}
R i s k σ =0.
{+20 40 60 80 100 Width
+}
R i s k σ=
F N ON - ASYMPTOTIC RESULTS FROM PREVIOUS WORK
We clarify here that Theorem 1 cannot be obtained from taking the limit of previous work.
The setting in our paper differs from previous ones that aim at deriving non-asymptotic results.
We chose this setting as it allows incorporating the three important sources of randomness, namely training data, label noise, and random features that mimics the randomness in initialization and optimization (as opposed to e.g. models with fixed design or without random feature), and allows deriving interpretable closed form results (as opposed to non-linear feature or n/d=const limit).
We are not aware of any non-asymptotic result that gives explicit expression of the bias-variance tradeoff, as we derived in this setting.
We give a few examples that the final ascent has not been reflected in previous theoretical models on double descent: Belkin et al.
(2020): Corollary 2.2 (Gaussian model with random selected features) doesn’t capture the final ascent since the noise dependent term always decreases with the width.
The ‘prescient’ selection model (their Fig 2) has an ascent in the end, however, as we plotted in Figure 26, (1) the ascent exists even without noise, thus the result doesn’t show the double descent phenomenon in the first place, and (2) the ascent diminishes as we increase noise, and therefore shows an effect opposite to our empirical observation.
The Fourier series model in their Theorem 3.1 used to show double descent is for noise free setting.
Hastie et al.
(2019): Among the models they considered, only the minimum-norm least squares with isotropic features can manifest a U-shaped curve in the overparameterization regime (their Fig 1).
However, the effect of noise here is exactly the opposite of what we observed.
As is described in their Sec 3.2, in the overparameterization regime, the loss monotonically decreases when SNR<1 (noise is large) and has a local minimum when SNR>=1 (noise is small).