Title: A FINE-GRAINED SPECTRAL PERSPECTIVE ON NEURAL NETWORKS

Abstract: Are neural networks biased toward simple functions? Does depth always help learn more complex features? Is training the last layer of a network as good as training all layers? How to set the range for learning rate tuning? These questions seem unrelated at face value, but in this work we give all of them a common treatment from the spectral perspective. We will study the spectra of the Conjugate Kernel, CK, (also called the Neural Network-Gaussian Process Kernel), and the Neural Tangent Kernel, NTK. Roughly, the CK and the NTK tell us respectively "what a network looks like at initialization" and "what a network looks like during and after training." Their spectra then encode valuable information about the initial distribution and the training and generalization properties of neural networks. By analyzing the eigenvalues, we lend novel insights into the questions put forth at the beginning, and we verify these insights by extensive experiments of neural networks. We believe the computational tools we develop here for analyzing the spectra of CK and NTK serve as a solid foundation for future studies of deep neural networks. We have open-sourced the code for it and for generating the plots in this paper at github.com/jxVmnLgedVwv6mNcGCBy/NNspectra.

1. INTRODUCTION:

Understanding the behavior of neural networks and why they generalize has been a central pursuit of the theoretical deep learning community. Recently, Valle-Pérez et al. (2018) observed that neural networks have a certain "simplicity bias" and proposed this as a solution to the generalization question. One of the ways with which they argued that this bias exists is the following experiment: they drew a large sample of boolean functions by randomly initializing neural networks and thresholding the output. They observed that there is a bias toward some "simple" functions which get sampled disproportionately more often. However, their experiments were only done for relu networks. Can one expect this "simplicity bias" to hold universally, for any architecture? A priori, this seems difficult, as the nonlinear nature seems to present an obstacle in reasoning about the distribution of random networks. However, this question turns out to be more easily treated if we allow the width to go to infinity. A long line of works starting with Neal (1995) and extended recently by Lee et al. (2018) ; Novak et al. (2018) ; Yang (2019) have shown that randomly initialized, infinite-width networks are distributed as Gaussian processes. These Gaussian processes also describe finite width random networks well (Valle-Pérez et al., 2018) . We will refer to the corresponding kernels as the Conjugate Kernels (CK), following the terminology of Daniely et al. (2016) . Given the CK K, the simplicity bias of a wide neural network can be read off quickly from the spectrum of K: If the largest eigenvalue of K accounts for most of tr K, then a typical random network looks like a function from the top eigenspace of K.

In this paper, we will use this spectral perspective to probe not only the simplicity bias, but more generally, questions regarding how hyperparameters affect the generalization of neural networks.

Via the usual connection between Gaussian processes and linear models with features, the CK can be thought of as the kernel matrix associated to training only the last layer of a wide randomly initialized network. It is a remarkable recent advance (Jacot et al., 2018; Allen-Zhu et al., 2018a; c; Du et al., 2018) that, under a certain regime, a wide neural network of any depth evolves like a linear model even when training all parameters. The associated kernel is call the Neural Tangent Kernel, which is typically different from CK. While its theory was initially derived in the infinite width setting, Lee et al. (2019) confirmed with extensive experiment that this limit is predictive of finite width neural networks as well. Thus, just as the CK reveals information about what a network looks like at initialization, NTK reveals information about what a network looks like after training. As such, if we can understand how hyperparameters change the NTK, we can also hope to understand how they affect the performance of the corresponding finite-width network.

Our Contributions In this paper, in addition to showing that the simplicity bias is not universal, we will attempt a first step at understanding the effects of the hyperparameters on generalization from a spectral perspective.

At the foundation is a spectral theory of the CK and the NTK on the boolean cube. In Section 3, we show that these kernels, as integral operators on functions over the boolean cube, are diagonalized by the natural Fourier basis, echoing similar results for over the sphere (Smola et al., 2001) . We also partially diagonalize the kernels over standard Gaussian, and show that, as expected, the kernels over the different distributions (boolean cube, sphere, standard Gaussian) behave very similarly in high dimensions. However, the spectrum is much easier to compute over the boolean cube: while the sphere and Gaussian eigenvalues would require integration against a kind of polynomials known as the Gegenbauer polynomials, the boolean ones only require calculating a linear combination of a small number of terms. For this reason, in the rest of the paper we focus on analyzing the eigenvalues over the boolean cube.

Just as the usual Fourier basis over R has a notion of frequency that can be interpreted as a measure of complexity, so does the boolean Fourier basis (this is just the degree; see Section 3.1). While not perfect, we adopt this natural notion of complexity in this work; a "simple" function is then one that is well approximated by "low frequencies."

This spectral perspective immediately yields that the simplicity bias is not universal (Section 4).

In particular, while it seems to hold more or less for relu networks, for sigmoidal networks, the simplicity bias can be made arbitrarily weak by changing the weight variance and the depth. In the extreme case, the random function obtained from sampling a deep erf network with large weights is distributed like a "white noise." However, there is a very weak sense in which the simplicity bias does hold: the eigenvalues of more "complex" eigenspaces cannot be bigger than those of less "complex" eigenspaces (Thm 4.1).

Next, we examine how hyperparameters affect the performance of neural networks through the lens of NTK and its spectrum. To do so, we first need to understand the simpler question of how a kernel affects the accuracy of the function learned by kernel regression. A coarse-grained theory, concerned with big-O asymptotics, exists from classical kernel literature (Yao et al., 2007; Raskutti et al., 2013; Wei et al.; Lin and Rosasco; Schölkopf and Smola, 2002) . However, the fine-grained details, required for discerning the effect of hyperparameters, have been much less studied. We make a first attempt at a heuristic, fractional variance (i.e. what fraction of the trace of the kernel does an eigenspace contribute), for understanding how a minute change in kernel effects a change in performance. Intuitively, if an eigenspace has very large fractional variance, so that it accounts for most of the trace, then a ground truth function from this eigenspace should be very easy to learn.

Using this heuristic, we make two predictions about neural networks, motivated by observations in the spectra of NTK and CK, and verify them with extensive experiments.

• Deeper networks learn more complex features, but excess depth can be detrimental as well.

Spectrally, depth can increase fractional variance of an eigenspace, but past an optimal depth, it will also decrease it. (Section 5) Thus, deeper is not always better.

• Training all layers is better than training just the last layer when it comes to more complex features, but the opposite is true for simpler features. Spectrally, fractional variances of more "complex" eigenspaces for the NTK are larger than the correponding quantities of the CK. (Section 6)

Finally, we use our spectral theory to predict the maximal nondiverging learning rate ("max learning rate") of SGD (Section 7).

In general, we will not only verify our theory with experiments on the theoretically interesting distributions, i.e. uniform measures over the boolean cube and the sphere, or the standard Gaussian, but also confirm these findings on real data like MNIST and CIFAR101 .

For space concerns, we review relevant literature along the flow of the main text, and relegate a more complete discussion of the related research landscape in Appendix A.

2. KERNELS ASSOCIATED TO NEURAL NETWORKS:

As mentioned in the introduction, we now know several kernels associated to infinite width, randomly initialized neural networks. The most prominent of these are the neural tangent kernel (NTK) (Jacot et al., 2018) and the conjugate kernel (CK) (Daniely et al., 2016) , which is also called the NNGP kernel (Lee et al., 2018) . We briefly review them below. First we introduce the following notation that we will repeatedly use. Definition 2.1. For φ : R → R, write V φ for the function that takes a PSD (positive semidefinite) kernel function to a PSD kernel of the same domain by the formula

V φ (K)(x, x ) = E f ∼N (0,K) φ(f (x))φ(f (x )).

Conjugate Kernel Neural networks are commonly thought of as learning a high-quality embedding of inputs to the latent space represented by the network's last hidden layer, and then using its final linear layer to read out a classification given the embedding. The conjugate kernel is just the kernel associated to the embedding induced by a random initialization of the neural network. Consider an MLP with widths {n l } l , weight matrices {W l ∈ R n l ×n l-1 } l , and biases {b l ∈ R n l } l , l = 1, . . . , L.

For simplicity of exposition, in this paper, we will only consider scalar output n L = 1. Suppose it is parametrized by the NTK parametrization, i.e. its computation is given recursively as

h 1 (x) = σ w √ n 0 W 1 x + σ b b 1 and h l (x) = σ w √ n l-1 W l φ(h l-1 (x)) + σ b b l (MLP)

with some hyperparameters σ w , σ b that are fixed throughout training2 . At initialization time, suppose

W l αβ , b l α ∼ N (0, 1) for each α ∈ [n l ], β ∈ [n l-1 ].

It can be shown that, for each α ∈ [n l ], h l α is a Gaussian process with zero mean and kernel function Σ l in the limit as all hidden layers become infinitely wide (n l → ∞, l = 1, . . . , L -1), where Σ l is defined inductively on l as

Σ 1 (x, x ) def = σ 2 w (n 0 ) -1 x, x + σ 2 b , Σ l def = σ 2 w V φ (Σ l-1 ) + σ 2 b (CK)

The kernel Σ L corresponding the the last layer L is the network's conjugate kernel, and the associated Gaussian process limit is the reason for its alternative name Neural Network-Gaussian process kernel.

In short, if we were to train a linear model with features given by the embedding x → h L-1 (x) when the network parameters are randomly sampled as above, then the CK is the kernel of this linear model. See Daniely et al. (2016) ; Lee et al. (2018) and Appendix F for more details.

Neural Tangent Kernel On the other hand, the NTK corresponds to training the entire model instead of just the last layer. Intuitively, if we let θ be the entire set of parameters {W l } l ∪ {b l } l of Eq. (MLP), then for θ close to its initialized value θ 0 , we expect

h L (x; θ) -h L (x; θ 0 ) ≈ ∇ θ h L (x; θ 0 ), θ -θ 0

via a naive first-order Taylor expansion. In other words, h L (x; θ) -h L (x; θ 0 ) behaves like a linear model with feature of x given by the gradient taken w.r.t. the initial network, ∇ θ h L (x; θ 0 ), and the weights of this linear model are the deviation θ -θ 0 of θ from its initial value. It turns out that, in the limit as all hidden layer widths tend to infinity, this intuition is correct (Jacot et al., 2018; Lee et al., 2018; Yang, 2019) , and the following inductive formula computes the corresponding infinite-width kernel of this linear model:

Θ 1 def = Σ 1 , Θ l (x, x ) def = Σ l (x, x ) + σ 2 w Θ l-1 (x, x )V φ (Σ l-1 )(x, x ). (NTK)

Computing CK and NTK While in general, computing V φ and V φ requires evaluating a multivariate Gaussian expectation, in specific cases, such as when φ = relu or erf, there exists explicit, efficient formulas that only require pointwise evaluation of some simple functions (see Facts F.1 and F.2). This allows us to evaluate CK and NTK on a set X of inputs in only time

O(|X | 2 L).

What Do the Spectra of CK and NTK Tell Us? In summary, the CK governs the distribution of a randomly initialized neural network and also the properties of training only the last layer of a network, while the NTK governs the dynamics of training (all parameters of) a neural network. A study of their spectra thus informs us of the "implicit prior" of a randomly initialized neural network as well as the "implicit bias" of GD in the context of training neural networks.

In regards to the implicit prior at initialization, we know from Lee et al. (2018) that a randomly initialized network as in Eq. (MLP) is distributed as a Gaussian process N (0, K), where K is the corresponding CK, in the infinite-width limit. If we have the eigendecomposition

K = i≥1 λ i u i ⊗ u i (1)

with eigenvalues λ i in decreasing order and corresponding eigenfunctions u i , then each sample from this GP can be obtained as

i≥1 λ i ω i u i , ω i ∼ N (0, 1).

If, for example, λ 1 i≥2 λ i , then a typical sample function is just a very small perturbation of u 1 . We will see that for relu, this is indeed the case (Section 4), and this explains the "simplicity bias" in relu networks found by Valle-Pérez et al. (2018) .

Training the last layer of a randomly initialized network via full batch gradient descent for an infinite amount of time corresponds to Gaussian process inference with kernel K (Lee et al., 2018; 2019) . A similar intuition holds for NTK: training all parameters of the network (Eq. (MLP)) for an infinite amount of time yields the mean prediction of the GP N (0, NTK) in expectation; see Lee et al. (2019) and Appendix F.4 for more discussion.

Thus, the more the GP prior (governed by the CK or the NTK) is consistent with the ground truth function f * , the more we expect the Gaussian process inference and GD training to generalize well. We can measure this consistency in the "alignment" between the eigenvalues λ i and the squared coefficients a 2 i of f * 's expansion in the {u i } i basis. The former can be interpreted as the expected magnitude (squared) of the u i -component of a sample f ∼ N (0, K), and the latter can be interpreted as the actual magnitude squared of such component of f * . In this paper, we will investigate an even cleaner setting where f * = u i is an eigenfunction. Thus we would hope to use a kernel whose ith eigenvalue λ i is as large as possible.

Neural Kernels From the forms of the equation Eqs. (CK) and (NTK) and the fact that V φ (K)(x, x ) only depends on K(x, x), K(x, x ), and K(x , x ), we see that CK or NTK of MLPs takes the form

K(x, y) = Φ x, y x y , x 2 d , y 2 d (2)

for some function Φ : R3 → R. We will refer to this kind of kernel as Neural Kernel in this paper.

Kernels as Integral Operators:

