{'fraction_non_alphanumeric': 0.03776530861185655, 'fraction_numerical': 0.015881922420102463, 'mean_word_length': 4.250544383245805, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Increasing Depth Leads to U-Shaped Test Risk in Over-parameterized Convolutional Networks

Recent works have demonstrated that increasing model capacity through width in over-parameterized neural networks leads to a decrease in test risk. For neural networks, however, model capacity can also be increased through depth, yet understanding the impact of increasing depth on test risk remains an open question. In this work, we demonstrate that the test risk of over-parameterized convolutional networks is a U-shaped curve (i.e. monotonically decreasing, then increasing) with increasing depth. We first provide empirical evidence for this phenomenon via image classification experiments using both ResNets and the convolutional neural tangent kernel (CNTK). We then present a novel linear regression framework for characterizing the impact of depth on test risk, and show that increasing depth leads to a U-shaped test risk for the linear CNTK. In particular, we prove that the linear CNTK corresponds to a depth-dependent linear transformation on the original space and characterize properties of this transformation. We then analyze over-parameterized linear regression under arbitrary linear transformations and, in simplified settings, provably identify the depths which minimize each of the bias and variance terms of the test risk.


Introduction
According to traditional statistical learning theory, over-parameterized models will overfit training data and thus generalize poorly to unseen test data [9]. This hypothesis is classically explained through the biasvariance tradeoff: as model complexity increases, so will variance, and thus more complex models will have increased test risk. On the other hand, over-parameterized deep networks often perform well on test data even though they have enough capacity to interpolate randomly labeled training data [34].
Recent work [3] reconciled this conflict via the double descent risk curve, which proposes that test risk decreases as model complexity increases beyond the interpolation threshold. While the precise behavior near the interpolation threshold depends on a number of factors including regularization [21] and label noise, several works [4,8,2,33] proved a decrease in test risk in linear and random feature regression, when increasing the number of features used for regression. Moreover, [33,20,3] demonstrated that increasing width beyond the interpolation threshold while holding depth constant in over-parameterized neural networks leads to a decrease in test error. This is illustrated in Figure 1(a), showing instances of test loss decreasing as network width increases.
While prior work analyzes increasing model complexity through width, complexity can also be increased through depth [28]. Understanding the impact of increasing depth on test error has been an open question; while linear regression provides a simple setting for understanding the behavior of test risk as a function of width, so far there does not exist a similar, simple framework for analyzing test risk through increasing depth.  In contrast, increasing the depth of ResNets trained on CIFAR10 results in a U-shaped curve (results are averaged across 3 random seeds). All models achieve 100% training accuracy and hence are in the interpolating regime.
In this work, we show both empirically via CIFAR10 classification experiments and theoretically via a novel linear regression framework that the test error of over-parameterized convolutional neural networks (CNNs) follows a U-shaped curve, i.e. a curve that is monotonically decreasing until a critical threshold and then increasing. This is illustrated in Figure 1(b), which shows that increasing depth while holding width constant leads to a U-shaped test error in over-parameterized ResNets [10].
The specific contributions of our paper are as follows: 1. We provide empirical evidence that test error follows a U-shaped curve for interpolating CNNs (Section 3). We demonstrate this phenomenon for image classification on CIFAR10 [16] using overparameterized ResNets and infinite width convolutional networks, i.e. the convolutional neural tangent kernel (CNTK) [1].
2. We propose a novel linear regression framework based on the linear CNTK in order to model the effect of depth on test risk (Section 4). We first derive the feature map of the linear CNTK as a function of depth. Namely, we show that the CNTK at depth D has the form K(x, x ) = x T Θ D x for a positive semi-definite feature transformation Θ D . We then provide a recursion to compute Θ D , and characterize properties of Θ D for different network architectures. 3. In order to characterize the impact of depth on test risk for the linear CNTK, we derive the bias-variance decomposition for over-parameterized linear regression using kernels of the form K(x, x ) = x T Θx . We prove that the variance is minimized when Θ equals the inverse of the data covariance matrix and that the bias decreases as Θ aligns more with the true predictor. We apply our theory to classifying MNIST digits with the linear CNTK and observe that, as predicted by our theroetical results, the test loss follows a U-shaped curve and is minimized approximately at the depth at which Θ D is closest to the prediction direction.

Related Work
Role of Width in Neural Networks. Previous works studying generalization for over-parameterized neural networks have primarily focused on increasing width; in particular, [3,20] demonstrated that double descent occurs when increasing the width of neural networks trained on MNIST [17] and CIFAR10, respectively. In addition, several theoretical works [2,4,5,8,18,19] demonstrated double descent by analyzing linear or shallow non-linear models with an increasing number of features. Moreover, [33] analyzed the bias-variance decomposition as a function of width, and showed that bias is decreasing while variance is hill shaped. In Section 3, we conduct a similar empirical analysis to [20,33], but on the impact of depth in CNNs rather than width. Our theoretical analysis in Section 4 derives the bias-variance decomposition under an arbitrary linear feature map.  Role of Depth in CNNs. Previous analyses of model scaling for ResNet [10] and EfficientNet [27] have demonstrated decreasing test loss with increasing depth. However, these experiments were not conducted in the interpolating regime, which is the focus of this paper. We show that for CNNs which interpolate the data, test loss increases beyond a certain depth threshold.
Other works have studied the role of depth in CNNs through frameworks including expressivity [23], sparsity [22], student-teacher training [29], and implicit regularization. Works on implicit regularization have characterized the inductive bias of over-parameterized autoencoders [26,35], analyzed the inductive bias in function space of linear convolutional networks [7,14], and demonstrated that depth can lead to low-rank bias [11]. While each of these works identified an impact of depth in CNNs, they do not provide an explicit connection to generalization, which is the focus of our work.
Infinite-Width Neural Networks. Our linear regression analysis in Section 4 is conducted in the infinite width regime. With proper scaling as width approaches infinity, the solution of training neural networks is given by the solution to a corresponding kernel regression problem, using the so-called neural tangent kernel, or NTK [13]. In [1], the NTK was computed for convolutional networks (CNTK). The authors in [30,31] showed that the CNN signal propagation and CNTK (under the architectural constraints of flattening and circular padding) converge to those of a fully connected network in the limit of infinite depth. Furthermore, they provided initial empirical evidence of degradation of test risk with increasing depth. While this implies that the performance of such a CNTK must eventually degrade, in this paper we aim to understand the exact trend of depth versus test performance under different architectural constraints. We are specifically interested in identifying the optimal depth for generalization, which we accomplish in the linear CNTK setting.

Empirical Evidence in Nonlinear CNNs
We begin by empirically showing that the test risk of interpolating CNNs follows a U-shaped curve when depth increases. We illustrate this phenomenon for ResNets applied to CIFAR10 and the CNTK applied to subsets of CIFAR10. Our training methodology is outlined in Appendix A. In Appendix C, we also demonstrate the phenomenon for finite width fully-convolutional networks applied to CIFAR10 and ImageNet-32 [6].

Image Classification with Modern Deep Learning Models
To understand the effect of increasing depth in modern machine learning models, we analyzed variants of ResNet trained on CIFAR10. We consider modifications of the standard ResNet-18/ResNet-34 architectures to allow for models of arbitrary depth (see Figure 8 of the Appendix for a diagram). ResNet models consist of 4 stages, each of which are connected by a downsampling operation. Each stage is comprised of a number of basic blocks, which are two layers with a residual connection. There is a convolutional layer before the first stage, and a fully connected layer after the last stage. By varying the number of blocks in each stage, we construct ResNet models of different depths. In particular, choosing (n 1 , n 2 , n 3 , n 4 ) blocks in each stage respectively produces a ResNet of depth 2 + 2 · (n 1 + n 2 + n 3 + n 4 ). The width w of a model is defined to be the number of channels in the first stage and there are then (w, 2w, 4w, 8w) channels in each stage respectively. All of our ResNet models also use batch normalization. We trained models up to depth 100, see Appendix A for the stage breakdown of all models used. Our training methodology is based on that of [33]. The ResNets are trained using MSE loss on a random subset of 25,000 training images from CIFAR10. We trained for 500 epochs using SGD with learning rate 0.1 and momentum 0.9, and we decreased the learning rate by a factor of 10 every 200 epochs. We also used the data augmentation scheme of random crops and random horizontal flips on the training data. For additional architectural choices and optimization methods in the fully-convolutional setting, see Appendix C.
Plots of test loss as a function of depth are shown in Figure 1 and Figure 2. In all cases, we observe that the test loss begins to increase after a critical depth. This provides evidence for a general U-shaped dependence of test risk on depth. We emphasize that we had no optimization difficulties with training these models, and all models were able to interpolate the data (achieve near zero training loss). These experiments are therefore indeed in the interpolating regime, and hence the degradation in performance is due to the capacity of the deep models, not optimization difficulties. In Appendix B we provide train and test losses and accuracies of all models, and also demonstrate that other naive forms of overparameterization (increasing filter size or increasing depth in later blocks), lead to the same phenomenon, namely an increase in test loss.
Remarks. The fact that test loss can increase with sufficient depth was present in the original ResNet paper [10, Table 6], which demonstrated that a depth 1000 ResNet generalized worse than shallower ResNets. On the other hand, recent works on scaling in neural networks, such as EfficientNet [27], have shown improving test loss with increasing depth. However, all these experiments do not achieve near zero train loss (and hence are not in the interpolating regime). Our experiments show that for CNNs which interpolate the training data, increasing depth leads to worsening test performance.

Image Classification with the Convolutional Neural Tangent Kernel
We next empirically analyze the effect of depth on generalization of the CNTK, which allows us to remove the impact of additional factors in modern neural networks such as random initialization, width, batch normalization, and down-sampling. Since we are training via kernel ridge-less regression, our predictor perfectly interpolates the training data at all depths. Our training set consists of 250 examples each of CIFAR10 planes and trucks 1 . We use the Neural Tangents [25] library to compute the CNTK, and consider convolutional networks with filters of size 3, both zero and circular padding, and a final flattening layer. We calculate the test loss and accuracy on a test set of 250 planes and trucks.
In Figure 3, we plot the test loss as a function of depth for both CNTK architectures, as well as the NTK. We observe that test error is monotonically decreasing up to a critical depth, after which it is monotonically increasing. This provides further evidence that such a phenomenon occurs more generally in over-parameterized convolutional networks. In Appendix D, we present additional empirical evidence that generalization of the CNTK worsens past a critical depth by considering different architectural choices (pooling versus flattening layers) and classification problems with a varying number of classes.
Remarks. [31] proves that the CNTK with flattening and circular padding converges to the NTK as depth goes to infinity. We also conduct experiments with zero padding, which is more commonly used in practice, and provide the precise dependence of test loss on depth. This distinction is important because, as is discussed in the following section, linear CNTKs with zero padding versus circular padding have different behaviors.

The Role of Depth in Linear Neural Networks
In the previous section, we empirically demonstrated that CNNs have a U-shaped dependence of test risk on depth. In this section, we present a framework for understanding this phenomenon by analyzing the linear CNTK. We begin by deriving the feature map of the linear CNTK as a function of depth. In order to characterize the test risk of the feature map for the linear CNTK, we study the bias-variance decomposition for arbitrary linear transformations, and identify the transformation that minimizes each of the bias and variance. Finally, we demonstrate how a varying transformation as a function of depth leads to a U-shaped test risk. All proofs are presented in Appendix E.

Linear CNTK Analysis
We begin by formally defining a linear multi-channel convolutional network. We assume that the inputs have only a single channel 2 , and represent them as vectors x ∈ R p . Let our network have depth D, and let the d th layer have C d channels.
We adopt the following general definition of a convolutional network to allow for varying architecture choices. Let {B 1 , . . . , B r } ⊂ R p×p be a basis for an r-dimensional subspace of R p×p . Let θ d ij ∈ R r be the weights from the ith channel in layer d − 1 to the jth channel in layer d. The values of the network at the d th layer are defined recursively by Let θ be the vector of all θ's aggregated. We consider two different network architectures. In a flattening network, all values in all channels in the final layer x (D) are aggregated into a single vector, followed by a single fully connected layer. Formally, the output of the network is given by where w c ∈ R p . In a pooling network [1], the values in each channel in the final layer are averaged before a fully connected layer is applied to these average values. Formally, the output of the network is given by where w c ∈ R. All parameters (θ and the w c ) are initialized as i.i.d standard normal, and our network is trained via gradient descent on θ with sufficiently small learning rate using the square loss.
The CNTK Limit. In the limit as C 1 , . . . , C D → ∞, the predictor learned by gradient descent with sufficiently small learning rate on the square loss is equivalent to that learned from kernel regression using the CNTK [1]. The CNTK between two inputs x 1 , x 2 ∈ R p is defined as where f D is either of the two networks f D f lat or f D pool defined above. Since the network is linear, the kernel is linear, and hence K D (x 1 , x 2 ) = x T 1 Θ D x 2 for some positive semi-definite matrix Θ D ∈ R p×p , which we refer to as the feature transformation. The following theorem tells us that Θ D follows a particular recursion, with initial condition depending on the network architecture.
, c D is a constant depending on D and A : R p×p → R p×p is the linear operator defined as: Furthermore the initial condition Θ 0 depends on the architecture as follows: If f is a flattening network, then Θ 0 = I p , and if f is a pooling network, then Θ 0 = J p , the all-ones matrix.
We next analyze how Θ D evolves as a function of D for pooling versus flattening networks and zero versus circular padding, for 1-D convolutional networks with filter size 3 (r = 3). We derive the formula for 2-D convolutions in Appendix E.5.
Zero padding. In a CNN with zero padding, the 3 basis vectors are {B 1 } ij = δ i=j−1 (ones above the diagonal), B 2 = I n , and {B 3 } ij = δ i=j+1 (ones below the diagonal). For example, for p = 4, we have It is a straightforward computation to see that the operator A from Theorem 1 acts on matrix X by A(X) ij = k∈{−1,0,1} X i+k,j+k , where X ∈ R p×p and X 0,i = X i,0 = X p+1,i = X i,p+1 = 0. We observe that A acts independently on each diagonal (where j − i is fixed). Let y m ∈ R p−|m| be the vector of entries where j − i = m . Then, the action of A on y m is a p − |m|-dimensional Tridiagonal Toeplitz matrix where all nonzero entries are 1. For example, when p = 4, A acts on the main diagonal (m = 0) as The eigenvalues of such a p − |m| dimensional tridiagonal Toeplitz matrix are [24] 1 + 2 cos and thus, the eigenvalues of A are

Depth = 10
Depth = 100 Depth = 1000 Depth = 5000 Depth = 10000 Depth = 15000 Figure 4: The leading eigenvector of Θ D as a function of D for 2-dimensional convolutions. As D increases, the leading direction aggregates fewer nearby pixels, and at infinite depth, Θ D is a diagonal matrix that simply re-weights pixels.
Hence, 1 + 2 cos( π p+1 ) is the maximum eigenvalue of A, corresponding to m = 0, h = 1. The corresponding eigenvector is only nonzero on the diagonal and is given by the matrix which follows from the formula for eigenvectors of a tridiagonal Toeplitz matrix from [24]. Neither of the initial conditions for pooling (Θ 0 = J p ) nor flattening (Θ 0 = I p ) networks are orthogonal to Θ * . Therefore, in the limit D → ∞ the CNTK for both pooling and flattening will converge (after normalizing) to the kernel In Appendix E.5, we show that the limiting Θ * for 2-D convolutional networks with zero padding is also a diagonal matrix.
Circular padding. [30,31] analyze networks with circular padding. In this case, the operator A acts as A(X) ij = k∈{−1,0,1} X i+k mod p,j+k mod p . The initial conditions for pooling and flattening are both eigenvectors of the map A, and thus the kernel does not change with depth. The CNTK with circular padding and pooling remains a degenerate kernel (Θ D = J p at all depths). The CNTK with circular padding and flattening is just K(x 1 , x 2 ) = x T 1 x 2 , which is the standard Euclidean kernel given by the linear NTK. This is consistent with the infinite depth analysis from [31], which showed that with circular padding, the CNTK with flattening and NTK converge to the same infinite-depth limit, while the CNTK with pooling converges to a different limit.

Remarks.
We now discuss how the form of the feature transformation provides intuition for the Ushaped dependence of test loss on depth. In the case of zero padding, the infinite depth kernel Θ * is a diagonal matrix. Thus, this kernel simply re-scales pixels and ignores correlations between pixels, which we would expect to be sub-optimal for image classification tasks. On the other hand, the depth zero pooling network has a degenerate kernel, which averages all the input values. We would thus expect there to be an intermediate depth for which the kernel accurately aggregates nearby pixels at the correct scale and yields the optimal test loss. This is demonstrated in Figure 4, where we visualize the leading eigenvector of Θ D for pooling networks on 2-D image inputs of size 28 × 28 (p = 28 2 = 784, Θ D ∈ R p×p ). For increasing values of D, we plot the leading eigenvector of Θ D as a 28 × 28 image. For small depths, the leading direction in Θ D averages across many pixels. For large depths the leading direction of Θ D is just a single pixel, which is in accordance with the preceding theory. For intermediate depths, the most significant direction aggregates pixels at a fixed length, and thus we would expect the best performing kernel to be the one with length chosen optimally. This intuition is made precise in section 4.2.
Remarks on the Impact of Padding. The feature transformations for zero versus circular padding differ in that the linear CNTK with circular padding does not change with depth while the linear CNTK with zero padding does change with depth. Hence, the linear CNTK for networks with zero padding is a simple setting in which we can analyze the impact of depth on test error. Furthermore, the infinite-depth limit for the zero-padding CNTK with pooling and flattening are equivalent, but differ from the NTK. When using circular padding, the infinite depth kernel for flattening converges to the NTK, but differs from the kernel  for pooling. This is consistent with the result of [30,31], which establishes the convergence of CNTK to the NTK for networks with circular padding.

Over-parameterized Regression with Arbitrary Linear Feature Maps
In the previous section, we showed that the linear CNTK can be expressed as K(x, x ) = x T Θ D x for varying Θ D . In order to connect increasing depth with test risk in the linear CNTK, we now analyze the risk of linear kernels with general feature transformation Θ. We compute the Θ which minimize each of the bias and variance, and use the form of the minimizers to demonstrate a U-shaped test risk for the linear CNTK. We use the following standard setup for over-parameterized linear regression. Let X ∈ R n×p be the data matrix and Y ∈ R n be the response, where p is the number of features, n is the number of samples, and n < p. Let Σ ∈ R p×p be the true data covariance and β ∈ R p be the true predictor. Hence ∼ N (0, σ 2 ). We thus have that Y = Xβ + η, where η ∼ N (0, σ 2 I n ). Rather than performing ordinary least squares, we solve kernel ridge-less regression using the linear kernel K(x, x ) = x T Θx for arbitrary Θ ∈ R p×p , which yields the predictor Our goal is to compute the expected excess risk of this predictor on a new sample x ∼ N (0, Σ): The excess risk is given by the following bias-variance decomposition (with proof in Appendix E.2): Theorem 2. The excess risk R(Θ; β) can be written as The squared bias, B(Θ; β), is given by where P ⊥ Θ;X := I − ΘX T (XΘX T ) −1 X is a rotated projection operator and z 2 Σ := z T Σz.
The variance V(Θ) is given by where the rows of Z are sampled i.i.d from N (0, I), andΣ = Σ 1/2 ΘΣ 1/2 .  We now compute the Θ which minimizes the bias and the variance respectively. First, we show that the variance is minimized when Θ is proportional to Σ −1 (proof in Appendix E.3).

Proposition 1. The variance is lower bounded by
with equality if and only if Θ = cΣ −1 for a constant c.
Next, we show that the bias decreases when Θ approaches ββ T (proof in Appendix E.4).

Proposition 2.
For any positive semi-definite Θ, and 0 ≤ λ ≤ 1, we have that Hence, aligning the feature transformation Θ with β leads to a smaller bias. 4 Propositions 1 and 2 are verified empirically in Figure 5. In Figure 5(a), we let Θ D be the feature transformation for a depth D linear CNTK with 1-D inputs and p = 20, and use n = 10 training samples. We choose the data covariance to be proportional to Θ −1 50 , and let the noise variance be σ 2 = 0.01. We observe that the variance is indeed U-shaped as a function of depth, and is minimized at depth 50. In Figure 5(b), we set the data covariance to be the identity, and define our family of feature transformations by Θ D = ββ T + |D − 10| · I 20 . As is proven by Proposition 2, the bias is U-shaped as a function of depth, and is minimized at D = 10.

Experiments
Propositions 1 and 2 imply that the bias is minimized when Θ D aligns with β and the variance is minimized when Θ D = Σ −1 . In general, neither of these conditions may hold with exact equality. Nevertheless, we now empirically show that for Θ D given by the linear CNTK, bias is approximately minimized at the depth D for which Θ D is closest to ββ T .
We consider linear regression on digits 0 and 1 from MNIST. 5 To select a ground truth vector, β, we sample 50 zeros and 50 ones, and solve for β which fits the data exactly. These 100 points thus make up the true distribution of the data. To compute the bias in this setting, we sample n = 10 points, fit a linear predictor using Θ D as D varies, and calculate the loss on all 100 points. The average loss (over 20 random trials) is plotted in Figure 6(a). We again observe a U-shaped dependence of test loss on depth. Proposition 2 implies that aligning Θ D more with β will lead to a smaller bias. This is demonstrated in Figure 6(b), where we plot the fraction of the spectrum of Θ D orthogonal to β. Namely, if u = β/ β , we plot g(D) = 1 − (u T Θ D u) 2 / Θ D 2 F , which remains unchanged under scalar multiplication on Θ D and ranges from 0 (if Θ D is a multiple of ββ T ) to 1 (if β is in the null space of Θ D ). We observe that g(D) is also U-shaped, and the depth which minimizes the bias is approximately equal to the depth which minimizes g(D). To tie this back to our analysis in section 4.1, we expect that on image data the true β vector involves aggregating nearby pixels at the correct (intermediate) length scale. Hence we expect that the Θ D which aligns best with the true β would be at some intermediate value of D. This therefore provides a mechanism through which the test risk of CNNs has a U-shaped dependence on depth.

Discussion
In this work, we demonstrated that increasing neural network capacity through depth leads to a U-shaped curve for test risk. This result is in contrast to increasing neural network capacity through width, which leads to a decrease in test risk beyond the interpolation threshold [3]. We first empirically showed that the test error follows a U-shaped curve in finite and infinite width nonlinear CNNs. To theoretically analyze the effect of depth on the test risk, we presented a novel linear regression framework based on the linear CNTK. We derived the bias-variance decomposition of using linear kernels, i.e. K(x, x ) = x T Θx , to solve linear regression. We then showed that the variance is minimized when Θ matches the inverse of the data covariance and the bias is minimized when Θ aligns with the optimal predictor. We applied our theory to MNIST digit classification with the linear CNTK and observed that the test loss is approximately minimized at the depth at which the feature transformation Θ is closest to the prediction direction.
While we identified the depth that minimizes the bias and variance when solving linear regression with linear kernels, one direction of future work is to provide a closed form for the bias and variance as a function of the feature transformation, possibly in the limit as the dimension and sample size go to infinity. Furthermore, our theoretical analysis was in the setting of linear kernels, and thus another important direction of future work is to understand how to extend these insights to nonlinear kernels and, in particular, the nonlinear CNTK.

A Experimental Details
All models were trained on an NVIDIA TITAN RTX GPU using the PyTorch library. A repository with code used for this paper can be found here: github.com/eshnich/deep_cnn.    Figure 8: A diagram of the custom ResNet models used. The ith block is repeated n i times in stage i. The first convolutional layer in stages 2, 3, and 4 downsamples the input using a stride of 2, while the remaining layers have a stride of 1.

B.2 Train and Test Losses, Accuracies
In Figure 9, we plot the train and test losses of all ResNet models used (for widths 16,32,64). Additionally, in Figure 10 we plot the accuracies of all ResNet models.

B.3 Effect of Depth in models with small widths
In Figure 11, we train ResNets of increasing depth using a smaller width (width 8). While the test loss doesn't clearly increase, it begins to plateau with sufficient depth. We argue this is because the width 8 model requires a much larger depth to reach zero training loss, while all the other models do at earlier depths.

B.4 Effect of Downsampling
In Figure 12 we compare a ResNet model where we increase the number of blocks in the first stage versus a model where we increase the number of blocks in the third stage. We observe that the model where the third stage blocks are increased performs worse. This is likely because adding a block in a later stage, after downsampling, increases the effective depth of the model more than adding a block in an earlier stage.

B.5 Effect of Number of Samples
In Figure 13 is a plot of test losses when training the width 32 ResNet model on 500 samples per class ( 1 10 of CIFAR10). Number of training epochs is increased accordingly. We observe that test loss increases as depth increases, showing that this phenomenon is robust to change in sample size.

B.6 Effect of Kernel Size
Another form of overparameterization is increasing the kernel size for convolutional filters. In Figure 14, we train ResNet-10 and ResNet-18 of width 32 and varying kernel sizes, and observe that as kernel size increases, test loss increases. This is consistent with our proposed explanation based on expressivity, since increasing kernel size increases representational power independent of depth. : Train and test losses for width 32 models for increasing kernel size. We observe that test loss increases as kernel size increases.

C Image Classification with Fully-Convolutional Networks
We also considered a simplified model of a convolutional network, which we call the Fully-Conv Net. The architecture of a Fully-Conv Net of depth d and width w for a classification problem with c classes is depicted in Figure 15 and consists of the following layers: • A convolutional layer with stride 1, 3 input filters, and w output filters, followed by batch norm [12] and a LeakyReLU activation [32].
• d − 1 convolutional layers with stride 1, w input filters, and w output filters, each followed by batch norm and LeakyReLU activation.
• 1 convolutional layer with stride 1, w input filters, and c output filters. This is followed by an average pool of each of the output filters to produce a c-dimensional prediction.
16x16 Image Crucially, this network depends only on convolutional layers, a nonlinear activation, and batch norm; it does not depend on other components commonly found in deep learning architectures such as residual connections, dropout, downsampling, or fully connected layers. We note that this model is not designed to obtain optimal performance, but rather to isolate and understand the effect of increasing the number of convolutional layers.
We trained the Fully-Conv Net on 2, 5, and 10 classes from CIFAR10. All experiments were performed using 5 random seeds to reduce the impact of random initialization. Models were trained using Adam [15] with learning rate 10 −4 for 2000 epochs, and we selected the model with the best training accuracy over the course of training. We used the Cross Entropy loss, and down-sampled images to 16 × 16 resolution to reduce the computational burden. See Appendix A for a list of all classes used. The resulting train and test accuracies are shown in Figure 16. As expected, as depth increases, training accuracy becomes 100%. However, beyond a critical depth threshold, the test accuracy begins to degrade sharply.
In addition to CIFAR10, we also applied the Fully-Conv Net to subsets of ImageNet32 [6], which is ImageNet downsampled to size 32 × 32. We again trained on 2, 5, and 10 classes, using the same training procedure as for CIFAR10. Training and test accuracies for ImageNet32 are shown in Figure 17. Again, we observe that as depth increases past a critical value, test performance degrades.  Figure 17: Train and test accuracy of the Fully-Conv Net as a function of depth, for ImageNet32 input images. Increasing depth beyond a critical threshold again leads to a decrease in test accuracy. Increasing depth beyond a critical value leads to a decrease in test accuracy. As depth increases, the performance of the Fully-Conv Net approaches that of a wide fully connected network (shown in red). All experiments are performed across 5 random seeds.
When training to classify between 2 and 5 classes, the test accuracy continues to decrease even when increasing depth past the interpolation threshold, i.e. even after achieving 100% training accuracy. This in contrast to double descent where increasing model complexity beyond the interpolation threshold leads to an increase in test accuracy. Interestingly, as depth increases, the test accuracy approaches and can even be worse than that of a fully connected network. While the Fully-Conv Nets were before or at the interpolation threshold for the 10 class setting in Figures 16 and 17, in Figure 18 in we demonstrate that a similar decrease in test accuracy occurs also after the interpolation threshold for wider models which can interpolate the data. We also plot the test cross entropy loss of all fully convolutional models trained on CIFAR10 and Ima-geNet32. Figure 19 contains the test losses for the models trained on CIFAR10, Figure 20 contains the test losses for the models trained on ImageNet32, and Figure 21 contains the test losses for the wider models considered in Figure 18. In all cases, we observe that test loss begins to increase beyond a critical depth.

Depth Depth Depth
(a) 2 classes (b) 5 classes (c) 10 classes Figure 19: Test losses for models in Figure 2 (on CIFAR10). The error for the convolutional networks is in blue and that of full connected networks is in red.

Depth Depth Depth
(a) 2 classes (b) 5 classes (c) 10 classes Figure 20: Test losses for models in Figure 3 (on ImageNet32). The error for the convolutional networks is in blue and that of full connected networks is in red.

Test Loss
Depth Depth (a) Cifar10 (b) ImageNet32 Figure 21: Test losses for the models in Figure 18.

D Additional CNTK Experiments
We also train the CNTK on subsets of CIFAR10 of varying number of classes. We use 100 train and 100 test examples per class, and train on both 2 classes (birds and deer), 5 classes (cats, dogs, horses, bids, and deer), and 10 classes (all of CIFAR10). The test losses and accuracies are shown in Figure 22. Again, we see that generalization is unimodal, with test loss decreasing until a critical depth and increasing afterwards, which is in agreement with our main CNTK experiment in Figure 3.  We observe that generalization improves up to a critical depth, after which it worsens.
We note that training the CNTK for large depths is computationally prohibitive. The runtime scales quadratically in the number of training samples; furthermore, training the depth 500 CNTK on 1 GPU for 500 train and 500 test samples took approximately 2 days.
We also analyze the test loss of the CNTK where the last layer is a global average pooling layer. The test loss and test accuracy for the models trained on 2 classes of CIFAR10 (with 100 train samples per class) are shown in Figure 23. Even with the CNTK with pooling we observe the similar trend of decreasing loss, and then increasing loss past a critical depth. We use Neural Tangents [25] for this experiment; computing the CNTK with pooling for larger depths on more samples was computationally prohibitive.

Depth Depth
Test Loss Test Accuracy

E.1 Proof of Theorem 1
Proof. For a depth d ≤ D in the network, define K (d) , Γ (d) to be the Neural Network Gaussian Process (NNGP) and NTK respectively at layer d. Concretely, for inputs x, y ∈ R p , define where θ ≤d is the vector of parameters up to and including layer d. It is straightforward to compute the NNGP -since the θ are all i.i. d N (0, 1), and the values of each channel at a given depth x are also i.i.d Gaussians, plugging in the recursion from (1) we obtain This gives the recursion by definition of A. The NTK recursion can be calculated in a similar manner to the CNTK computation in [31]; since the activations are linear and have derivative 1, using [31,Equation 152] we obtain This formula tells us that the NTK is a constant (depending on d) times the NNGP, so we only need to focus on how the NNGP evolves. The initial condition for the NNGP is K (0) (x, y) = xy T , so substituting into (17) and unrolling the recursion gives Let us first consider a pooling network f D pool (x; θ) with CNTK between two inputs x, y being K D pool (x, y) ∈ R. We have that Plugging in (19), we get where c is a constant independent of x, y. After rescaling, we see that we can write the kernel as where Θ 0 = 11 T = J p and Θ n satisfies the recursion as desired. Next, consider a flattening network. The CNTK between two inputs K D f lat (x, y) is given by Thus Similarly to before, we can write the kernel as K D f lat (x, y) = x T Θ D y, where Θ D satisfies the same recursion, Θ D = A(Θ D−1 ), and the initial condition is now Θ 0 = I p .

E.2 Proof of Theorem 2
Proof. By the bias-variance decomposition, we can write R(Θ; β, X) = B(Θ; β, X) + V(Θ; β, X), where the squared bias and variance conditioned on X are First we compute the variance.
We do a change of basis. Write X = ZΣ 1/2 (x = Σ 1/2 z, where z ∼ N (0, I)). Then, lettingΣ = Σ 1/2 ΘΣ 1/2 , the variance is Therefore the expected variance over the randomness of the data is where the entries of Z are all i.i.d standard normal. Next we consider the bias. We have as desired.

E.3 Proof of Proposition 1
Proof. For Z such that ZZ T and ZΣZ T are invertible (which occurs almost surely) we have that where the inequality is due to Cauchy-Schwarz on the matrix inner product A, B = Tr(A T B). Therefore we can lower bound the variance by where P ⊥ Z is the projection on null(Z), which is nonzero since n < p. ThereforeΣnull(Z) ⊂ null(Z) This can only occur if null(Z) = span(v 1 , . . . , v p−n ) for some eigenvectors v 1 , . . . , v p−n ofΣ. However, the only way this can be true with probability 1 over the choices of Z is if all vectors in R p are eigenvectors ofΣ, i.e. Σ = cI for a constant c. SinceΣ = Σ 1 2 ΘΣ 1 2 , we thus have Θ = cΣ −1 , which proves our desired claim.

E.5 2-D Convolution Derivation
In the setting of 2D convolutions, we have p = s 2 for s × s images. First, let us understand the A operator. For X ∈ R n×n , we index the rows by (i, i ) (corresponding to the (i, i ) pixel in the output channel) and index the columns by (j, j ). Thus we can refer to entries in X by X i,i ,j,j for i, i , j, j ∈ [s]. For a convolutional network with 3 × 3 filters, we have r = 9 basis elements, which we can index by (k, k ) for k, k ∈ [−1, 0, 1].
In particular, the (k, k ) basis element is given by Therefore by a straightforward computation the A operator is defined as A(X) i,i ,j,j = (k,k )∈[−1,0,1] 2 X i+k,i +k ,j+k,j +k , where again we define X i,i ,j,j = 0 if any of i, i , j, j equal 0 or s + 1. We use this formula to compute the feature transformations used in Figure 4.
Observe that A acts independently on the vector of entries where (j − i, j − i ) is fixed. Let y a,b be the vector of entries where (j − i, j − i ) = (a, b); assuming WLOG that a, b ≥ 0, define y a,b i,i = X i,i ,i+a,i +b for i ∈ [s − a], j ∈ [s − b]. Then, denoting by A a,b the action of A on y a,b , we have that Let v a be an eigenvector of an s − a-dimensional tridiagonal Toeplitz matrix with all nonzero entries being 1, and let λ a be its corresponding eigenvalue. Define the vector u i,i = v a i v b i . Then: = λ a λ b u i,i Therefore λ a λ b is an eigenvalue of A a,b . The eigenvalues of A a,b are hence {(1 + 2 cos iπ s − a + 1 )(1 + 2 cos i π s − b + 1 so there is the unique largest eigenvalue (1 + 2 cos π s−a+1 )(1 + 2 cos π s−b+1 ). The eigenvalues of A are the eigenvalues of A a,b over all choices of a, b, and therefore A has unique maximum eigenvalue (1 + 2 cos π s+1 ) 2 . The corresponding eigenvector is when a = b = 0, and is thus only supported on the entries X i,i ,i,i . Hence the leading eigenvector of A is diagonal, and simply reweights individual pixels. Using the formula for the eigenvectors of a tridiagonal Toeplitz matrix, the leading eigenvector Θ * is given by It is easy to check that neither of the pooling nor flattening initial conditions are orthogonal to Θ * , and hence they converge to Θ * in the infinite depth limit.