Understanding user comments via natural language processing with TensorFlow and Scikit-Learn
We show that a variety of modern deep learning tasks exhibit a "double-descent" phenomenon where, as we increase model size, performance first gets worse and then gets better. Moreover, we show that double descent occurs not just as a function of model size, but also as a function of the number of training epochs. We unify the above phenomena by defining a new complexity measure we call the effective model complexity and conjecture a generalized double descent with respect to this measure. Furthermore, our notion of model complexity allows us to identify certain regimes where increasing (even quadrupling) the number of train samples actually hurts test performance.READ FULL TEXT VIEW PDF
The double descent curve is one of the most intriguing properties of dee...
Neural networks appear to have mysterious generalization properties when...
Empirically it has been observed that the performance of deep neural net...
Over-parameterized models, in particular deep networks, often exhibit a
The appearance of the double-descent risk phenomenon has received growin...
Deep networks are typically trained with many more parameters than the s...
Extensive empirical evidence reveals that, for a wide range of different...
Understanding user comments via natural language processing with TensorFlow and Scikit-Learn
This project is best on the homonymous paper
We investigate double descent more deeply and try to precisely characterize the phenomenon under different settings. Specifically, we focus on the impact of label noise and regularization on double descent. None of the existing works consider these aspects in detail and we hypothesize that these play an integral role in double descent.
The bias-variance trade-off
is a fundamental concept in classical statistical learning theory (e.g.,hastie2005elements
). The idea is that models of higher complexity have lower bias but higher variance. According to this theory, once model complexity passes a certain threshold, models “overfit” with the variance term dominating the test error, and hence from this point onward, increasing model complexity will onlydecrease performance (i.e., increase test error). Hence conventional wisdom in classical statistics is that, once we pass a certain threshold, “larger models are worse.”
However, modern neural networks exhibit no such phenomenon. Such networks have millions of parameters, more than enough to fit even random labels (ZhangBHRV16), and yet they perform much better on many tasks than smaller models. Indeed, conventional wisdom among practitioners is that “larger models are better’’ (krizhevsky2012imagenet, gpipe, Inception, gpt). The effect of training time on test performance is also up for debate. In some settings, “early stopping” improves test performance, while in other settings training neural networks to zero training error only improves performance. Finally, if there is one thing both classical statisticians and deep learning practitioners agree on is “more data is always better”.
In this paper, we present empirical evidence that both reconcile and challenge some of the above “conventional wisdoms.” We show that many deep learning settings have two different regimes. In the under-parameterized regime, where the model complexity is small compared to the number of samples, the test error as a function of model complexity follows the U-like behavior predicted by the classical bias/variance tradeoff. However, once model complexity is sufficiently large to interpolate i.e., achieve (close to) zero training error, then increasing complexity only decreases test error, following the modern intuition of “bigger models are better”. Similar behavior was previously observed in opper1995statistical; opper2001learning, advani2017high, spigler2018jamming, and geiger2019jamming. This phenomenon was first postulated in generality by belkin2018reconciling
who named it “double descent”, and demonstrated it for decision trees, random features, and 2-layer neural networks withloss, on a variety of learning tasks including MNIST and CIFAR-10.
We show that double descent is a robust phenomenon that occurs in a variety of tasks, architectures, and optimization methods (see Figure 1 and Section 5; our experiments are summarized in Table A). Moreover, we propose a much more general notion of “double descent” that goes beyond varying the number of parameters. We define the effective model complexity (EMC)
of a training procedure as the maximum number of samples on which it can achieve close to zero training error. The EMC depends not just on the data distribution and the architecture of the classifier but also on the training procedure—and in particular increasing training time will increase the EMC.
We hypothesize that for many natural models and learning algorithms, double descent occurs as a function of the EMC. Indeed we observe “epoch-wise double descent” when we keep the model fixed and increase the training time, with performance following a classical U-like curve in the underfitting stage (when the EMC is smaller than the number of samples) and then improving with training time once the EMC is sufficiently larger than the number of samples (see Figure 2). As a corollary, early stopping only helps in the relatively narrow parameter regime of critically parameterized models.
Finally, our results shed light on test performance as a function of the number of train samples. Since the test error peaks around the point where EMC matches the number of samples (the transition from the under- to over-parameterization), increasing the number of samples has the effect of shifting this peak to the right. While in most settings increasing the number of samples decreases error, this shifting effect can sometimes result in a setting where more data is worse! For example, Figure 3 demonstrates cases in which increasing the number of samples by a factor of results in worse test performance.
To state our hypothesis more precisely, we define the notion of effective model complexity. We define a training procedure to be any procedure that takes as input a set of labeled training samples and outputs a classifier mapping data to labels. We define the effective model complexity of (w.r.t. distribution ) to be the maximum number of samples on which achieves on average training error.
[Effective Model Complexity] The Effective Model Complexity (EMC) of a training procedure , with respect to distribution and parameter , is defined as:
where is the mean error of model on train samples .
Our main hypothesis can be informally stated as follows:
For any natural data distribution , neural-network-based training procedure , and small , if we consider the task of predicting labels based on samples from then:
If is sufficiently smaller than , any perturbation of that increases its effective complexity will decrease the test error.
If is sufficiently larger than , any perturbation of that increases its effective complexity will decrease the test error.
If , then a perturbation of that increases its effective complexity might decrease or increase the test error.
Hypothesis 1 is informal in several ways. We do not have a principled way to choose the parameter
(and currently heuristically use). We also are yet to have a formal specification for “sufficiently smaller” and “sufficiently larger”. Our experiments suggest that there is a critical interval around the interpolation threshold when : below and above this interval increasing complexity helps performance, while within this interval it may hurt performance. The width of the critical interval depends on both the distribution and the training procedure in ways we do not yet completely understand.
We believe Hypothesis 1 sheds light on the interaction between optimization algorithms, model size, and test performance and helps reconcile some of the competing intuitions about them. The main result of this paper is an experimental validation of Hypothesis 1 under a variety of settings, where we considered several natural choices of datasets, architectures, and optimization algorithms, and we changed the “interpolation threshold” by varying the number of model parameters, the length of training, the amount of label noise in the distribution, and the number of train samples.
Model-wise Double Descent. In Section 5, we study the test error of models of increasing size, for a fixed large number of optimization steps. We show that “model-wise double-descent” occurs for various modern datasets (CIFAR-10, CIFAR-100, IWSLT‘14 de-en, with varying amounts of label noise), model architectures (CNNs, ResNets, Transformers), optimizers (SGD, Adam), number of train samples, and training procedures (data-augmentation, and regularization). Moreover, the peak in test error systematically occurs at the interpolation threshold. In particular, we demonstrate realistic settings in which bigger models are worse.
Epoch-wise Double Descent. In Section 6, we study the test error of a fixed, large architecture over the course of training. We demonstrate, in similar settings as above, a corresponding peak in test performance when models are trained just long enough to reach train error. The test error of a large model first decreases (at the beginning of training), then increases (around the critical regime), then decreases once more (at the end of training)—that is, training longer can correct overfitting.
Sample-wise Non-monotonicity. In Section 7, we study the test error of a fixed model and training procedure, for varying number of train samples. Consistent with our generalized double-descent hypothesis, we observe distinct test behavior in the “critical regime”, when the number of samples is near the maximum that the model can fit. This often manifests as a long plateau region, in which taking significantly more data might not help when training to completion (as is the case for CNNs on CIFAR-10). Moreover, we show settings (Transformers on IWSLT‘14 en-de), where this manifests as a peak—and for a fixed architecture and training procedure, more data actually hurts.
Remarks on Label Noise. We observe all forms of double descent most strongly in settings with label noise in the train set (as is often the case when collecting train data in the real-world). However, we also show several realistic settings with a test-error peak even without label noise: ResNets (Figure 3(a)) and CNNs (Figure 20) on CIFAR-100; Transformers on IWSLT‘14 (Figure 8). Moreover, all our experiments demonstrate distinctly different test behavior in the critical regime— often manifesting as a “plateau” in the test error in the noiseless case which develops into a peak with added label noise. See Section 8 for further discussion.
Model-wise double descent was first proposed as a general phenomenon by belkin2018reconciling. Similar behavior had been observed in opper1995statistical; opper2001learning, advani2017high, spigler2018jamming, and geiger2019jamming. Subsequently, there has been a large body of work studying the double descent phenomenon. A growing list of papers that theoretically analyze it in the tractable setting of linear least squares regression includes belkin2019two; hastie2019surprises; bartlett2019benign; muthukumar2019harmless; bibas2019new; Mitra2019UnderstandingOP; mei2019generalization. Moreover, geiger2019scaling provide preliminary results for model-wise double descent in convolutional networks trained on CIFAR-10. Our work differs from the above papers in two crucial aspects: First, we extend the idea of double-descent beyond the number of parameters to incorporate the training procedure under a unified notion of “Effective Model Complexity”, leading to novel insights like epoch-wise double descent and sample non-monotonicity. The notion that increasing train time corresponds to increasing complexity was also presented in nakkiran2019sgd. Second, we provide an extensive and rigorous demonstration of double-descent for modern practices spanning a variety of architectures, datasets optimization procedures. An extended discussion of the related work is provided in Appendix C.
We briefly describe the experimental setup here; full details are in Appendix B 111The raw data from our experiments are available at: https://gitlab.com/harvard-machine-learning/double-descent/tree/master. We consider three families of architectures: ResNets, standard CNNs, and Transformers. ResNets: We parameterize a family of ResNet18s (he2016identity) by scaling the width (number of filters) of convolutional layers. Specifically, we use layer widths for varying . The standard ResNet18 corresponds to . Standard CNNs: We consider a simple family of 5-layer CNNs, with 4 convolutional layers of widths for varying , and a fully-connected layer. For context, the CNN with width , can reach over test accuracy on CIFAR-10 with data-augmentation. Transformers: We consider the 6 layer encoder-decoder from Vaswani, as implemented by ott2019fairseq. We scale the size of the network by modifying the embedding dimension , and setting the width of the fully-connected layers proportionally (). For ResNets and CNNs, we train with cross-entropy loss, and the following optimizers: (1) Adam with learning-rate for 4K epochs; (2) SGD with learning rate for 500K gradient steps. We train Transformers for 80K gradient steps, with 10% label smoothing and no drop-out.
In our experiments, label noise of probabilityrefers to training on a samples which have the correct label with probability , and a uniformly random incorrect label otherwise (label noise is sampled only once and not per epoch). Figure 1 plots test error on the noisy distribution, while the remaining figures plot test error with respect to the clean distribution (the two curves are just linear rescaling of one another).
In this section, we study the test error of models of increasing size, when training to completion (for a fixed large number of optimization steps). We demonstrate model-wise double descent across different architectures, datasets, optimizers, and training procedures. The critical region exhibits distinctly different test behavior around the interpolation point and there is often a peak in test error that becomes more prominent in settings with label noise.
For the experiments in this section (Figures 4, 5, 7, 7, 8), notice that all modifications which increase the interpolation threshold (such as adding label noise, using data augmentation, and increasing the number of train samples) also correspondingly shift the peak in test error towards larger models. Additional plots showing the early-stopping behavior of these models, and additional experiments showing double descent in settings with no label noise (e.g. Figure 19) are in Appendix E.2. We also observed model-wise double descent for adversarial training, with a prominent robust test error peak even in settings without label noise. See Figure 26 in Appendix E.2.
Fully understanding the mechanisms behind model-wise double descent in deep neural networks remains an important open question. However, an analog of model-wise double descent occurs even for linear models. A recent stream of theoretical works analyzes this setting (bartlett2019benign; muthukumar2019harmless; belkin2019two; mei2019generalization; hastie2019surprises). We believe similar mechanisms may be at work in deep neural networks.
Informally, our intuition is that for model-sizes at the interpolation threshold, there is effectively only one model that fits the train data and this interpolating model is very sensitive to noise in the train set and/or model mis-specification. That is, since the model is just barely able to fit the train data, forcing it to fit even slightly-noisy or mis-specified labels will destroy its global structure, and result in high test error. (See Figure 28 in the Appendix for an experiment demonstrating this noise sensitivity, by showing that ensembling helps significantly in the critically-parameterized regime). However for over-parameterized models, there are many interpolating models that fit the train set, and SGD is able to find one that “memorizes” (or “absorbs”) the noise while still performing well on the distribution.
The above intuition is theoretically justified for linear models. In general, this situation manifests even without label noise for linear models (mei2019generalization), and occurs whenever there is model mis-specification between the structure of the true distribution and the model family. We believe this intuition extends to deep learning as well, and it is consistent with our experiments.
In this section, we demonstrate a novel form of double-descent with respect to training epochs, which is consistent with our unified view of effective model complexity (EMC) and the generalized double descent hypothesis. Increasing the train time increases the EMC—and thus a sufficiently large model transitions from under- to over-parameterized over the course of training.
As illustrated in Figure 9, sufficiently large models can undergo a “double descent” behavior where test error first decreases then increases near the interpolation threshold, and then decreases again. In contrast, for “medium sized” models, for which training to completion will only barely reach error, the test error as a function of training time will follow a classical U-like curve where it is better to stop early. Models that are too small to reach the approximation threshold will remain in the “under parameterized” regime where increasing train time monotonically decreases test error. Our experiments (Figure 10) show that many settings of dataset and architecture exhibit epoch-wise double descent, in the presence of label noise. Further, this phenomenon is robust across optimizer variations and learning rate schedules (see additional experiments in Appendix E.1). As in model-wise double descent, the test error peak is accentuated with label noise.
Conventional wisdom suggests that training is split into two phases: (1) In the first phase, the network learns a function with a small generalization gap (2) In the second phase, the network starts to over-fit the data leading to an increase in test error. Our experiments suggest that this is not the complete picture—in some regimes, the test error decreases again and may achieve a lower value at the end of training as compared to the first minimum (see Fig 10 for 10% label noise).
In this section, we investigate the effect of varying the number of train samples, for a fixed model and training procedure. Previously, in model-wise and epoch-wise double descent, we explored behavior in the critical regime, where , by varying the EMC. Here, we explore the critical regime by varying the number of train samples . By increasing , the same training procedure can switch from being effectively over-parameterized to effectively under-parameterized.
We show that increasing the number of samples has two different effects on the test error vs. model complexity graph. On the one hand, (as expected) increasing the number of samples shrinks the area under the curve. On the other hand, increasing the number of samples also has the effect of “shifting the curve to the right” and increasing the model complexity at which test error peaks.
These twin effects are shown in Figure 10(a). Note that there is a range of model sizes where the effects “cancel out”—and having more train samples does not help test performance when training to completion. Outside the critically-parameterized regime, for sufficiently under- or over-parameterized models, having more samples helps. This phenomenon is corroborated in Figure 12, which shows test error as a function of both model and sample size, in the same setting as Figure 10(a).
We introduce a generalized double descent hypothesis: models and training procedures exhibit atypical behavior when their Effective Model Complexity is comparable to the number of train samples. We provide extensive evidence for our hypothesis in modern deep learning settings, and show that it is robust to choices of dataset, architecture, and training procedures. In particular, we demonstrate “model-wise double descent” for modern deep networks and characterize the regime where bigger models can perform worse. We also demonstrate “epoch-wise double descent,” which, to the best of our knowledge, has not been previously proposed. Finally, we show that the double descent phenomenon can lead to a regime where training on more data leads to worse test performance. Preliminary results suggest that double descent also holds as we vary the amount of regularization for a fixed model (see Figure 22).
We also believe our characterization of the critical regime provides a useful way of thinking for practitioners—if a model and training procedure are just barely able to fit the train set, then small changes to the model or training procedure may yield unexpected behavior (e.g. making the model slightly larger or smaller, changing regularization, etc. may hurt test performance).
We note that many of the phenomena that we highlight often do not occur with optimal early-stopping. However, this is consistent with our generalized double descent hypothesis: if early stopping prevents models from reaching train error then we would not expect to see double-descent, since the EMC does not reach the number of train samples. Further, we show at least one setting where model-wise double descent can still occur even with optimal early stopping (ResNets on CIFAR-100 with no label noise, see Figure 19). We have not observed settings where more data hurts when optimal early-stopping is used. However, we are not aware of reasons which preclude this from occurring. We leave fully understanding the optimal early stopping behavior of double descent as an important open question for future work.
In our experiments, we observe double descent most strongly in settings with label noise. However, we believe this effect is not fundamentally about label noise, but rather about model mis-specification. For example, consider a setting where the label noise is not truly random, but rather pseudorandom (with respect to the family of classifiers being trained). In this setting, the performance of the Bayes optimal classifier would not change (since the pseudorandom noise is deterministic, and invertible), but we would observe an identical double descent as with truly random label noise. Thus, we view adding label noise as merely a proxy for making distributions “harder”— i.e. increasing the amount of model mis-specification.
Our notion of Effective Model Complexity is related to classical complexity notions such as Rademacher complexity, but differs in several crucial ways: (1) EMC depends on the true labels of the data distribution, and (2) EMC depends on the training procedure, not just the model architecture.
Other notions of model complexity which do not incorporate features (1) and (2) would not suffice to characterize the location of the double-descent peak. Rademacher complexity, for example, is determined by the ability of a model architecture to fit a randomly-labeled train set. But Rademacher complexity and VC dimension are both insufficient to determine the model-wise double descent peak location, since they do not depend on the distribution of labels— and our experiments show that adding label noise shifts the location of the peak.
Moreover, both Rademacher complexity and VC dimension depend only on the model family and data distribution, and not on the training procedure used to find models. Thus, they are not capable of capturing train-time double-descent effects, such as “epoch-wise” double descent, and the effect of data-augmentation on the peak location.
We thank Mikhail Belkin for extremely useful discussions in the early stages of this work. We thank Christopher Olah for suggesting the Model Size Epoch visualization, which led to the investigation of epoch-wise double descent, as well as for useful discussion and feedback. We also thank Alec Radford, Jacob Steinhardt, and Vaishaal Shankar for helpful discussion and suggestions. P.N. thanks OpenAI, the Simons Institute, and the Harvard Theory Group for a research environment that enabled this kind of work.
We thank Dimitris Kalimeris, Benjamin L. Edelman, and Sharon Qian, and Aditya Ramesh for comments on an early draft of this work.
This work supported in part by NSF grant CAREER CCF 1452961, BSF grant 2014389, NSF USICCS proposal 1540428, a Google Research award, a Facebook research award, a Simons Investigator Award, a Simons Investigator Fellowship, and NSF Awards CCF 1715187, CCF 1565264, CCF 1301976, IIS 1409097, and CNS 1618026. Y.B. would like to thank the MIT-IBM Watson AI Lab for contributing computational resources for experiments.
|CIFAR 10||CNN||SGD||✓||0||✗||✗||5, 27|
|✓||10||✓||✓||5, 27, 7|
|SGD + w.d.||✓||20||✓||✓||21|
|✓||20||✓||✓||4, 9, 10|
|Various||✓||20||–||✓||16, 17, 18|
|CIFAR 100||ResNet||Adam||✓||0||✓||✗||4, 19, 10|
|IWSLT ’14 de-en||Transformer||Adam||0||✓||✗||8, 24|
|WMT ’14 en-fr||Transformer||Adam||0||✓||✗||8, 24|
We use the following families of architectures. The PyTorchpaszke2017automatic specification of our ResNets and CNNs are available at https://gitlab.com/harvard-machine-learning/double-descent/tree/master.
We define a family of ResNet18s of increasing size as follows. We follow the Preactivation ResNet18 architecture of he2016identity
, using 4 ResNet blocks, each consisting of two BatchNorm-ReLU-Convolution layers. The layer widths for the 4 blocks arefor varying
and the strides are [1, 2, 2, 2]. The standard ResNet18 corresponds toconvolutional channels in the first layer. The scaling of model size with is shown in Figure 12(b). Our implementation is adapted from https://github.com/kuangliu/pytorch-cifar.
We consider a simple family of 5-layer CNNs, with four Conv-BatchNorm-ReLU-MaxPool layers and a fully-connected output layer. We scale the four convolutional layer widths as
. The MaxPool is [1, 2, 2, 8]. For all the convolution layers, the kernel size = 3, stride = 1 and padding=1. This architecture is based on the “backbone” architecture frommcnn. For , this CNN has 1558026 parameters and can reach test accuracy on CIFAR-10 (cifar) with data-augmentation. The scaling of model size with is shown in Figure 12(a).
We consider the encoder-decoder Transformer model from Vaswani with 6 layers and 8 attention heads per layer, as implemented by fairseq ott2019fairseq. We scale the size of the network by modifying the embedding dimension (), and scale the width of the fully-connected layers proportionally (). We train with 10% label smoothing and no drop-out, for 80 gradient steps.
We describe the details of training for CNNs and ResNets below.
Loss function: Unless stated otherwise, we use the cross-entropy loss for all the experiments.
Data-augmentation: In experiments where data-augmentation was used, we apply RandomCrop(32, padding=4) and RandomHorizontalFlip. In experiments with added label noise, the label for all augmentations of a given training sample are given the same label.
Regularization: No explicit regularization like weight decay or dropout was applied unless explicitly stated.
Initialization: We use the default initialization provided by PyTorch for all the layers.
Adam: Unless specified otherwise, learning rate was set at constant to and all other parameters were set to their default PyTorch values.
SGD: Unless specified otherwise, learning rate schedule inverse-square root (defined below) was used with initial learning rate and updates every gradient steps. No momentum was used.
We found our results are robust to various other natural choices of optimizers and learning rate schedule. We used the above settings because (1) they optimize well, and (2) they do not require experiment-specific hyperparameter tuning, and allow us to use the same optimization across many experiments.
Batch size: All experiments use a batchsize of 128.
Learning rate schedule descriptions:
Inverse-square root : At gradient step , the learning rate is set to . We set learning-rate with respect to number of gradient steps, and not epochs, in order to allow comparison between experiments with varying train-set sizes.
Dynamic drop (, drop, patience): Starts with an initial learning rate of and drops by a factor of ’drop’ if the training loss has remained constant or become worse for ’patience’ number of gradient steps.
Here we describe the experimental setup for the neural machine translation experiments.
In this setting, the distribution consists of triples
where and are the source and target vocabularies, the string is a sentence in the source language, is its translation in the target language, and is the index of the token to be predicted by the model. We assume that is distributed uniformly on .
A standard probabilistic model defines an autoregressive factorization of the likelihood:
Given a set of training samples , we define
In practice, is not constructed from independent samples from , but rather by first sampling and then including all in .
For training transformers, we replicate the optimization procedure specified in Vaswani section 5.3, where the learning rate schedule consists of a “warmup” phase with linearly increasing learning rate followed by a phase with inverse square-root decay. We preprocess the data using byte pair encoding (BPE) as described in Sennrich2015NeuralMT. We use the implementation provided by fairseq (https://github.com/pytorch/fairseq).
The IWSLT ’14 German to English dataset contains TED Talks as described in cettoloEtAl:EAMT2012. The WMT ’14 English to French dataset is taken from http://www.statmt.org/wmt14/translation-task.html.
Here we provide full details for experiments in the body, when not otherwise provided.
Introduction: Experimental Details Figure 1
: All models were trained using Adam with learning-rate 0.0001 for 4K epochs. Plotting means and standard deviations for 5 trials, with random network initialization.
Model-wise Double Descent: Experimental Details Figure 7: Plotting means and standard deviations for 5 trials, with random network initialization.
Sample-wise Nonmonotonicity: Experimental Details Figure 10(a): All models are trained with SGD for 500K epochs, and data-augmentation. Bottom: Means and standard deviations from 5 trials with random initialization, and random subsampling of the train set.
This paper proposed, in very general terms, that the apparent contradiction between traditional notions of the bias-variance trade-off and empirically successful practices in deep learning can be reconciled under a double-descent curve—as model complexity increases, the test error follows the traditional “U-shaped curve”, but beyond the point of interpolation, the error starts to decrease. This work provides empirical evidence for the double-descent curve with fully connected networks trained on subsets of MNIST, CIFAR10, SVHN and TIMIT datasets. They use the
loss for their experiments. They demonstrate that neural networks are not an aberration in this regard—double-descent is a general phenomenon observed also in linear regression with random features and random forests.
A variety of papers have attempted to theoretically analyze this behavior in restricted settings, particularly the case of least squares regression under various assumptions on the training data, feature spaces and regularization method.
advani2017high; hastie2019surprises both consider the linear regression problem stated above and analyze the generalization behavior in the asymptotic limit
using random matrix theory.hastie2019surprises highlight that when the model is mis-specified, the minimum of training error can occur for over-parameterized models
belkin2019two Linear least squares regression for two data models, where the input data is sampled from a Gaussian and a Fourier series model for functions on a circle. They provide a finite-sample analysis for these two cases
bartlett2019benign provides generalization bounds for the minimum -norm interpolant for Gaussian features
muthukumar2019harmless characterize the fundamental limit of of any interpolating solution in the presence of noise and provide some interesting Fourier-theoretic interpretations.
Similar double descent behavior was investigated in opper1995statistical; opper2001learning
geiger2019jamming showed that deep fully connected networks trained on the MNIST dataset with hinge loss exhibit a “jamming transition” when the number of parameters exceeds a threshold that allows training to near-zero train loss. geiger2019scaling provide further experiments on CIFAR-10 with a convolutional network. They also highlight interesting behavior with ensembling around the critical regime, which is consistent with our informal intuitions in Section 5 and our experiments in Figures 28, 29.
advani2017high; geiger2019jamming; geiger2019scaling also point out that double-descent is not observed when optimal early-stopping is used.
In this section, for completeness sake, we show that both the model- and sample-wise double descent phenomena are not unique to deep neural networks—they exist even in the setting of Random Fourier Features of rahimi2008random. This setting is equivalent to a two-layer neural network with activation. The first layer is initialized with a Gaussian distribution and then fixed throughout training. The width (or embedding dimension) of the first layer parameterizes the model size. The second layer is initialized with s and trained with MSE loss.
Figure 14 shows the grid of Test Error as a function of both number of samples and model size . Note that in this setting (the embedding dimension). As a result, as demonstrated in the figure, the peak follows the path of . Both model-wise and sample-wise (see figure 15) double descent phenomena are captured, by horizontally and vertically crossing the grid, respectively.
Here, we provide a rigorous evaluation of epoch-wise double descent for a variety of optimizers and learning rate schedules. We train ResNet18 on CIFAR-10 with data-augmentation and 20% label noise with three different optimizers—Adam, SGD, SGD + Momentum (momentum set to 0.9) and three different learning rate schedules—constant, inverse-square root, dynamic drop for differnet values of initial learning rate. We observe that double-descent occurs reliably for all optimizers and learning rate schedules and the peak of the double descent curve shifts with the interpolation point.
A practical recommendation resulting from epoch-wise double descent is that stopping the training when the test error starts to increase may not always be the best strategy. In some cases, the test error may decrease again after reaching a maximum, and the final value may be lower than the minimum earlier in training.
CIFAR100, Standard CNN
Here, we now study the effect of varying the level of regularization on test error. We train CIFAR10 with data-augmentation and 20% label noise on ResNet18 for weight decay co-efficients ranging from 0 to 0.1. We train the networks using SGD + inverse-square root learning rate. Figure below shows a picture qualitatively very similar to that observed for model-wise double descent wherein ”model complexity” is now controlled by the regularization parameter. This confirms our generalized double descent hypothesis along yet another axis of Effective Model Complexity.
CIFAR10, 10% noise, SGD