We will consider input spaces of various forms X ⊆ R d equipped with some probability measure. Then a kernel function K acts as an integral operator on functions

f ∈ L 2 (X ) by Kf (x) = (Kf )(x) = E y∼X K(x, y)f (y).

We will use the "juxtaposition syntax" Kf to denote this application of the integral operator. 3 Under certain assumptions, it then makes sense to speak of the eigenvalues and eigenfunctions of the integral operator K. While we will appeal to an intuitive understanding of eigenvalues and eigenfunctions in the main text below, we include a more formal discussion of Hilbert-Schmidt operators and their spectral theory in Appendix G for completeness. In the next section, we investigate the eigendecomposition of neural kernels as integral operators over different distributions.

3 THE SPECTRA OF NEURAL KERNELS

3.1. BOOLEAN CUBE:

We first consider a neural kernel K on the boolean cube X = d def = {±1} d , equipped with the uniform measure. In this case, since each x ∈ X has the same norm, K(x, y) = Φ

x,y

x y , x 2 d , y 2 d effectively only depends on x, y , so we will treat Φ as a single variate function in this section, Φ(c) = Φ(c, 1, 1).

Brief review of basic Fourier analysis on the boolean cube d (O'Donnell ( 2014)). The space of real functions on d forms a 2 d -dimensional space. Any such function has a unique expansion into a multilinear polynomial (polynomials whose monomials do not contain x p i , p ≥ 2, of any variable x i ). For example, the majority function over 3 bits has the following unique multilinear expansion

maj 3 : 3 → 1 , maj 3 (x 1 , x 2 , x 3 ) = 1 2 (x 1 + x 2 + x 3 -x 1 x 2 x 3 ).

In the language of Fourier analysis, the 2 d multilinear monomial functions

EQUATION

form a Fourier basis of the function space L 2 ( d ) = {f : d → R}, in the sense that their inner products satisfy

E x∼ d χ S (x)χ T (x) = I(S = T ).

Thus, any function f : d → R can be always written as

f (x) = S⊆[d] f (S)χ X (x)

for a unique set of coefficients { f (S)} S⊆ [d] .

It turns out that K is always diagonalized by this Fourier basis {χ S } S⊆ [d] .

Theorem 3.1. On the d-dimensional boolean cube d , for every S ⊆ [d], χ S is an eigenfunction of K with eigenvalue

EQUATION

where 1 = (1, . . . , 1) ∈ d . This definition of µ |S| does not depend on the choice S, only on the cardinality of S. These are all of the eigenfunctions of K by dimensionality considerations.4 

Define T ∆ to be the shift operator on functions over

[-1, 1] that sends Φ(•) to Φ(• -∆).

Then we can re-express the eigenvalue as follows. Lemma 3.2. With µ k as in Thm 3.1,

µ k = 2 -d (I -T ∆ ) k (I + T ∆ ) d-k Φ(1) (5) = 2 -d d r=0 C d-k,k r Φ d 2 -r ∆ (6)

where

EQUATION

Eq. ( 5) will be important for computational purposes, and we will come back to discuss this more in Section 3.5. It also turns out µ k affords a pretty expression via the Fourier series coefficients of Φ.

As this is not essential to the main text, we relegate its exposition to Appendix H.1.

3.2. SPHERE:

Now let's consider the case when X = √ dS d-1 is the radius-√ d sphere in R d equipped with the uniform measure. Again, because x ∈ X all have the same norm, we will treat Φ as a univariate function with K(x, y) = Φ( x, y / x y ) = Φ( x, y /d). As is long known (Schoenberg, 1942; Gneiting, 2013; Xu and Cheney, 1992; Smola et al., 2001) , K is diagonalized by spherical harmonics, and the eigenvalues are given by the coefficients of Φ against a system of orthogonal polynomials called Gegenbuaer polynomials. We relegate a complete review of this topic to Appendix H.2.

3.3. ISOTROPIC GAUSSIAN:

Now let's consider X = R d equipped with standard isotropic Gaussian N (0, I), so that K behaves like

Kf (x) = E y∼N (0,I) K(x, y)f (y) = E y∼N (0,I) Φ x, y x y , x 2 d , y 2 d f (y)

for any f ∈ L 2 (N (0, I)). In contrast to the previous two sections, K will essentially depend on the effect of the norms x and y on Φ.

Nevertheless, because an isotropic Gaussian vector can be obtained by sampling its direction uniformly from the sphere and its magnitude from a chi distribution, K can still be partially diagonalized into a sum of products between spherical harmonics and kernels on R equipped with a chi distribution (Thm H.14). In certain cases, we can obtain complete eigendecompositions, for example when Φ is positive homogeneous. See Appendix H.3 for more details.

3.4. KERNEL IS SAME OVER BOOLEAN CUBE, SPHERE, OR GAUSSIAN WHEN d 1:

The reason we have curtailed a detailed discussion of neural kernels on the sphere and on the standard Gaussian is because, in high dimension, the kernel behaves the same under these distributions as under uniform distribution over the boolean cube. Indeed, by intuition along the lines of the central limit theorem, we expect that uniform distribution over a high dimension boolean cube should approximate high dimensional standard Gaussian. Similarly, by concentration of measure, most of the mass of a Gaussian is concentrated around a thin shell of radius √ d. Thus, morally, we expect the same kernel function K induces approximately the same integral operator on these three distributions in high dimension, and as such, their eigenvalues should also approximately coincide. We verify empirically and theoretically this is indeed the case in Appendix H.4.

3.5. COMPUTING THE EIGENVALUES:

As the eigenvalues of K over the different distributions are very close, we will focus in the rest of this paper on eigenvalues over the boolean cube. This has the additional benefit of being much easier to compute.

Each eigenvalue over the sphere and the standard Gaussian requires an integration of Φ against a Gegenbauer polynomial. In high dimension d, these Gegenbauer polynomials varies wildly in a sinusoidal fashion, and blows up toward the boundary (see Fig. 15 in the Appendix). As such, it is difficult to obtain a numerically stable estimate of this integral in an efficient manner when d is large.

In contrast, we have multiple ways of computing boolean cube eigenvalues, via Eqs. ( 5) and (6). In either case, we just take some linear combination of the values of Φ at a grid of points on [-1, 1], spaced apart by ∆ = 2/d. While the coefficients C d-k,k r (defined in Eq. ( 7)) are relatively efficient to compute, the change in the sign of C d-k,k r makes this procedure numerically unstable for large d. Instead, we use Eq. ( 5) to isolate the alternating part to evaluate in a numerically stable way: Since

EQUATION

k Φ via k finite differences, and then compute erf networks lose simplicity bias for large 2 w and depth 2018), we sample 10 4 boolean functions {±1} 7 → {±1} as follows: for each combination of nonlinearity, weight variance σ 2 w , and bias variance σ 2 b (as used in Eq. (MLP)), we randomly initialize a network of 2 hidden layers, 40 neurons each. Then we threshold the function output to a boolean output, and obtain a boolean function sample. We repeat this for 10 4 random seeds to obtain all samples. Then we sort the samples according to their empirical probability (this is the x-axis, rank), and plot their empirical probability (this is the y-axis, probability). The high values at the left of the relu curve indicates that a few functions get sampled repeatedly, while this is less true for erf. For erf and σ 2 w = 4, no function got sampled more than once. (b) For different combination of nonlinearity, σ 2 w , σ 2 b , and depth, we study the eigenvalues of the corresponding CK. Each CK has 8 different eigenvalues µ 0 , . . . , µ 7 corresponding to homogeneous polynomials of degree 0, . . . , 7. We plot them in log scale against the degree. Note that for erf and σ b = 0, the even degree µ k vanish. See main text for explanations.

EQUATION

)

| 2 w | 2 b | depth relu | 2 | 2 | 2 erf | 1 | 0 | 2 erf | 2 | 0 | 2 erf | 4 | 0 | 2 erf | 4 | 0 | 32

When Φ arises from the CK or the NTK of an MLP, all derivatives of Φ at 0 are nonnegative (Thm I.3). Thus intuitively, the finite difference Φ should be also all nonnegative, and this sum can be evaluated without worry about floating point errors from cancellation of large terms.

A slightly more clever way to improve the numerical stability when 2k ≤ d is to note that

(I + T ∆ ) d-k (I -T ∆ ) k Φ(1) = (I + T ∆ ) d-2k I -T 2 ∆ k Φ(1) = (I + T ∆ ) d-2k (I -T 2∆ ) k Φ(1).

So an improved algorithm is to first compute the kth finite difference (I -T 2∆ ) k with the larger step size 2∆, then compute the sum (I + T ∆ ) d-2k as in Eq. (8).

4. CLARIFYING THE "SIMPLICITY BIAS" OF RANDOM NEURAL NETWORKS:

As mentioned in the introduction, Valle-Pérez et al. (2018) claims that neural networks are biased toward simple functions. We show that this phenomenon depends crucially on the nonlinearity, the sampling variances, and the depth of the network. In Fig. 1 (a), we have repeated their experiment for 10 4 random functions obtained by sampling relu neural networks with 2 hidden layers, 40 neurons each, following Valle-Pérez et al. ( 2018)'s architectural choices5 . We also do the same for erf networks of the same depth and width, varying as well the sampling variances of the weights and biases, as shown in the legend. As discussed in Valle-Pérez et al. (2018) , for relu, there is indeed this bias, where a single function gets sampled more than 10% of the time. However, for erf, as we increase σ 2 w , we see this bias disappear, and every function in the sample gets sampled only once. This phenomenon can be explained by looking at the eigendecomposition of the CK, which is the Gaussian process kernel of the distribution of the random networks as their hidden widths tend to infinity. In Fig. 1 (b), we plot the normalized eigenvalues {µ k / 7 i=0 7 i µ i } 7 k=0 for the CKs corresponding to the networks sampled in Fig. 1(a) . Immediately, we see that for relu and σ 2 w = σ 2 b = 2, the degree 0 eigenspace, corresponding to constant functions, accounts for more than 80% of the variance. This means that a typical infinite-width relu network of 2 layers is expected to be almost constant, and this should be even more true after we threshold the network to be a boolean function. On the other hand, for erf and σ b = 0, the even degree µ k s all vanish, and most of the variance comes from degree 1 components (i.e. linear functions). This concentration in degree 1 also lessens as σ 2 w increases. But because this variance is spread across a dimension 7 eigenspace, we don't see duplicate function samples nearly as much as in the relu case. As σ w increases, we also see the eigenvalues become more equally distributed, which corresponds to the flattening of For relu (a) and erf (b), we plot for each degree k the depth such that there exists some combination of other hyperparameters (such as σ 2 b or σ 2 w ) that maximizes the degree k fractional variance. For both relu, σ 2 b = 0 maximizes fractional variance in general, and same holds for erf in the odd degrees (see Appendix D), so we take a closer look at this slice by plotting heatmaps of fractional variance of various degrees versus depth for relu (c) and erf (d) NTK, with bright colors representing high variance. Clearly, we see the brightest region of each column, corresponding to a fixed degree, moves up as we increase the degree, barring for the even/odd degree alternating pattern for erf NTK. The pattern for CKs are similar and their plots are omitted.

the probability-vs-rank curve in Fig. 1(a) . Finally, we observe that a 32-layer erf network with σ 2 w = 4 has all its nonzero eigenvalues (associated to odd degrees) all equal (see points marked by * in Fig. 1(b) ). This means that its distribution is a "white noise" on the space of odd functions, and the distribution of boolean functions obtained by thresholding the Gaussian process samples is the uniform distribution on odd functions. This is the complete lack of simplicity bias modulo the oddness constraint.

However, from the spectral perspective, there is a weak sense in which a simplicity bias holds for all neural network-induced CKs and NTKs. Theorem 4.1 (Weak Spectral Simplicity Bias). Let K be the CK or NTK of an MLP on a boolean cube d . Then the eigenvalues µ k , k = 0, . . . , d, satisfy

EQUATION

)

Even though it's not true that the fraction of variance contributed by the degree k eigenspace is decreasing with k, the eigenvalue themselves will be in a nonincreasing pattern across even and odd degrees. In fact, if we fix k and let d → ∞, then we can show that (Thm I.6)

µ k = Θ(d -k ).

Of course, as we have seen, this is a very weak sense of simplicity bias, as it doesn't prevent "white noise" behavior as in the case of erf CK with large σ 2 w and large depth.

5. DEEPER NETWORKS LEARN MORE COMPLEX FEATURES:

In the rest of this work, we compute the eigenvalues µ k over the 128-dimensional boolean cube ( d , with d = 128) for a large number of different hyperparameters, and analyze how the latter affect the former. We vary the degree k ∈ [0, 8], the nonlinearity between relu and erf, the depth (number of hidden layers) from 1 to 128, and σ 2 b ∈ [0, 4]. We fix σ 2 w = 2 for relu kernels, but additionally vary σ 2 w ∈ [1, 5] for erf kernels. Comprehensive contour plots of how these hyperparameters affect the kernels are included in Appendix D, but in the main text we summarize several trends we see.

We will primarily measure the change in the spectrum by the degree k fractional variance, which is just

degree k fractional variance def = d k µ k d i=0 d i µ i .

This terminology comes from the fact that, if we were to sample a function f from a Gaussian process with kernel K, then we expect that r% of the total variance of f comes from degree k components of f , where r% is the degree k fractional variance. If we were to try to learn a homogeneous degree-k of different degrees k. We either train only the last layer (marked "ck") or all layers (marked "ntk"), and plot the degree k fractional variance of the corresponding kernel against the best validation loss over the course of training. We see that the best validation loss is in general inversely correlated with fraction variance, as expected. However, their precise relationship seems to change depending on the degree, or whether training all layers or just the last. See Appendix E for experimental details. (b) Same experimental setting as (a), with slightly different hyperparameters, and plotting depth against best validation loss (solid curves), as well as the corresponding kernel's (1-fractional variance) (dashed curves). We see that the loss-minimizing depth increases with the degree, as predicted by Fig. 2 . Note that we do not expect the dashed and solid curves to match up, just that they are positively correlated as shown by (a). In higher degrees, the losses are high across all depths, and the variance is large, so we omit them. See Appendix E for experimental details. (c) Similar experimental setting as (a), but with more hyperparameters, and now comparing training last layer vs training all layers. The color of each dot indicates the degree of the ground truth polynomial. Below the identity line, training all layers is better than training last layer. We see that the only nontrivial case where this is not true is when learning degree 0 polynomials, i.e. constant functions. See Appendix E for experimental details. We also replicate (b) for MNIST and CIFAR10, and moreover both (b) and (c) over the input distributions of standard Gaussian and the uniform measure over the sphere. See Figs. 6 to 8. polynomial using a kernel K, intuitively we should try to choose K such that its µ k is maximized, relative to other eigenvalues. Fig. 3(a) shows that this is indeed the case even with neural networks: over a large number of different hyperparameter settings, degree k fractional variance is inversely related to the validation loss incurred when learning a degree k polynomial. However, this plot also shows that there does not seem like a precise, clean relationship between fractional variance and validation loss. Obtaining a better measure for predicting generalization is left for future work.

Before we continue, we remark that the fractional variance of a fixed degree k converges to a fixed value as the input dimension d → ∞: Theorem 5.1 (Asymptotic Fractional Variance). Let K be the CK or NTK of an MLP on a boolean cube d . Then K can be expressed as K(x, y) = Φ( x, y /d) for some analytic function Φ : R → R.

If we fix k and let the input dimension d → ∞, then the fractional variance of degree k converges to

(k!) -1 Φ (k) (0)/Φ(1) = (k!) -1 Φ (k) (0) j≥0 (j!) -1 Φ (j) (0)

where Φ (k) denotes the kth derivative of Φ.

For the fractional variances we compute in this paper, their values at d = 128 are already very close to their d → ∞ limit, so we focus on the d = 128 case experimentally.

If K were to be the CK or NTK of a relu or erf MLP, then we find that for higher k, the depth of the network helps increase the degree k fractional variance. In Fig. 2 (a) and (b), we plot, for each degree k, the depth that (with some combination of other hyperparameters like σ 2 b ) achieves this maximum, for respectively relu and erf kernels. Clearly, the maximizing depths are increasing with k for relu, and also for erf when considering either odd k or even k only. The slightly differing behavior between even and odd k is expected, as seen in the form of Thm 4.1. Note the different scales of y-axes for relu and erf -the depth effect is much stronger for erf than relu.

For relu NTK and CK, σ 2 b = 0 maximizes fractional variance in general, and the same holds for erf NTK and CK in the odd degrees (see Appendix D). In Fig. 2(c ) and Fig. 2(d ) we give a more fine-grained look at the σ 2 b = 0 slice, via heatmaps of fractional variance against degree and depth. In both cases, we clearly see that, while for degree 0 or 1, the fractional variance is typically higher for CK, the reverse is true for larger degrees. In (c), for each degree k, we plot the fraction of hyperparameters where the degree k fractional variance of NTK is greater than that of CK. Consistent with previous observations, this fraction increases with the degree.

Brighter color indicates higher variance, and we see the optimal depth for each degree k clearly increases with k for relu NTK, and likewise for odd degrees of erf NTK. However, note that as k increases, the difference between the maximal fractional variance and those slightly suboptimal becomes smaller and smaller, reflected by suppressed range of color moving to the right. The heatmaps for relu and erf CKs look similar and are omitted.

We verify this increase of optimal depth with degree in Fig. 3(b ). There we have trained relu networks of varying depth against a ground truth multilinear polynomial of varying degree. We see clearly that the optimal depth is increasing with degree. We also verify this phenomenon when the input distribution changes to the standard Gaussian or the uniform distribution over the sphere

√ dS d-1 ; see Fig. 6.

Note that implicit in our results here is a highly nontrivial observation: Past some point (the optimal depth), high depth can be detrimental to the performance of the network, beyond just the difficulty to train, and this detriment can already be seen in the corresponding NTK or CK. In particular, it's not true that the optimal depth is infinite. We confirm the existence of such an optimal depth even in real distributions like MNIST and CIFAR10; see Fig. 7 . This adds significant nuance to the folk wisdom that "depth increases expressivity and allows neural networks to learn more complex features."

6. NTK FAVORS MORE COMPLEX FEATURES THAN CK:

We generally find the degree k fractional variance of NTK to be higher than that of CK when k is large, and vice versa when k is small, as shown in Fig. 4 . This means that, if we train only the last layer of a neural network (i.e. CK dynamics), we intuitively should expect to learn simpler features better, while, if we train all parameters of the network (i.e. NTK dynamics), we should expect to learn more complex features better. Similarly, if we were to sample a function from a Gaussian process with the CK as kernel (recall this is just the distribution of randomly initialized infinite width MLPs (Lee et al., 2018) ), this function is more likely to be accurately approximated by low degree polynomials than the same with the NTK.

We verify this intuition by training a large number of neural networks against ground truth functions of various homogeneous polynomials of different degrees, and show a scatterplot of how training the last layer only measures against training all layers (Fig. 3(c) ). This phenomenon remains true over the standard Gaussian or the uniform distribution on the sphere (Fig. 8 ). Consistent with our theory, the only place training the last layer works meaningfully better than training all layers is when the ground truth is a constant function. However, we reiterate that fractional variance is an imperfect indicator of performance. Even though for erf neural networks and k ≥ 1, degree k fractional variance of NTK is not always greater than that of the CK, we do not see any instance where training the last layer of an erf network is better than training all layers. We leave an investigation of this discrepancy to future work.

7. PREDICTING THE MAXIMUM LEARNING RATE:

In any setup that tries to push deep learning benchmarks, learning rate tuning is a painful but indispensable part. In this section, we show that our spectral theory can accurately predict the maximal nondiverging learning rate over real datasets as well as toy input distributions, which would help set the correct upper limit for a learning rate search.

By Jacot et al. (2018) , in the limit of large width and infinite data, the function g : X → R represented by our neural network evolves like

EQUATION

when trained under full batch GD (with the entire population) with L2 loss

L(f, g) = E x∼X (f (x) - g(x)

) 2 , ground truth g * , and learning rate α, starting from randomly initialization. If we train only the last layer, then K is the CK; if we train all layers, then K is the NTK. Given an eigendecomposition of K as in Eq. ( 1), if g 0 -g * = i a i u i is the decomposition of g 0 in the eigenbasis {u i } i , then one can easily deduce that

g t -g * = i a i (1 -2αλ i ) t u i .

Consequently, we must have α < (max i λ i ) -1 in order for Eq. ( 10) to converge6 

When the input distribution is the uniform distribution over d , the maximum learning rate is max(µ 0 , µ 1 ) by Thm 4.1. By Thm 5.1, as long as the Φ function corresonding to K has Φ(0) = 0, when d is large, we expect

µ 0 ≈ Φ(0) but µ 1 ∼ d -1 Φ (0) µ 0 . Therefore, we should predict 1 Φ(0)

for the maximal learning rate when training on the boolean cube. However, as Fig. 5 shows, this prediction is accurate not only for the boolean cube, but also over the sphere, the standard Gaussian, and even MNIST and CIFAR10!

8. CONCLUSION:

In this work, we have taken a first step at studying how hyperparameters change the initial distribution and the generalization properties of neural networks through the lens of neural kernels and their spectra. We obtained interesting insights by computing kernel eigenvalues over the boolean cube and relating them to generalization through the fractional variance heuristic. While it inspired valid predictions that are backed up by experiments, fractional variance is clearly just a rough indicator. We hope future work can refine on this idea to produce a much more precise prediction of test loss. Nevertheless, we believe the spectral perspective is the right line of research that will not only shed light on mysteries in deep learning but also inform design choices in practice. 

√ 128S 128-1

, and the standard Gaussian N (0, I 128 ). In all three plots, for different depth, nonlinearity, σ 2 w , σ 2 b of the MLP, we obtain its maximal nondiverging learning rate ("max learning rate") via binary search. We center and normalize each image of MNIST and CIFAR10 to the √ dS d-1 sphere, where d = 28 2 = 784 for MNIST and d = 3 × 32 2 = 3072 for CIFAR10. See Appendix E.2 for more details. (a) We empirically find max learning rate for training only the last layer of an MLP. Theoretically, we predict 1/Φ(0) where Φ corresponds to the CK of the MLP. We see that our theoretical prediction is highly accurate. Note that the Gaussian and Sphere points in the scatter plot coincide with and hide behind the BoolCube points. (b) and (c) We empirically find max learning rate for training all layers. Theoretically, we predict 1/Φ(0) where Φ corresponds to the NTK of the MLP. The points are identical between (b) and (c), but the color coding is different. Note that the Gaussian points in the scatter plots coincide with and hide behind the Sphere points. In (b) we see that our theoretical prediction when training all layers is not as accurate as when we train only the last layer, but it is still highly correlated with the empirical max learning rate. It in general underpredicts, so that half of the theoretical learning rate should always have SGD converge. This is expected, since the NTK limit of training dynamics is only exact in the large width limit, and larger learning rate just means the training dynamics diverges from the NTK regime, but not necessarily that the training diverges. In (c), we see that deeper networks tend to accept higher learning rate than our theoretical prediction. If we were to preprocess MNIST and CIFAR10 differently, then our theory is less accurate at predicting the max learning rate; see Fig. 9 for more details.

A RELATED WORKS:

The Gaussian process behavior of neural networks was found by Neal (1995) for shallow networks and then extended over the years to different settings and architectures (Williams, 1997; Le Roux and Bengio, 2007; Hazan and Jaakkola, 2015; Daniely et al., 2016; Lee et al., 2018; Matthews et al., 2018; Novak et al., 2018) . This connection was exploited implicitly or explicitly to build new models (Cho and Saul, 2009; Lawrence and Moore, 2007; Damianou and Lawrence, 2013; Wilson et al., 2016a; b; Bradshaw et al., 2017; van der Wilk et al., 2017; Kumar et al., 2018; Blomqvist et al., 2018; Borovykh, 2018; Garriga-Alonso et al., 2018; Novak et al., 2018; Lee et al., 2018) . The Neural Tangent Kernel is a much more recent discovery by Jacot et al. (2018) 2018) came upon the same reasoning independently. Like CK, NTK has also been applied toward building new models or algorithms (Arora et al., 2019a; Achiam et al., 2019) .

Closely related to the discussion of CK and NTK is the signal propagation literature, which tries to understand how to prevent pathological behaviors in randomly initialized neural networks when they are deep (Poole et al., 2016; Schoenholz et al., 2017; Yang and Schoenholz, 2017; 2018; Hanin, 2018; Hanin and Rolnick, 2018; Chen et al., 2018; Yang et al., 2019; Pennington et al., 2017a; Hayou et al., 2018; Philipp and Carbonell, 2018) . This line of work can trace its original at least to the advent of the Glorot and He initialization schemes for deep networks (Glorot and Bengio, 2010; He et al., 2015) . The investigation of forward signal propagation, or how random neural networks change with depth, corresponds to studying the infinite-depth limit of CK, and the investigation of backward signal propagation, or how gradients of random networks change with depth, corresponds to studying the infinite-depth limit of NTK. Some of the quite remarkable results from this literature includes how to train a 10,000 layer CNN (Xiao et al., 2017) and that, counterintuitively, batch normalization causes gradient explosion (Yang et al., 2019) . This signal propagation perspective can be refined via random matrix theory (Pennington et al., 2017a; 2018) . In these works, free probability is leveraged to compute the singular value distribution of the input-output map given by the random neural network, as the input dimension and width tend to infinity together. Other works also investigate various questions of neural network training and generalization from the random matrix perspective (Pennington and Worah, 2017; Pennington and Bahri, 2017; Pennington and Worah, 2018) . Yang (2019) presents a common framework, known as Tensor Programs, unifying the GP, NTK, signal propagation, and random matrix perspectives, as well as extending them to new scenarios, like recurrent neural networks. It proves the existence of and allows the computation of a large number of infinite-width limits (including ones relevant to the above perspectives) by expressing the quantity of interest as the output of a computation graph and then manipulating the graph mechanically.

Several other works also adopt a spectral perspective on neural networks (Candès, 1999; Sonoda and Murata, 2017; Eldan and Shamir, 2016; Barron, 1993; Xu et al., 2018; Zhang et al., 2019; Xu et al., 2019; Xu, 2018) ; here we highlight a few most relevant to us. Rahaman et al. ( 2018) studies the real Fourier frequencies of relu networks and perform experiments on real data as well as synthetic ones. They convincingly show that relu networks learn low frequencies components first. They also investigate the subtleties when the data manifold is low dimensional and embedded in various ways in the input space. In contrast, our work focuses on the spectra of the CK and NTK (which indirectly informs the Fourier frequencies of a typical network). Nevertheless, our results are complementary to theirs, as they readily explain the low frequency bias in relu that they found. Karakida et al. (2018) studies the spectrum of the Fisher information matrix, which share the nonzero eigenvalues with the NTK. They compute the mean, variance, and maximum of the eigenvalues Fisher eigenvalues (taking the width to infinity first, and then considering finite amount of data sampled iid from a Gaussian). In comparison, our spectral results yield all eigenvalues of the NTK (and thus also all nonzero eigenvalues of the Fisher) as well as eigenfunctions.

Finally, we note that several recent works (Xie et al., 2016; Bietti and Mairal, 2019; Basri et al., 2019; Ghorbani et al., 2019) studied one-hidden layer neural networks over the sphere, building on Smola et al. (2001) 's observation that spherical harmonics diagonalize dot product kernels, with the latter two concurrent to us. This is in contrast to the focus on boolean cube here, which allows us to study the fine-grained effect of hyperparameters on the spectra, leading to a variety of insights into neural networks' generalization properties.

B UNIVERSALITY OF OUR BOOLEAN CUBE OBSERVATIONS IN OTHER INPUT DISTRIBUTIONS:

Using the spectral theory we developed in this paper, we made three observations, that can be roughly summarized as follows: 1) the simplicity bias noted by Valle-Pérez et al. ( 2018) is not universal; 2) for each function of fixed "complexity" there is an optimal depth such that networks shallower or deeper will not learn it as well; 3) training last layer only is better than training all layers when learning "simpler" features, and the opposite is true for learning "complex" features.

In this section, we discuss the applicability of these observations to distributions that are not uniform over the boolean cube: in particular, the uniform distribution over the sphere

√ dS d-1

, the standard Gaussian N (0, I d ), as well as realistic data distributions such as MNIST and CIFAR10.

Simplicity bias:

The simplicity bias noted by Valle-Pérez et al. (2018) , in particular Fig. 1 , depends on the finiteness of the boolean cube as a domain, so we cannot effectively test this on the distributions above, which all have uncountable support.

Optimal depth With regard to the second observation, we can test whether an optimal depth exists for learning functions over the distributions above. Since polynomial degrees remain the natural indicator of complexity for the sphere and the Gaussian (see Appendices H.2 and H.3 for the relevant spectral theory), we replicated the experiment in Fig. 3(b ) for these distributions, using the same ground truth functions of polynomials of different degrees. The results are shown in Fig. 6 . We see the same phenomenon as in the boolean cube case, with an optimal depth for each degree, and with the optimal depth increasing with degree.

For MNIST and CIFAR10, the notion of "feature complexity" is less clear, so we will not test the hypothesis that "optimal depth increases with degree" for these distributions but only test for the existence of the optimal depth for the ground truth marked by the labels of the datasets. We do so by training a large number of MLPs of varying depth on these datasets until convergence, and plot the results in Fig. 7 . This figure clearly shows that such an optimal depth exists, such that shallower or deeper networks do monotonically worse as the depth diverge away from this optimal depth. Again, the existence of the optimal depth is not obvious at all, as conventional deep learning wisdom would have one believe that adding depth should always help.

Training last layer only vs training all layers Finally, we repeat the experiment in Fig. 3(c ) for the sphere and the standard Gaussian, with polynomials of different degrees as ground truth functions. The results are shown in Fig. 8 . We see the same phenomenon as in the boolean cube case: for degree 0 polynomials, training last layer works better in general, but for higher degree polynomials, training all layers fares better.

Note that, unlike the sphere and the Gaussian, whose spectral theory tells us that (harmonic) polynomial degree is a natural notion of complexity, for MNIST and CIFAR10 we have much less clear idea of what a "complex" or a "simple" feature is. Therefore, we did not attempt a similar experiment on these datasets.

C THEORETICAL VS EMPIRICAL MAX LEARNING RATES UNDER DIFFERENT PREPROCESSING FOR MNIST AND CIFAR10:

In the main text Fig. 5 , on the MNIST and CIFAR10 datasets, we preprocessed the data by centering and normalizing to the sphere (see Appendix E.2 for a precise description). With this preprocessing, our theory accurately predicts the max learning rate in practice.

In general, if we go by another preprocessing, such as PCA or ZCA, or no preprocessing, our theoretical max learning rate 1/Φ(0) is less accurate but still correlated in general. The only exception seems to be relu networks on PCA-or ZCA-preprocessed CIFAR10. See Fig. 9 . The best validation loss for degree 0 to 2 are all very close no matter which distribution the input is sampled from, such that the curves all sit on top of each other. For degree 3, there is less precise agreement between the validation loss over the different distributions, but the overall trend is unmistakably the same. We see that for networks deeper or shallower than the optimal depth, the loss monotonically increases as the depth moves away from the optimum. ). The three columns correspond to the different preprocessing procedures: no preprocessing, PCA projection to the first 128 components (PCA128), and ZCA projection to the first 128 components (ZCA128). In general, the theoretical prediction is less accurate (compared to preprocessing by centering and projecting to the sphere, as in Fig. 5 ), though still well correlated with the empirical max learning rate. The most blatant caveat is the relu networks trained on PCA128-and ZCA128-processed CIFAR10. While in the main text, we summarized several trends of interest kn several plots, they do not give the entire picture of how eigenvalues and fractional variances vary with σ 2 w , σ 2 b , and depth. Here we try to present this relationship more completely in a series of contour plots. Fig. 10 shows how varying depth and σ 2 b changes the fractional variances of each degree, for relu CK and NTK. We are fixing σ 2 w = 2 in the CK plots, as the fractional variances only depend on the ratio σ 2 b /σ 2 w ; even though this is not true for relu NTK, we fix σ 2 w = 2 as well for consistency. For erf, however, the fractional variance will crucially depend on both σ 2 w and σ 2 b , so we present 3D contour plots of how σ 2 w , σ 2 b , and depth changes fractional variance in Fig. 13 . Complementarily, we also show in Figs. 11 and 12 a few slices of these 3D contour plots for different fixed values of σ 2 b , for erf CK and NTK. b , for erf NTK. These plots essentially show slices of the NTK 3D contour plots in Fig. 13 . For σ b = 0, µ k for all even degrees k are 0, so we omit the plots. Note the rapid change in the shape of the contours for odd degrees, going from σ 2 b = 0 to σ 2 b = 0.1. This is reflected in Fig. 13 as well. b , for erf CK. These plots essentially show slices of the CK 3D contour plots in Fig. 13 . For σ b = 0, µ k for all even degrees k are 0, so we omit the plots. Note the rapid change in the shape of the contours for odd degrees, going from σ 2 b = 0 to σ 2 b = 0.1. This is reflected in Fig. 13 as well.

Figure 13 : 3D contour plots of how fractional variance of each degree varies with σ 2 w , σ 2 b and log 2 (depth), for erf CK and NTK. For each value of fractional variance, as given in the legend on the right, we plot the level surface in the (σ 2 w , σ 2 b , log 2 (depth))-space achieving this value in the corresponding color. The closer to blue the color, the higher the value. Note that the contour for the highest values in higher degree plots "floats in mid-air", implying that there is an optimal depth for learning features of that degree that is not particularly small nor particularly big.

E EXPERIMENTAL DETAILS:

E.1 FIG. 3 Fig. 3 (a), (b) and (c) differ in the set of hyperparameters they involve (to be specified below), but in all of them, we train relu networks against a randomly generated ground truth multilinear polynomial, with input space 128 and L2 loss L(f

) = E x∈ d (f (x) -f * (x)) 2 .

Training We perform SGD with batch size 1000. In each iteration, we freshly sample a new batch, and we train for a total of 100,000 iterations, so the network potentially sees 10 8 different examples. At every 1000 iterations, we validate the current network on a freshly drawn batch of 10,000 examples. We thus record a total of 100 validation losses, and we take the lowest to be the "best validation loss."

Generating the Ground Truth Function The ground truth function f * (x) is generated by first sampling 10 monomials m 1 , . . . , m 10 of degree k, then randomly sampling 10 coefficients a 1 , . . . , a 10 for them. The final function is obtained by normalizing {a i } such that the sum of their squares is 1:

EQUATION

)

Hyperparameters for Fig. 3 (a)

• The learning rate is half the theoretical maximum learning rate 7 1 2 max(µ 0 , µ 1 ) -1

• Ground truth degree k ∈ {0, 1, 2, 3} • Depth ∈ {0, . . . , 10} • activation = relu • σ 2 w = 2 • σ 2 b = 0 • width = 1000

• 10 random seeds per hyperparameter combination

• training last layer (marked "ck"), or all layers (marked "ntk"). In the latter case, we use the NTK parametrization of the MLP (Eq. (MLP)).

Hyperparameters for Fig. 3(b):

• The learning rate is half the theoretical maximum learning rate

1 2 max(µ 0 , µ 1 ) -1 • Ground truth degree k ∈ {0, 1, 2, 3} • Depth ∈ {0, . . . , 10} • activation = relu • σ 2 w = 2 • σ 2 b = 0 • width = 1000

• 100 random seeds per hyperparameter combination

• training last layer weight and bias only 7 Note that, because the L2 loss here is

L(f ) = E x∈ d (f (x) -f * (x)) 2 , the maximum learning rate is λ -1 max = max(µ0, µ1) -1 (see Thm 4.1). If we instead adopt the convention L(f ) = E x∈ d 1 2 (f (x) -f * (x)) 2

, then the maximum learning rate would be 2λ -1 max = 2 max(µ0, µ1) Hyperparameters for Fig. 3(c) • The learning rate ∈ {0.05, 0.1, 0.5}

• Ground truth degree k ∈ {0, 1, . . . , 6} • Depth ∈ {1, . . . , 5} • activation ∈ {relu, erf} • σ 2 w = 2 for relu, but σ 2 w ∈ {1, 2, . . . , 5} for erf • σ 2 b ∈ {0, 1, . . . , 4} • width = 1000 • 1 random seed per hyperparameter combination

• Training all layers, using the NTK parametrization of the MLP (Eq. (MLP))

E.2 MAX LEARNING RATE EXPERIMENTS:

Here we describe the experimental details for the experiments underlying Figs. 5 and 9 .

Theoretical max learning rate For a fixed setup, we compute Φ according to Eq. (CK) (if only last layer is trained) or Eq. (NTK) (if all layers are trained). For ground truth problems where the output is n-dimensional, the theoretical max learning rate is nΦ(0) -1 ; in particular, the max learning rates for MNIST and CIFAR10 are 10 times those for boolean cube, sphere, and Gaussian. This is because the kernel for an multi-output problem effectively becomes

1 n K ⊕n = 1 n   K 0 0 0 . . . 0 0 0 K  

where the 1 n factor is due to the 1 n factor in the scaled square loss

L(f, f * ) = E x∼X 1 n n i=1 (f (x) i - f * (x) i ) 2 . The top eigenvalue for 1 n K ⊕n is just 1 n times the top eigenvalue for K.

Empirical max learning rate For a fixed setup, we perform binary search for the empirical max learning rate as in Algorithm 1.

Preprocessing In Fig. 5 , for MNIST and CIFAR10, we center and project each image onto the sphere

√ dS d-1

, where d = 28 × 28 = 784 for MNIST and d = 3 × 32 × 32 = 3072 for CIFAR10. More precisely, we compute the average image x over the entire dataset, and we preprocess each image x as √ d x-x x-x . In Fig. 9 , there are three different preprocessing schemes. For "no preprocessing," we load the MNIST and CIFAR10 data as is. In "PCA128," we take the top 128 eigencomponents of the data, so that the data has only 128 dimensions. In "ZCA128," we take the top 128 eigencomponents but rotate it back to the original space, so that the data still has dimension d, where d = 28×28 = 784 for MNIST and d = 3 × 32 × 32 = 3072 for CIFAR10.

Hyperparameters:

• Target function: For boolean cube, sphere, and standard Gaussian, we randomly sample a degree 1 polynomial as in Eq. ( 11). For MNIST and CIFAR10, we just use the label in the dataset, encoded as a one-hot vector for square-loss regression.

• Depth ∈ {1, 2, 4, 8, 16} • activation ∈ {relu, erf} • σ 2 w = 2 for relu, but σ 2 w ∈ {1, 2, . . . , 5} for erf • σ 2 b ∈ {1, . . . , 4} • width = 1000

• 1 random seed per hyperparameter combination • Training last layer (CK) or all layers (NTK). In the latter case, we use the NTK parametrization of the MLP (Eq. (MLP)).

F REVIEW OF THE THEORY OF NEURAL TANGENT KERNELS F.1 CONVERGENCE OF INFINITE-WIDTH KERNELS AT INITIALIZATION:

Conjugate Kernel Via a central-limit-like intuition, each unit h l (x) α of Eq. (MLP) should behave like a Gaussian as width n l-1 → ∞, as it is a sum of a large number of roughly independent random variables (Poole et al., 2016; Schoenholz et al., 2017; Yang and Schoenholz, 2017) . The devil, of course, is in what "roughly independent" means and how to apply the central limit theorem (CLT) to this setting. It can be done, however, (Lee et al., 2018; Matthews et al., 2018; Novak et al., 2018) , and in the most general case, using a "Gaussian conditioning" technique, this result can be rigorously generalized to almost any architecture Yang (2019) . In any case, the consequence is that, for any finite set S ⊆ X , {h l α (x)} x∈S converges in distribution to N (0, Σ l (S, S)), as min{n 1 , . . . , n l-1 } → ∞, where Σ l is the CK as given in Eq. (CK).

Neural Tangent Kernel By a slightly more involved version of the "Gaussian conditioning" technique, Yang (2019) also showed that, for any x, y ∈ X ,

∇ θ h L (x), ∇ θ h L (y)

converges almost surely to Θ L (x, y)

as the widths tend to infinity, where Θ l is the NTK as given in Eq. (NTK).

F.2 FAST EVALUATIONS OF CK AND NTK:

For certain φ like relu or erf, V φ and V φ can be evaluated very quickly, so that both the CK and NTK can be computed in O(|X | 2 L) time, where X is the set of points we want to compute the kernel function over, and L is the number of layers. Fact F.1 (Cho and Saul (2009) ). For any kernel K

V relu (K)(x, x ) = 1 2π ( 1 -c 2 + (π -arccos c)c) K(x, x)K(x , x ) V relu (K)(x, x ) = 1 2π (π -arccos c)

where c = K(x, x )/ K(x, x)K(x , x ). Fact F.2 (Neal (1995)). For any kernel K,

V erf (K)(x, x ) = 2 π arcsin K(x, x ) (K(x, x) + 0.5)(K(x , x ) + 0.5) V erf (K)(x, x ) = 4 π (1 + 2K(x, x))(1 + 2K(x , x )) -4K(x, x ) 2 .

Fact F.3. Let φ(x) = exp(x/σ) for some σ > 0. For any kernel K,

V φ (K)(x, x ) = exp K(x, x) + 2K(x, x ) + K(x , x ) 2σ 2 . F.3 LINEAR EVOLUTION OF NEURAL NETWORK UNDER GD

Remarkably, the NTK governs the evolution of the neural network function under gradient descent in the infinite-width limit. First, let's consider how the parameters θ and the neural network function f evolve under continuous time gradient flow. Suppose f is only defined on a finite input space X = {x 1 , . . . , x k }. We will visualize

f (X ) = f (x 1 ) . . . f (x k ) , ∇ f L = ∂L ∂f (x 1 ) . . . ∂L ∂f (x k ) , θ = θ 1 . . . θ n , ∇ θ f = ∂f (x 1 ) ∂θ1 • • • ∂f (x k ) ∂θ1 . . . . . . . . . ∂f (x 1 ) ∂θn • • • ∂f (x k )

∂θn (best viewed in color). Then under continuous time gradient descent with learning rate η,

EQUATION

where

Θ t = ∇ θ f t • ∇ θ f t ∈ R k×k

is of course the (finite width) NTK. These equations can be visualized as

∂ t = -η • , ∂ t = • ∂ t = -η • • = -η •

Thus f undergoes kernel gradient descent with (functional) loss L(f ) and kernel Θ t . This kernel Θ t of course changes as f evolves, but remarkably, it in fact stays constant for f being an infinitely wide MLP (Jacot et al., 2018) :

∂ t f t = -ηΘ • ∇ f L(f t ), (Training All Layers)

where Θ is the infinite-width NTK corresponding to f . A similar equation holds for the CK Σ if we train only the last layer,

∂ t f t = -ηΣ • ∇ f L(f t ). (Training Last Layer) If L is the square loss against a ground truth function f * , then ∇ f L(f t ) = 1 2k ∇ f f t -f * 2 = 1 k (f t -f * )

, and the equations above become linear differential equations. However, typically we only have a training set X train ⊆ X of size far less than |X |. In this case, the loss function is effectively

L(f ) = 1 2|X train | x∈X train (f (x) -f * (x)) 2 , with functional gradient ∇ f L(f ) = 1 |X train | D train • (f -f * ),

where D train is a diagonal matrix of size k × k whose diagonal is 1 on x ∈ X train and 0 else. Then our function still evolves linearly

EQUATION

)

where K is the CK or the NTK depending on which parameters are trained.

F.4 RELATIONSHIP TO GAUSSIAN PROCESS INFERENCE.:

Recall that the initial f 0 in Eq. ( 13) is distributed as a Gaussian process N (0, Σ) in the infinite width limit. As Eq. ( 13) is a linear differential equation, the distribution of f t will remain a Gaussian process for all t, whether K is CK or NTK. Under suitable conditions, it can be shown that (Lee et al., 2019) , in the limit as t → ∞, if we train only the last layer, then the resulting function f ∞ is distributed as a Gaussian process with mean f∞ given by

f∞ (x) = Σ(x, X train )Σ(X train , X train ) -1 f * (X train )

and kernel Var f ∞ given by

Var f ∞ (x, x ) = Σ(x, x ) -Σ(x, X train )Σ(X train , X train ) -1 Σ(X train , x ).

These formulas precisely described the posterior distribution of f given prior N (0, Σ) and data

{(x, f * (x))} x∈X train .

If we train all layers, then similarly as t → ∞, the function f ∞ is distributed as a Gaussian process with mean f∞ given by (Lee et al., 2019 )

f∞ (x) = Θ(x, X train )Θ(X train , X train ) -1 f * (X train ).

This is, again, the mean of the Gaussian process posterior given prior N (0, Θ) and the training data {(x, f * (x))} x∈X train . However, the kernel of f ∞ is no longer the kernel of this posterior, but rather is an expression involving both the NTK Θ and the CK Σ; see Lee et al. (2019) .

In any case, we can make the following informal statement in the limit of large width

Training the last layer (resp. all layers) of an MLP infinitely long, in expectation, yields the mean prediction of the GP inference given prior N (0, Σ) (resp. N (0, Θ)).

G A BRIEF REVIEW OF HILBERT-SCHMIDT OPERATORS AND THEIR SPECTRAL THEORY:

In this section, we briefly review the theory of Hilbert-Schmidt kernels, and more importantly, to properly define the notion of eigenvalues and eigenfunctions. A function K :

X 2 → R is called a Hilbert-Schmidt operator if K ∈ L 2 (X × X ), i.e. K 2 HS def = E x,y∼X K(x, y) 2 < ∞. K 2 HS is known as the Hilbert-Schmidt norm of K. K is called symmetric if K(x, y) = K(y, x) and positive definite (resp. semidefinite) if E x,y∼X f (x)K(x, y)f (y) > 0 (resp. ≥ 0) for all f ∈ L 2 (X ) not a.e. zero.

A spectral theorem (Mercer's theorem) holds for Hilbert-Schmidt operators. Fact G.1. If K is a symmetric positive semidefinite Hilbert-Schmidt kernel, then there is a sequence of scalars λ i ≥ 0 (eigenvalues) and functions

f i ∈ L 2 (X ) (eigenfunctions), for i ∈ N, such that ∀i, j, f i , f j = I(i = j), and K(x, y) = i∈N λ i f i (x)f i (y)

where the convergence is in L 2 (X × X ) norm.

This theorem allows us to speak of the eigenfunctions and eigenvalues, which are important for training and generalization considerations when K is a kernel used in machine learning, as discussed in the main text.

A sufficient condition for K to be a Hilbert-Schmidt kernel in our case (concerning only probability measure on X ) is just that K is bounded. All Ks in this paper satisfy this property.

From this fact easily follows the following lemma. Lemma H.4. Suppose Φ is continuous and has bounded variation on [-1, 1]. Then Φ is also continuous and has bounded variation, and its Fourier Series (on [-2, 2]) converges pointwise to Φ.

Proof. Φ is obviously continuous and has bounded variation as well, and from Fact H.3, we know a periodic continuous function with bounded variation has a pointwise-convergent Fourier Series.

Certainly, T ∆ sends continuous bounded variation functions to continuous bounded variation functions. Because T ∆ e

1 2 πist = e -1 2 πis∆ e 1 2 πist , T ∆ s∈Z Ψ(s)e 1 2 πist = s∈Z Ψ(s)e -1 2 πis∆ e 1 2 πist

whenever both sides are well defined. If Ψ is continuous and has bounded variation then T ∆ Ψ is also continuous and has bounded variation, and thus its Fourier series, the RHS above, converges pointwise to T ∆ Ψ.

Now, observe:

(I -T ∆ ) k (I + T ∆ ) d-k Φ(x) = d r=0 C d-k,k r Φ (x -r∆) (I -T ∆ ) k (I + T ∆ ) d-k Φ(1) = d r=0 C d-k,k r Φ d 2 -r ∆ = µ k

Expressing the LHS in Fourier basis, we obtain Theorem H.5. -2, 2] . (Here i is the imaginary unit here, not an index).

µ k = s∈Z i s (1 -e -1 2 πis∆ ) k (1 + e -1 2 πis∆ ) d-k Φ(s) where Φ(s) = 1 4 2 -2 Φ(t)e -1 2 πist dt = 1 4 1 -1 Φ(t)(e -1 2 πist + (-1) s e 1 2 πist ) dt = 1 2 1 -1 Φ(t) cos( 1 2 πst) dt if s is even -i 2 1 -1 Φ(t) sin( 1 2 πst) dt if s is odd denote the Fourier coefficients of Φ on [

Recovering the values of Φ given the eigenvalues µ 0 , . . . , µ d . Conversely, given eigenvalues µ 0 , . . . , µ d corresponding to each monomial degree, we can recover the entries of the matrix K.

Theorem H.6. For any x, y ∈ d with Hamming distance r,

K(x, y) = Φ d 2 -r ∆ = d k=0 C d-r,r k µ k ,

where C d-r,r k = j=0 (-1) k+j d-r j r k-j as in Eq. (7).

Proof. Recall that for any S ⊆ [d], χ S (x) = x S is the Fourier basis corresponding to S (see Eq. ( 3)).

Then by converting from the Fourier basis to the regular basis, we get -1.0 -0.5 0.5 1.0 If x and y differ on a set T ⊆ [d], then we can simplify the inner sum

Φ d 2 -r ∆ = K(x,

-2 × 10 6 2 × 10 6 4 × 10 6 C 0 (63) (x) C 1 (63) (x) C 2 (63) (x) C 3 (63) (x) C 4 (63) (x) C 8 (63) (x)

Φ d 2 -r ∆ = d k=0 µ k |S|=k (-1) |S∩T | = d k=0 µ k C d-r,r k .

Remark H.7. If we let T be the operator that sends µ • → µ •+1 , then we have the following operator expression

Φ d 2 -r ∆ = [(1 + T ) d-r (1 -T ) r µ] 0

Remark H.8. The above shows that the matrix

C = {C d-r,r k } d k,r=0 satisfies C 2 = 2 d I.

H.2 SPHERE Now let's consider the case when X = √ dS d-1 is the radius-√ d sphere in R d equipped with the uniform measure. Again, because x ∈ X all have the same norm, we will consider Φ as a univariate function with K(x, y) = Φ( x, y / x y ) = Φ( x, y /d).

As is long known (Schoenberg, 1942; Gneiting, 2013; Xu and Cheney, 1992; Smola et al., 2001) , K is diagonalized by spherical harmonics. We review these results briefly below, as we will build on them to deduce spectral information of K on isotropic Gaussian distributions.

Review: spherical harmonics and Gegenbauer polynomials. Spherical harmonics are L 2 functions on S d-1 that are eigenfunctions of the Laplace-Beltrami operator ∆ S d-1 of S d-1 . They can be described as the restriction of certain homogeneous polynomials in R d to S d-1 . Denote by H d-1,(l) the space of spherical harmonics of degree l on sphere S d-1 . Then we have the orthogonal decomposition

L 2 (S d-1 ) ∼ = ∞ l=0 H d-1,(l) . It is a standard fact that dim H d-1,(l) = d-1+l d-1 -d-3+l d-1 .

There is a special class of spherical harmonics called zonal harmonics that can be represented as x → p( x, y ) for specific polynomials p : R → R, and that possess a special reproducing property which we will describe shortly. Intuitively, the value of any zonal harmonics only depends on the "height" of x along some fixed axis y, so a typical zonal harmonics looks like Fig. 16 . The polynomials p must be one of the Gegenbauer polynomials. Gegenbauer polynomials {C (α) l (t)} ∞ l=0 are orthogonal polynomials with respect to the measure (1 -t 2 ) α-1 2 on [-1, 1] (see Fig. 15 for examples), and here we adopt the convention that

EQUATION

Then for each (oriented) axis y ∈ S d-1 and degree l, there is a unique zonal harmonic

Z d-1,(l) y ∈ H d-1,(l) , Z d-1,(l) y (x) def = c -1 d,l C ( d-2 2 ) l ( x, y )

for any x, y ∈ S d-1 , where c d,l = d-2 d+2l-2 . Very importantly, they satisfy the following Fact H.9 (Reproducing property (Suetin) ). For any f ∈ H d-1,(m) ,

E z∼S d-1 Z d-1,(l) y (z)f (z) = f (y)I(l = m) E z∼S d-1 Z d-1,(l) y (z)Z d-1,(m) x (z) = Z d-1,(l) y (x)I(l = m) = c -1 d,l C ( d-2 2 ) l ( x, y )I(l = m)

We also record a useful fact about Gegenbauer polynomials. Fact H.10 (Suetin).

C (α) l (±1) = (±1) l l + 2α -1 l

By a result of Schoenberg (1942) , we have the following eigendecomposition of K on the sphere.

Theorem H.11 (Schoenberg) .

Suppose Φ : [-1, 1] → R is in L 2 ((1 -t 2 ) d-1 2 -1

), so that it has the Gegenbauer expansion

Φ(t) a.e. = ∞ l=0 a l c -1 d,l C ( d-2 2 ) l (t). Then K has eigenspaces H d-1,(l) √ d def = {f (x/ √ d) : f ∈ H d-1,(l) } with corresponding eigenval- ues a l . Since ∞ l=0 H d-1,(l) √ d is an orthogonal decomposition of L 2 ( √ dS d-1

), this describes all eigenfunctions of K considered as an operator on L 2 ( √ dS d-1 ).

For completeness, we include the proof of this theorem in Appendix I.

By Bezubik et al. (2008) , we can express the Gegenbauer coefficients, and thus equivalently the eigenvalues, via derivatives of Φ: Theorem H.12 (Bezubik et al. (2008) ). If the Taylor expansion of Φ at 0,

Φ(t) = ∞ n=0 Φ (n) (0) n! t n ,

is absolutely convergent on the closed interval [-1, 1], then the Gegenbauer coefficients a l in Thm H.11 in dimension d is equal to the absolute convergent series

EQUATION

)

As the dimension d of the sphere tends to ∞, the eigenvalues in fact simplify to the derivatives of Φ:

Theorem H.13. Let K be the CK or NTK of an MLP on the sphere √ dS d-1 . Then K can be expressed as K(x, y) = Φ( x, y /d) for some smooth Φ : [-1, 1] → R. Let a denote K's eigenvalues on the sphere (as in Thm H.11). If we fix and let d → ∞, then lim d→∞ d a = Φ ( ) (0), where Φ ( ) denotes the th derivative of Φ.

This theorem is the same as Thm I.6 except that it concerns the sphere rather than the boolean cube.

Proof. By Thm I.3, Φ's Taylor expansion around 0 is absolutely convergent on [-1, 1], so that the condition of Thm H.12 is satisfied. Therefore, Eq. ( 15) holds and is absolutely convergent. By dominated convergence theorem, we can exchange the limit and the summation, and get

lim d→∞ d l a l = lim d→∞ d l Γ d 2 ∞ k=0 Φ (l+2k) (0) 2 l+2k k!Γ d 2 + l + k = ∞ k=0 Φ (l+2k) (0) lim d→∞ d l Γ d 2 2 l+2k k!Γ d 2 + l + k = ∞ k=0 Φ (l+2k) (0) lim d→∞ d 2 -k (k!) -1 2 -2k = Φ (l) (0)

as desired.

H.3 ISOTROPIC GAUSSIAN Now let's consider X = R d equipped with standard isotropic Gaussian N (0, I), so that K behaves like

Kf (x) = E y∼N (0,I) K(x, y)f (y) = E y∼N (0,I) Φ x, y x y , x 2 d , y 2 d f (y)

for any f ∈ L 2 (N (0, I)). In contrast to the previous two sections, K will essentially depend on the effect of the norms x and y on Φ.

Note that an isotropic Gaussian vector z ∼ N (0, I) can be sampled by independently sampling its direction v uniformly from the sphere S d-1 and sampling its magnitude r from a chi distribution χ d with d degrees of freedom. Proceeding along this line of logic yields the following spectral theorem: Theorem H.14.

A function K : (R d ) 2 → R of the form K(x, y) = Φ x, y x y , x 2 d , y 2 d

forms a positive semidefinite Hilbert-Schmidt operator on L 2 (N (0, I)) iff Φ can be decomposed as

EQUATION

where

• c d,l = d-2 d+2l-2 • C ( d-2

2 ) l (t) are Gegenbauer polynomials as in Appendix H.2, with C

( d-2 2 ) l = 1 -1 C ( d-2 2 ) l (t) 2 (1 -t 2 ) d-1 2 -1 dt denoting the norm of C ( d-2 2 ) l in L 2 ((1 -t 2 ) d-1 2 -1 ).

• and A l are positive semidefinite Hilbert-Schmidt kernels on L 2 ( 1 d χ 2 d ), the L 2 space over the probability measure of a χ 2 d -variable divided by d, and with A l denoting the Hilbert-Schmidt norm of A l .

In addition, K is positive definite iff all A l are.

See Appendix I for a proof. As a consequence, K has an eigendecomposition as follows under the standard Gaussian measure in d dimensions. Corollary H.15. Suppose K and Φ are as in Thm H.14 and K is a positive semidefinite Hilbert-Schmidt operator, so that Eq. ( 16) holds, with Hilbert-Schmidt kernels A l . Let A l have eigendecomposition

A l (q, q ) = ∞ i=0 a li u li (q)u li (q ) (18)

for eigenvalues a li ≥ 0 and eigenfunctions

u li ∈ L 2 ( 1 d χ 2 d ) with E q∼ 1 d χ 2 d u li (q) 2 = 1.

Then K has eigenvalues {a li : l, i ∈ [0, ∞)}, and each eigenvalue a li corresponds to the eigenspace (l) ,

u li ⊗ H d-1,(l) def = u li x 2 d f x x : f ∈ H d-1,

where H d-1,(l) is the space of degree l spherical harmonics on the unit sphere S d-1 of ambient dimension d.

For certain simple F , we can obtain {A l } l≥0 explicitly. For example, suppose K is degree-s positive-homogeneous, in the sense that, for a, b > 0, K(ax, by) = (ab) s K(x, y).

This happens when K is the CK or NTK of an MLP with degree-s positive-homogeneous. Then it's easy to see that Φ(t, q, q ) = (qq ) s Φ(t) for some Φ : [-1, 1] → R, and

Φ(t, q, q ) = ∞ l=0 (qq ) s a l c -1 d,l C ( d-2 2 ) l (t)

where {a l } l are the Gegenbauer coefficients of Φ,

Φ(t) = ∞ l=0 a l c -1 d,l C ( d-2 2 ) l (t).

We can then conclude with the following theorem. Theorem H.16. Suppose K : (R d ) 2 → R is a kernel given by

K(x, y) = R( x /d)R( x /d) Φ( x, y / x y ) for some functions R : [0, ∞) → R, Φ : [-1, 1] → R. Let Φ(t) = ∞ l=0 a l c -1 d,l C ( d-2 2 ) l (t)

be the Gegenbauer expansion of Φ. Also define

λ def = E q∼ 1 d χ 2 d R(q) 2 .

Then over the standard Gaussian in R d , K has the following eigendecomposition

• For each l ≥ 0, λ -1 R ⊗ H d-1,(l) = {λ -1 R( x 2 /d)f (x/ x ) : f ∈ H d-1,(l) }

is an eigenspace with eigenvalue λ 2 a l .

• For any

S ∈ L 2 ( 1 d χ 2 d ) that is orthogonal to R, i.e. E q∼ 1 d χ 2 d S(q)R(q) = 0, the function S( x 2 /d)f (x/ x ) for any f ∈ L 2 (S d-1

) is in the null space of K.

Proof. The A l in Eq. ( 16) for K are all equal to

A l (q, q ) = λ 2 R(q) λ R(q ) λ .

This is a rank 1 kernel (on L 2 ( 1 d χ 2 d )), with eigenfunction R/λ and eigenvalue λ 2 . The rest then follows straightforwardly from Thm H.11.

A common example where Thm H.16 applies is when K is the CK of an MLP with relu, or more generally degree-s positive homogeneous activation functions, so that the R in Thm H.16 is a polynomial.

In general, we cannot expect K can be exactly diagonalized in a natural basis, as {A l } l≥0 cannot even be simultaneously diagonalizable. We can, however, investigate the "variance due to each degree of spherical harmonics" by computing

EQUATION

which is the coefficient of Gegenbauer polynomials in

EQUATION

)

Proposition H.17. Assume that Φ(t, q, q ) is continuous in q and q . Suppose for any d and any t ∈ [-1, 1], the random variable Φ(t, q, q ) with q, q ∼ d -1 χ 2 d has a bound |Φ(t, q, q )| ≤ Y for some random variable Y with E |Y | < ∞. Then for every t ∈ [-1, 1], lim d→∞ | Φd (t) -Φ(t, 1, 1)| = 0.

Proof. By the strong law of large number, d -1 χ 2 d converges to 1 almost surely. Because Φ(t, q, q ) is continuous in q and q , almost surely we have Φ(t, q, q ) → Φ(t, 1, 1) almost surely. Since Φ is bounded by Y , by dominated convergence, we have Φd (t) -Φ(t, 1, 1) = E q,q ∼d -1 χ 2 d Φ(t, q, q ) -Φ(t, 1, 1) → 0 as desired.

In the final part of this section, we show that in the limit of large input dimension d, the top eigenvalues of K over the standard Gaussian can be easily described (Thm H.19) . First, we need to specify some conditions on Φ. Definition H.18. Φ :

[-1, 1] × R + × R + → R is called reasonable if

• There is a Taylor expansion in t,

EQUATION

that is absolutely convergent on (t, q, q ) ∈ [-1, 1] × R + × R + , and such that each B is smooth (C ∞ ) on (q, q ) ∈ R + × R + .

• for all (t, q, q ) ∈ [-1, 1] × R + × R + , and for any l ∈ [0, ∞), we have |B l (t, q, q )| ≤ C(1 + |q| r + |q | r ) for some constants C, r > 0 that may depend on l but not on t, q, q . Theorem H.19. Suppose K is a the CK or NTK of an MLP with polynomially bounded activation function. For every degree l, K over N (0, I d ) has an eigenvalue a l0 at spherical harmonics degree l (in the sense of Cor H.15) with

a l0 ∈ E q,q ∼ 1 d χ 2 d A l (q, q ), E q∼ 1 d χ 2 d A l (q, q) ,

where A l is as in Eq. (18). Furthermore,

lim d→∞ d l E q,q ∼ 1 d χ 2 d A l (q, q ) = lim d→∞ d l E q∼ 1 d χ 2 d A l (q, q) = Φ (l) (0, 1, 1).

Here Φ (l) is the lth derivative of Φ(t, q, q ) against t.

Proof. By Lem H.20 below, Φ is reasonable. Let a l = E q∼ 1 d χ 2 d A l (q, q) as in Eq. ( 19), and let b l def = E q ∼ 1 d χ 2 d A l (q, q ). Let a li be the ith largest eigenvalue of A l as in Eq. ( 18), with a l0 being the largest. Note that all of these quantities a l , b l , a li depend on d, but we suppress this notationally. We seek to prove the following claims:

1. a l0 ≤ a l 2. a l0 ≥ b l 3. d l b l → Φ (l) (0, 1, 1) 4. d l a l → Φ (l) (0, 1, 1)

Claim 1: a l0 ≤ a l . First note that a l is the trace of the operator A l , so that a l = ∞ i=0 a li . Thus, any eigenvalue a li is at most a l .

Claim 2: a l0 ≥ b l . Now, by Min-Max theorem, the largest eigenvalue a l0 of A l is equal to a l0 = sup f E q,q f (q)f (q )A l (q, q ) E q f (q) 2 where 0 = f ∈ L 2 ( 1 d χ 2 d ) and q, q ∼ 1 d χ 2 d . If we set f (q) = 1 identically, then we get a l0 ≥ E q,q A l (q, q ) = b l , as desired.

Claims 3 and 4. Now note that we have the following equalities in the Hilbert space L 2 ((1-t 2 ) d-1 2 -1 ), because of the absolute convergence in Eq. ( 17):

EQUATION

2 ) (t).

Thus, by Eq. ( 15),

a l = Γ d 2 ∞ k=0 Φ(l+2k) (0) 2 l+2k k!Γ d 2 + l + k .

By the absolute convergence of Eq. ( 21), differentiation commutes with expectation: 20) approximates Φ very well. We show for 3 different erf kernels that the function Φ defining K as an integral operator on the sphere is well-approximated by Φd when d is moderately large (d ≥ 32 seems to work well). This suggests that the eigenvalues of K as an integral operator on the standard Gaussian should approximate those of K as an integral operator on the sphere. In high dimension d, the eigenvalues are very close for the kernel over the boolean cube, the sphere, and standard Gaussian. We plot the eigenvalues µ k of the erf CK, with σ 2 w = 2, σ 2 b = 0.001, depth 2, over the boolean cube, the sphere, as well as kernel on the sphere induced by Φd (Eq. ( 20)). We do so for each degree k ≤ 5 and for dimensions d = 16, 32, 64, 128. We see that by dimension d = 128, the eigenvalues shown are already very close to each other.

EQUATION

erf CK σ w 2 =2,σ b 2 =0.001,L=2 • • • • • • • • • • • • • • • • • • • • • • • • ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯ ⨯

If we fix k and let the input dimension d → ∞, then the fractional variance of degree k converges to

(k!) -1 Φ (k) (0)/Φ(1) = (k!) -1 Φ (k) (0) j≥0 (j!) -1 Φ (j) (0)

for all three input distributions d , √ dS d-1 , and N (0, I d ).

Practically speaking, only the top eigenvalues matter. Observe that, in the empirical and theoretical results above, we only verify that the top eigenvalues (µ k , a k , or a k0 for k small compared to d) are close when d is large. While this result may seem very weak at face value, in practice, the closeness of these top eigenvalues is the only thing that matters. Indeed, in machine learning, we will only ever have a finite number, say N , of training samples to work with. Thus, we can only use a finite N × N submatrix of the kernel K. This submatrix, of course, has only N eigenvalues. Furthermore, if these samples are collected in an iid fashion (as is typically assumed), then these eigenvalues approximate the largest N eigenvalues (top N counting multiplicity) of the kernel K itself (Tropp, 2015) . As such, the smaller eigenvalues of K can hardly be detected in the training sample, and cannot affect the machine learning process very much.

Let's discuss a more concrete example: Fig. 18 shows that the boolean cube eigenvalues µ k are very close to the sphere eigenvalues a k for all k ≤ 5. Over the boolean cube, µ 0 , . . . , µ 5 cover eigenspaces of total dimension d 0 + • • • + d 5 , which is 275,584,033 when d = 128. We need at least that many samples to be able to even detect the eigenvalue µ 6 and the possible difference between it and the sphere eigenvalue a 6 . But note in comparison, Imagenet, one of the most common large datasets in use today, has only about 15 million samples, 10 times less than the number above.

Additionally, in this same comparison, d = 128 dramatically pales compared to Imagenet's input dimension 3 × 256 2 = 196608, and even to the those of the smaller common datasets like CIFAR10 (d = 3 × 32 2 = 3072) and MNIST (d = 24 2 = 576) -if we were to even use the input dimension of MNIST above, then µ 0 , . . . , µ 5 would cover eigenspaces of 523 billion total dimensions! Hence, it is quite practically relevant to consider the effect of large d on the eigenvalues, while keeping k small. Again, we remark that even when one fixes k and increases d, the dimension of eigenspaces affected by our limit theorems Thms H.13, H.19 and I.6 increases like Θ(d k ), which implies one needs an increasing number Θ(d k ) of training samples to see the difference of eigenvalues in higher degrees k.

Finally, from the perspective of fractional variance, we also can see that only the top k spectral closeness matters: By Cor H.21, for any > 0, there is a k such that the total fractional variance of degree 0 to degree k (corresponding to eigenspaces of total dimension Θ(d k )) sums up to more than 1 -, for the cube, the sphere, and the standard Gaussian simultaneously, when d is sufficiently large. This is because the asymptotic fractional variance is completely determined by the derivatives of Φ at t = 0.

I OMITTED PROOFS:

EQUATION

where 1 = (1, . . . , 1) ∈ d . This definition of µ |S| does not depend on the choice S, only on the cardinality of S. These are all of the eigenfunctions of K by dimensionality considerations.8 

Proof. We directly verify Kχ S = µ |S| χ S . Notice first that

K(x, y) = Φ( x, y ) = Φ( x y, 1 ) = K(x y, 1)

where is Hadamard product. We then calculate Kχ S (y

) = E x K(y, x)x S = E x K(1, x y)(x y) S y S .

Here we are using the fact that x and y are boolean to get x S = (x y) S y S . Changing variable z def = x y, we get

Kχ S (y) = y S E z K(1, z)z S = µ |S| χ S (y)

as desired. Finally, note that µ |S| is invariant under permutation of [d], so indeed it depends only on the size of S.

Theorem H.11 (Schoenberg) .

Suppose Φ : [-1, 1] → R is in L 2 ((1 -t 2 ) d-1 2 -1

), so that it has the Gegenbauer expansion

Φ(t) a.e. = ∞ l=0 a l c -1 d,l C ( d-2 2 ) l (t). Then K has eigenspaces H d-1,(l) √ d def = {f (x/ √ d) : f ∈ H d-1,(l) } with corresponding eigenval- ues a l . Since ∞ l=0 H d-1,(l) √ d is an orthogonal decomposition of L 2 ( √ dS d-1

), this describes all eigenfunctions of K considered as an operator on L 2 ( √ dS d-1 ).

EQUATION

where

EQUATION

EQUATION

∆}, where ∆ = 2 d , we can collect like terms in Eq. ( 4) and obtain

µ k = 2 -d d r=0 x has r '-1's k i=1 x i Φ d 2 -r ∆

which can easily be shown to be equal to

µ k = 2 -d d r=0 C d-k,k r Φ d 2 -r ∆ ,

proving Eq. ( 6) in the claim. Finally, observe that C d-k,k r is also the coefficient of x r in the polynomial (1 -x) k (1 + x) d-k . Some operator arithmetic then yields Eq. ( 5).

Theorem H.14. A function K : (R d ) 2 → R of the form K(x, y) = Φ

x, y x y , x 2 d , y 2 d forms a positive semidefinite Hilbert-Schmidt operator on L 2 (N (0, I)) iff Φ can be decomposed as

EQUATION

where

• c d,l = d-2 d+2l-2 • C ( d-2

2 ) l (t) are Gegenbauer polynomials as in Appendix H.2, with C

( d-2 2 ) l = 1 -1 C ( d-2 2 ) l (t) 2 (1 -t 2 ) d-1 2 -1 dt denoting the norm of C ( d-2 2 ) l in L 2 ((1 -t 2 ) d-1

2 -1 ).

• and A l are positive semidefinite Hilbert-Schmidt kernels on L 2 ( 1 d χ 2 d ), the L 2 space over the probability measure of a χ 2 d -variable divided by d, and with A l denoting the Hilbert-Schmidt norm of A l .

In addition, K is positive definite iff all A l are.

Proof. Note that an isotropic Gaussian vector z ∼ N (0, I) can be sampled by independently sampling its direction v uniformly from the sphere S d-1 and sampling its magnitude r from a chi distribution χ d with d degrees of freedom. In the following, we adopt the following notations x, y ∈ R d , q = x 2 /d, q = y 2 /d, v = x/ x , v = y/ y Then, by the reasoning above,

Kf (x/ √ d) = E v ∼S d-1

q ∼d -1 χ 2 d Φ ( v, v , q, q ) f ( q v).

Here f ∈ L 2 (N (0, I/d)) (so that f (•/ √ d) ∈ L 2 (N (0, I))) and d -1 χ 2 d is the distribution of a χ 2 d random variable divided by d. Because of this decomposition of N (0, I) into a product distribution of direction and magnitude, its space of L 2 functions naturally decomposes into a tensor product of corresponding L 2 spaces L 2 (N (0, I)) = L 2 (S d-1 ) ⊗ L 2 (d -1 χ 2 d ). where every f ∈ L 2 (N (0, I)) can be written as a sum

f (x) = ∞ l=0 R l (q)P l (v)

where q = x 2 /d, v = x/ x as above, P l ∈ H d-1,(l) is a spherical harmonic of degree l, and

R l ∈ L 2 (d -1 χ 2 d ) (i.e. R l (•/d) ∈ L 2 (χ 2 d )).

Here, the equality is understood as a convergence of the RHS partial sums in the Hilbert space L 2 (S d-1 ) ⊗ L 2 (d -1 χ 2 d ). Likewise, assuming K is Hilbert-Schmidt, then its Hilbert-Schmidt norm (measured against the uniform distribution over the sphere) is bounded:

K 2 HS = E v,v ∼S d-1 q,q ∼d -1 χ 2 d Φ( v, v , q, q ) 2 = E q,q ∼d -1 χ 2 d 1 -1 Φ(t, q, q ) 2 (1 -t 2 ) d-1

2 -1 dt.

Thus Φ resides in the tensor product space

Φ ∈ F def = L 2 ((1 -t 2 ) d-1 2 -1 ) ⊗ L 2 (d -1 χ 2 d ) ⊗ L 2 (d -1 χ 2 d )

and therefore can be expanded as

Φ(t, q, q ) = ∞ l=0 A l (q, q )c -1 d,l C ( d-2 2 ) l (t)

where C

( d-2

2 ) l (t) are Gegenbauer polynomials as in Appendix H.2 and A l ∈ L 2 (d -1 χ 2 d ) ⊗2 . By Lem I.1 below, K being Hilbert-Schmidt implies that each A l is, as well. Furthermore, since K 2 HS = Φ 2 F is finite, we have

Φ 2 F = ∞ l=0 A l 2 c -2 d,l C ( d-2 2 ) l 2 < ∞.

Here, A l = E q,q ∼ 1 d χ 2 d A l (q, q ) 2 is the Hilbert-Schmidt norm of A l (i.e. its norm in L 2 (d -1 χ 2 d ) ⊗2 ), and C

( d-2 2 ) l = 1 -1 C ( d-2 2 ) l (t) 2 (1 -t 2 ) d-1 2 -1 dt is the norm of C ( d-2 2 ) l in L 2 ((1 -t 2 ) d-1

2 -1 ). Simplifying according to Eq. ( 14) yields the equality in the claim. Conversely, if each A l is Hilbert-Schmidt satisfying Eq. ( 17), then K is obviously a Hilbert-Schmidt kernel as it has finite Hilbert-Schmidt norm.

Lemma I.1. For each l, A l is a positive semidefinite Hilbert-Schmidt kernel. It is positive definite if K is.

Proof. With q = x 2 /d, v = x/ x as above, let f (x/ √ d) = f ( √ qv) = R m (q)P m (v) for some degree m nonzero spherical harmonics P m ∈ H d-1,(m) and some scalar function R m ∈ L 2 (d -1 χ 2 d ) that is not a.e. zero. We have

Kφ(x/ √ d) = E v ∼S d-1 q ∼d -1 χ 2 d Φ( v, v , q, q )f ( q v) = E v ∼S d-1 q ∼d -1 χ 2 d R m (q )P m (v ) ∞ l=0 A l (q, q )c -1 d,l C ( d-2 2 ) l ( v, v ) = E v ∼S d-1 q ∼d -1 χ 2 d R m (q )P m (v ) ∞ l=0 A l (q, q )Z d-1,(l) v (v ) = P m (v) E q ∼d -1 χ 2 d A m (q, q )R m (q ).

Therefore,

E x∼N (0,I) f (x)Kf (x/ √ d) = E v∼S d-1 P m (v) 2 E q,q ∼d -1 χ 2 d R m (q)A m (q, q )R m (q )

is nonnegative, and is positive if K is positive definite, by the assumption above that f is not a.e. zero. Since E P m (v) 2 > 0 as P m = 0, we must have E q,q ∼d -1 χ 2 d R m (q)A m (q, q )R m (q ) ≥ 0 (or > 0 if K is positive definite).

This argument holds for any R m ∈ L 2 (d -1 χ 2 d ) that is not a.e. zero, so this implies that A l is positive semidefinite, and positive definite if K is so. where Φ (k) denotes the kth derivative of Φ.

An immediate consequence, using the fact that the degree k eigenspace has dimension d k ∼ d k /k! for large d, is Theorem 5.1 (Asymptotic Fractional Variance). Let K be the CK or NTK of an MLP on a boolean cube d . Then K can be expressed as K(x, y) = Φ( x, y /d) for some analytic function Φ : R → R.

If we fix k and let the input dimension d → ∞, then the fractional variance of degree k converges to

(k!) -1 Φ (k) (0)/Φ(1) = (k!) -1 Φ (k) (0)

j≥0 (j!) -1 Φ (j) (0) where Φ (k) denotes the kth derivative of Φ.

Let's first give some intuition for why Thm I.6 should be true. By Eqs. ( 8) and (5),

µ k = 1 + T ∆ 2 d-k 1 -T ∆ 2 k Φ(1) = 1 2 d d-k r=0 d -k r Φ [k] (1 -r∆)

where Φ [k] = (1 -T ∆ ) k Φ is the kth backward finite difference with step ∆ = 2/d. Approximating the finite difference with derivative, we thus would expect that, as suggested by Lem I.8, i=1 X i , where X i is the Bernoulli variable taking ±1 value with half chance each. This random variable converges almost surely to the delta distribution at 0, by law of large numbers. Therefore, we would expect

Φ [k] (x) ≈ ∆ k Φ (k) (x) = (2/d) k Φ (k) (x

µ k ∼ (1/d) k Φ (k) (0) as d → ∞.

There is a single difficulty when trying to formalize this intuition. One is the possibility that the kth derivative Φ (k) does not exist at the endpoints 1 and -1 (note that it must exist in the interior, because by Thm I.3, Φ is analytic on (-1, 1)). In this case, we must show that the portion of the interval [-1, 1] near the endpoints contributes exponentially little mass to the probability distribution of the binomial variable B, that it suppresses any blowup that can happen at the edge.

We formalize this reasoning in the proof below.

Proof. We first prevent any blowup that may happen at the edge. Let Φ [k] be the kth backward difference of Φ with step size ∆ = 2/d, as in Lem I.8. First note the trivial bound

Φ [k] (x) = k s=0 (-1) s k s Φ(x -s∆) ≤ k s=0 k s Φ(x -s∆) ≤ 2 k Φ(x) ≤ 2 k Φ(1)

since Φ is nondecreasing by Lem I.7. Then for any R ∈ [0, (d -k)/2 -1], k] (1 -r∆).

d k µ k = d k 2 d d-k r=0 d -k r Φ [k] (1 -r∆) = d k 2 d d-k-R-1 r=R+1 d -k r Φ [k] (1 -r∆) + d k 2 d R r=0 + d-k r=d-k-R d -k r Φ [

Now, in the second term, Φ [k] (1 -r∆) ≤ 2 k Φ(1) as above, so that, by the binomial coefficient entropy bound (Fact I.9),

EQUATION

where p = R/(d -k). If we choose R = p(d -k) for a fixed p < 1/10, then H(p) < 1, and ( 28) is decreasing exponentially fast to 0 with d.

Now we formalize the law of large number intuition. It then suffices to show that k] (1 -r∆) → Φ (k) (0).

d k 2 d d-k-R-1 r=R+1 d -k r Φ [

We will do so by presenting an upper and a lower bound which both converge to this limit.

We first discuss the upper bound. By Lem I.8, k) (1 -r∆).

EQUATION

:

The code for computing the eigenvalues and for reproducing the plots of this paper is available at github. com/jxVmnLgedVwv6mNcGCBy/NNspectra, which will be open sourced upon publication.

SGD with learning rate α in this parametrization is roughly equivalent to SGD with learning rate α/width in the standard parametrization with Glorot initialization; seeLee et al. (2018)

In cases when X is finite, K can be also thought of as a big matrix and f as a vector -but do not confuse Kf with their multiplication! If we use • to denote matrix multiplication, then the operator application Kf is the same as the matrix multiplication K • D • f where D is the diagonal matrix encoding the probability values of each point in X .

Readers familiar with boolean Fourier analysis may be reminded of the noise operator Tρ, ρ ≤ 1 (O'Donnell, 2014, Defn 2.46). In the language of this work, Tρ is a neural kernel with eigenvalues µ k = ρ k .

Valle-Pérez et al. (2018) actually performed their experiments over the {0, 1} 7 cube, not the {±1} 7 cube we are using here. This does not affect our conclusion. See Appendix J for more discussion

Note that this is the max learning rate of the infinite-width neural network evolving in the NTK regime, but not necessarily the max learning rate of the finite-wdith neural network, as a larger learning rate just means that the network no longer evolves in the NTK regime.

Readers familiar with boolean Fourier analysis may be reminded of the noise operator Tρ, ρ ≤ 1 (O'Donnell, 2014, Defn 2.46). In the language of this work, Tρ is a neural kernel with eigenvalues µ k = ρ k .

Figures and Tables:

Figure1: The "simplicity bias" is not so simple. (a) FollowingValle-Pérez et al. (2018), we sample 10 4 boolean functions {±1} 7 → {±1} as follows: for each combination of nonlinearity, weight variance σ 2 w , and bias variance σ 2 b (as used in Eq. (MLP)), we randomly initialize a network of 2 hidden layers, 40 neurons each. Then we threshold the function output to a boolean output, and obtain a boolean function sample. We repeat this for 10 4 random seeds to obtain all samples. Then we sort the samples according to their empirical probability (this is the x-axis, rank), and plot their empirical probability (this is the y-axis, probability). The high values at the left of the relu curve indicates that a few functions get sampled repeatedly, while this is less true for erf. For erf and σ 2 w = 4, no function got sampled more than once. (b) For different combination of nonlinearity, σ 2 w , σ 2 b , and depth, we study the eigenvalues of the corresponding CK. Each CK has 8 different eigenvalues µ 0 , . . . , µ 7 corresponding to homogeneous polynomials of degree 0, . . . , 7. We plot them in log scale against the degree. Note that for erf and σ b = 0, the even degree µ k vanish. See main text for explanations.

Figure 2: The depth maximizing degree k fractional variance increases with k for both relu and erf. For relu (a) and erf (b), we plot for each degree k the depth such that there exists some combination of other hyperparameters (such as σ 2b or σ 2 w ) that maximizes the degree k fractional variance. For both relu, σ 2 b = 0 maximizes fractional variance in general, and same holds for erf in the odd degrees (see Appendix D), so we take a closer look at this slice by plotting heatmaps of fractional variance of various degrees versus depth for relu (c) and erf (d) NTK, with bright colors representing high variance. Clearly, we see the brightest region of each column, corresponding to a fixed degree, moves up as we increase the degree, barring for the even/odd degree alternating pattern for erf NTK. The pattern for CKs are similar and their plots are omitted.

Figure 3: (a) We train relu networks of different depths against a ground truth polynomial on 128

Figure4: Across nonlinearities and hyperparameters, NTK tends to have higher fraction of variance attributed to higher degrees than CK. In (a), we give several examples of the fractional variance curves for relu CK and NTK across several representative hyperparameters. In (b), we do the same for erf CK and NTK. In both cases, we clearly see that, while for degree 0 or 1, the fractional variance is typically higher for CK, the reverse is true for larger degrees. In (c), for each degree k, we plot the fraction of hyperparameters where the degree k fractional variance of NTK is greater than that of CK. Consistent with previous observations, this fraction increases with the degree.

and later Allen-Zhu et al. (2018a;c;b); Du et al. (2018); Arora et al. (2019b); Zou et al. (

Figure 6: Optimal depths exist over the standard Gaussian N (0, I d ) and the uniform distribution over the sphere √ dS d-1 as well.Here we use the exact same experimental setup as Fig.3(b) (see Appendix E for details) except that the input distribution is changed from uniform over the boolean cube d to standard Gaussian N (0, I d ) (solid lines) and uniform over the sphere √ dS d-1 (dashed lines), where d = 128. We also compare against the results over the boolean cube from Fig.3(b), which are drawn with dotted lines. Colors indicate the degrees of the ground truth polynomial functions. The best validation loss for degree 0 to 2 are all very close no matter which distribution the input is sampled from, such that the curves all sit on top of each other. For degree 3, there is less precise agreement between the validation loss over the different distributions, but the overall trend is unmistakably the same. We see that for networks deeper or shallower than the optimal depth, the loss monotonically increases as the depth moves away from the optimum.

Figure7: Optimal depths exist over realistic distributions of MNIST and CIFAR10. Here, we trained relu networks with σ 2 w = 2, σ 2 b = 0 for all depths from 0 to 10. We used SGD with learning rate 10 and batch size 256, and trained until convergence. We record the best test error throughout the training procedure for each depth. For each configuration, we repeat the randomly initialization and training for 10 random seeds to estimate the variance of the best test error. The rows demonstrate the best test error over the course of training on CIFAR10 and MNIST, and the columns demonstrate the same for training only the last layer or training all layers. As one can see, the best depth when training only the last layer is 1, for both CIFAR10 and MNIST. The best depth when training all layers is around 5 for both CIFAR10 and MNIST. Performance monotically decreases for networks shallower or deeper than the optimal depth. Note that we have reached the SOTA accuracy for MLPs reported inLee et al. (2018) on CIFAR10, and within 1 point of their accuracy on MNIST.

Figure 8: Just like over the boolean cube: Over the sphere √ dS d-1 and the standard Gaussian N (0, I d ), training only the last layer is better for learning low degree polynomials, but training all layers is better for learning high degree polynomials. Here we use the exact same experimental setup as Fig. 3(c) (see Appendix E for details) except that the input distribution is changed from uniform over the boolean cube d to standard Gaussian N (0, I d ) (left) and uniform over the sphere √ dS d-1 (right), where d = 128.

Figure 10: 2D contour plots of how fractional variance of each degree varies with σ 2 b and depth, fixing σ 2 w = 2, for relu CK and NTK. For each degree k, and for each selected fractional variance value, we plot the level curve of (depth, σ 2 b ) achieving this value. The color indicates the fractional variance, as given in the color bars.

Figure 11: 2D contour plots of how fractional variance of each degree varies with σ 2w and depth, for different slices of σ 2 b , for erf NTK. These plots essentially show slices of the NTK 3D contour plots in Fig.13. For σ b = 0, µ k for all even degrees k are 0, so we omit the plots. Note the rapid change in the shape of the contours for odd degrees, going from σ 2 b = 0 to σ 2 b = 0.1. This is reflected in Fig.13as well.

Figure 12: 2D contour plots of how fractional variance of each degree varies with σ 2w and depth, for different slices of σ 2 b , for erf CK. These plots essentially show slices of the CK 3D contour plots in Fig.13. For σ b = 0, µ k for all even degrees k are 0, so we omit the plots. Note the rapid change in the shape of the contours for odd degrees, going from σ 2 b = 0 to σ 2 b = 0.1. This is reflected in Fig.13as well.

y) for any x, y ∈ d with Hamming distance r = d k=0 µ k |S|=k χ S (x)χ S (y).

Figure 15: Examples of Gegenbauer Polynomials for d = 128 (or α = 63).

Figure 16: Visualization of a zonal harmonic, which depends only on the "height" of the input along a fixed axis. Color indicates function value.

Figure 17: In high dimension d, Φd as defined in Eq. (20) approximates Φ very well. We show for 3 different erf kernels that the function Φ defining K as an integral operator on the sphere is well-approximated by Φd when d is moderately large (d ≥ 32 seems to work well). This suggests that the eigenvalues of K as an integral operator on the standard Gaussian should approximate those of K as an integral operator on the sphere.

Figure18: In high dimension d, the eigenvalues are very close for the kernel over the boolean cube, the sphere, and standard Gaussian. We plot the eigenvalues µ k of the erf CK, with σ 2 w = 2, σ 2 b = 0.001, depth 2, over the boolean cube, the sphere, as well as kernel on the sphere induced by Φd (Eq. (20)). We do so for each degree k ≤ 5 and for dimensions d = 16, 32, 64, 128. We see that by dimension d = 128, the eigenvalues shown are already very close to each other.

Consider any σ > 0 and any φ : R → R square-integrable against N (0, σ 2 ). Then the functionφ : [-1, 1] → [-1, 1], φ(c) def = E φ(x)φ(y) E φ(x) 2 , where (x, y) ∼ N 0, σ 2 σ 2 c σ 2 c σ 2 ,has a Taylor series expansion around 0φ(c) = a 0 + a 1 c + a 2 c 2 + • • • (27)with the properties that a i ≥ 0 for all i and i a i = φ(1) = 1, so that Eq. (27) is absolutely convergent on c ∈ [-1, 1].Proof. Since the denominator of φ doesn't depend on c, it suffices to prove this Taylor expansion exists for its numerator. Let φ(c)def = φ(σc). Then E φ(x)φ(y) : (x, y) ∼ N 0, σ 2 σ 2 c σ 2 c σ 2 = E φ(x) φ(y) : (x, y) ∼ N 0, 1 c c 1 By Fact I.5, this is just b 2 0 + b 2 1 c + b 2 2 c 2 + • •• where b i are the Hermite coefficients of φ. Since φ ∈ L 2 (N (0, σ 2 )),

(O'Donnell (2014)). For any φ, ψ ∈ L 2 (N (0, 1)),E φ(x)ψ(y) : (x, y) ∼ N 0, 1 c c 1 = a 0 b 0 + a 1 b 1 c + a 2 b 2 c 2 + • • •where a i and b i are respectively the Hermite coefficients of φ and ψ. Fixing k, taking the d → ∞ limit In this subsection, we prove that µ k ∼ d -k as d → ∞ with k fixed. More precisely, Theorem I.6. Let K be the CK or NTK of an MLP on a boolean cube d . Then K can be expressed as K(x, y) = Φ( x, y /d) for some Φ : [-1, 1] → R. If we fix k and let d → ∞, then lim d→∞ d k µ k = Φ (k) (0),

), when d is large, where Φ (k) is the kth derivative of Φ.

Peer review (iclr2020):
Updates: Thanks for the updates. I find the new theoretical results interesting and potentially useful, which shows, in the large setting, spectrums of CKs/NTKs for boolean cube, sphere and isotropic Gaussian are closed to each other in some sense. Thus, I raise my score to weakly accepted but lower down my confidence level since I am not that familiar with Boolean cube literature. ------------------------------------------------------ The study of extremely over-parameterized networks (i.e. infinitely width networks) has become one of the most active research directions in theory deep learning. The key objects in understanding such networks are the conjugate kernel [1, 2] (CK defined in the paper) and the Neural tangent kernels [3] (NTK). The CK characterizes how the network looks like at initialization (connection to Gaussian processes as well) and the NTK is very useful to characterize the gradient descent training dynamics of large width networks in the kernel regime. Understanding properties of such kernels, in particular, their spectra distribution and eigenspace, could be potentially an important step towards a finer-gained understanding of generalization in neural networks. The main contribution of this paper is the development of the spectral theory of CK and NTK on boolean cube (similar or weaker results on uniform distribution in spheres and Gaussian distribution in R^n). More precisely, the authors show that, over the space of boolean cube, the CK/NTK could be diagonalized using the Fourier basis and the eigenvalues depend only on the frequency (i.e. the degree of the monomials); Thm 3.1. The authors also develop some computation tools to compute the spectra; Lemma 3.2. Using the tools developed in this paper, the authors are able to clarify some of the interesting observations found by other researchers. Most noticeably, the authors show that the observation in [4] *neural network is biased towards simple functions* is NOT universal. Whether this statement is correct or not depends heavily on the choice of activation function (e.g. Relu v.s. Erf) and hyper-parameters (e.g. weight variance, depths). There are also some other interesting empirical findings: the optimal depth of a neural network depends on the complexity (i.e. degree in the boolean cube setting) of the function to learn, CK (i.e. training only the last layer) tends to be more useful for learning less complex functions, etc. Overall, this is a nice paper. I am leaning for a weakly accept. [1] Amit Daniely, Roy Frostig, and Yoram Singer. Toward Deeper Understanding of Neural Networks: The Power of Initialization and a Dual View on Expressivity. arXiv:1602.05897 [cs, stat], February 2016. [2] Jaehoon Lee, Yasaman Bahri, Roman Novak, Sam Schoenholz, Jeffrey Pennington, and Jascha Sohl-dickstein. Deep Neural Networks as Gaussian Processes. In International Conference on Learning Representations, 2018. [3] Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural Tangent Kernel: Convergence and Generalization in Neural Networks. arXiv:1806.07572 [cs, math, stat], June 2018. 00000 [4] Guillermo Valle-Pérez, Chico Q. Camargo, and Ard A. Louis. Deep learning generalizes because the parameter-function map is biased towards simple functions. arXiv:1805.08522 [cs, stat], May 2018.