Deep Equals Shallow for ReLU Networks in Kernel Regimes

Alberto Bietti, Francis Bach

Introduction

The question of which functions can be well approximated by neural networks is crucial for understanding when these models are successful, and has always been at the heart of the theoretical study of neural networks (e.g., Hornik et al., 1989; Pinkus, 1999). While early works have mostly focused on shallow networks with only two layers, more recent works have shown benefits of deep networks for approximating certain classes of functions (Eldan & Shamir, 2016; Mhaskar & Poggio, 2016; Telgarsky, 2016; Daniely, 2017; Yarotsky, 2017; Schmidt-Hieber et al., 2020). Unfortunately, many of these approaches rely on constructions that are not currently known to be learnable using efficient algorithms.

A separate line of work has considered over-parameterized networks with random neurons (Neal, 1996), which also display universal approximation properties while additionally providing efficient algorithms based on kernel methods or their approximations such as random features (Rahimi & Recht, 2007; Bach, 2017b). Many recent results on gradient-based optimization of certain over-parameterized networks have been shown to be equivalent to kernel methods with an architecture-specific kernel called the neural tangent kernel (NTK) and thus also fall in this category (e.g., Jacot et al., 2018; Li & Liang, 2018; Allen-Zhu et al., 2019b; Du et al., 2019a; b; Zou et al., 2019). This regime has been coined lazy (Chizat et al., 2019), as it does not capture the common phenomenon where weights move significantly away from random initialization and thus may not provide a satisfying model for learning adaptive representations, in contrast to other settings such as the mean field or active regime, which captures complex training dynamics where weights may move in a non-trivial manner and adapt to the data (e.g., Chizat & Bach, 2018; Mei et al., 2018). Nevertheless, one benefit compared to the mean field regime is that the kernel approach easily extends to deep architectures, leading to compositional kernels similar to the ones of Cho & Saul (2009); Daniely et al. (2016). Our goal in this paper is to study the role of depth in determining approximation properties for such kernels, with a focus on fully-connected deep ReLU networks.

Our approximation results rely on the study of eigenvalue decays of integral operators associated to the obtained dot-product kernels on the sphere, which are diagonalized in the basis of spherical harmonics. This provides a characterization of the functions in the corresponding reproducing kernel Hilbert space (RKHS) in terms of their smoothness, and leads to convergence rates for non-parametric regression when the data are uniformly distributed on the sphere. We show that for ReLU networks, the eigenvalue decays for the corresponding deep kernels remain the same regardless of the depth of the network. Our key result is that the decay for a certain class of kernels is characterized by a property related to differentiability of the kernel function around the point where the two inputs are aligned. In particular, the property is preserved when adding layers with ReLU activations, showing that depth plays essentially no role for such networks in kernel regimes. This highlights the limitations of the kernel regime for understanding the power of depth in fully-connected networks, and calls for new models of deep networks beyond kernels (see, e.g., Allen-Zhu & Li, 2020; Chen et al., 2020, for recent works in this direction). We also provide applications of our result to other kernels and architectures, and illustrate our results with numerical experiments on synthetic and real datasets.

Kernels for deep learning were originally derived by Neal (1996) for shallow networks, and later for deep networks (Cho & Saul, 2009; Daniely et al., 2016; Lee et al., 2018; Matthews et al., 2018). Smola et al. (2001); Minh et al. (2006) study regularization properties of dot-product kernels on the sphere using spherical harmonics, and Bach (2017a) derives eigenvalue decays for such dot-product kernels arising from shallow networks with positively homogeneous activations including the ReLU. Extensions to shallow NTK or Laplace kernels are studied by Basri et al. (2019); Bietti & Mairal (2019b); Geifman et al. (2020). The observation that depth does not change the decay of the NTK was previously made by Basri et al. (2020) empirically, and Geifman et al. (2020) provide a lower bound on the eigenvalues for deep networks; our work makes this observation rigorous by providing tight asymptotic decays. Spectral properties of wide neural networks were also considered in (Cao et al., 2019; Fan & Wang, 2020; Ghorbani et al., 2019; Xie et al., 2017; Yang & Salman, 2019). Azevedo & Menegatto (2014); Scetbon & Harchaoui (2020) also study eigenvalue decays for dot-product kernels but focus on kernels with geometric decays, while our main focus is on polynomial decays. Additional works on over-parameterized or infinite-width networks in lazy regimes include (Allen-Zhu et al., 2019a; b; Arora et al., 2019a; b; Brand et al., 2020; Lee et al., 2020; Song & Yang, 2019).

Concurrently to our work, Chen & Xu (2021) also studied the RKHS of the NTK for deep ReLU networks, showing that it is the same as for the Laplace kernel on the sphere. They achieve this by studying asymptotic decays of Taylor coefficients of the kernel function at zero using complex-analytic extensions of the kernel functions, and leveraging this to obtain both inclusions between the two RKHSs. In contrast, we obtain precise descriptions of the RKHS and regularization properties in the basis of spherical harmonics for various dot-product kernels through spectral decompositions of integral operators, using (real) asymptotic expansions of the kernel function around endpoints. The equality between the RKHS of the deep NTK and Laplace kernel then easily follows from our results by the fact that the two kernels have the same spectral decay.

Review of Approximation with Dot-Product Kernels

In this section, we provide a brief review of the kernels that arise from neural networks and their approximation properties.

Wide neural networks with random weights or weights close to random initialization naturally lead to certain dot-product kernels that depend on the architecture and activation function, which we now present, with a focus on fully-connected architectures.

If x,x′x,x^{\prime} are on the sphere, then by spherical symmetry of the Gaussian distribution, one may show that kk is invariant to unitary transformations and takes the form k(x,x′)=κ(x⊤x′)k(x,x^{\prime})=\kappa(x^{\top}x^{\prime}) for a certain function κ\kappa. More precisely, if σ(u)=∑i≥0aihi(u)\sigma(u)=\sum_{i\geq 0}a_{i}h_{i}(u) is the decomposition of σ\sigma in the basis of Hermite polynomials hih_{i}, which are orthogonal w.r.t. the Gaussian measure, then we have (Daniely et al., 2016):

Conversely, given a kernel function of the form above with κ(u)=∑i≥0biui\kappa(u)=\sum_{i\geq 0}b_{i}u^{i} with bi≥0b_{i}\geq 0, one may construct corresponding activations using Hermite polynomials by taking

In the case where σ\sigma is ss-positively homogeneous, such as the ReLU σ(u)=max⁡(u,0)\sigma(u)=\max(u,0) (with s=1s=1), or more generally σs(u)=max⁡(u,0)s\sigma_{s}(u)=\max(u,0)^{s}, then the kernel (1) takes the form k(x,x′)=∥x∥s∥x′∥sκ(x⊤x′∥x∥∥x′∥)k(x,x^{\prime})=\|x\|^{s}\|x^{\prime}\|^{s}\kappa(\frac{x^{\top}x^{\prime}}{\|x\|\|x^{\prime}\|}) for any x,x′x,x^{\prime}. This leads to RKHS functions of the form f(x)=∥x∥sg(x∥x∥)f(x)=\|x\|^{s}g(\frac{x}{\|x\|}), with gg in the RKHS of the kernel restricted to the sphere (Bietti & Mairal, 2019b, Prop. 8). In particular, for the step and ReLU activations σ0\sigma_{0} and σ1\sigma_{1}, the functions κ\kappa are given by the following arc-cosine kernels (Cho & Saul, 2009):Here we assume a scaling 2/m\sqrt{2/m} instead of 1/m\sqrt{1/m} in the definition of ff, which yields κ(1)=1\kappa(1)=1, a useful normalization for deep networks, as explained below.

Note that given a kernel function κ\kappa, the corresponding activations (3) will generally not be homogeneous, thus the inputs to a random network with such activations need to lie on the sphere (or be appropriately normalized) in order to yield the kernel κ\kappa.

When considering a deep network with more than two layers and fixed random weights before the last layer, the connection to random features is less direct since the features are correlated through intermediate layers. Nevertheless, when the hidden layers are wide enough, one still approaches a kernel obtained by letting the widths go to infinity (see, e.g., Daniely et al., 2016; Lee et al., 2018; Matthews et al., 2018), which takes a similar form to the multi-layer kernels of Cho & Saul (2009):

for x,x′x,x^{\prime} on the sphere, where κ\kappa is obtained as described above for a given activation σ\sigma, and LL is the number of layers. We still refer to this kernel as the random features (RF) kernel in this paper, noting that it is sometimes known as the “conjugate kernel” or NNGP kernel (for neural network Gaussian process). It is usually good to normalize κ\kappa such that κ(1)=1\kappa(1)=1, so that we also have κL(1)=1\kappa^{L}(1)=1, avoiding exploding or vanishing behavior for deep networks. In practice, this corresponds to using an activation-dependent scaling in the random weight initialization, which is commonly used by practitioners (He et al., 2015).

When intermediate layers are trained along with the last layer using gradient methods, the resulting problem is non-convex and the statistical properties of such approaches are not well understood in general, particularly for deep networks. However, in a specific over-parameterized regime, it may be shown that gradient descent can reach a global minimum while keeping weights very close to random initialization. More precisely, for a network f(x;θ)f(x;\theta) parameterized by θ\theta with large width mm, the model remains close to its linearization around random initialization θ0\theta_{0} throughout training, that is, f(x;θ)≈f(x;θ0)+⟨θ−θ0,∇θf(x;θ0)⟩f(x;\theta)\approx f(x;\theta_{0})+\langle\theta-\theta_{0},\nabla_{\theta}f(x;\theta_{0})\rangle. This is also known as the lazy training regime (Chizat et al., 2019). Learning is then equivalent to a kernel method with another architecture-specific kernel known as the neural tangent kernel (NTK, Jacot et al., 2018), given by

For a simple two-layer network with activation σ\sigma, it is then given by

where κ0\kappa_{0} and κ1\kappa_{1} are given in (4).

2 Approximation and harmonic analysis with dot-product kernels

In this section, we recall approximation properties of dot-product kernels on the sphere, through spectral decompositions of integral operators in the basis of spherical harmonics. Further background is provided in Appendix A.

In particular, if μk\mu_{k} has a fast decay, then the coefficients ak,ja_{k,j} of ff must also decay quickly with kk in order for ff to be in H{\mathcal{H}}, which means ff must have a certain level of regularity. Similarly to the Fourier case, an exponential decay of μk\mu_{k} implies that the functions in H{\mathcal{H}} are infinitely differentiable, while for polynomial decay H{\mathcal{H}} contains all functions whose derivatives only up to a certain order are bounded, as in Sobolev spaces. If two kernels lead to the same asymptotic decay of μk\mu_{k} up to a constant, then by (9) their RKHS norms are equivalent up to a constant, and thus they have the same RKHS. For the specific case of random feature kernels arising from ss-positively homogeneous activations, Bach (2017a) shows that μk\mu_{k} decays as k−d−2sk^{-d-2s} for kk of the opposite parity of ss, and is zero for large enough kk of opposite parity, which results in a RKHS that contains even or odd functions (depending on the parity of ss) defined on the sphere with bounded derivatives up to order β:=d/2+s\beta:=d/2+s (note that β\beta must be greater than (d−1)/2(d-1)/2 in order for the eigenvalues of TT to be summable and thus lead to a well-defined RKHS). Bietti & Mairal (2019b) show that the same decay holds for the NTK of two-layer ReLU networks, with s=0s=0 and a change of parity. Basri et al. (2019) show that the parity constraints may be removed by adding a zero-initialized additive bias term when deriving the NTK. We note that one can also obtain rates of approximation for Lipschitz functions from such decay estimates (Bach, 2017a). Our goal in this paper is to extend this to more general dot-product kernels such as those arising from multi-layer networks, by providing a more general approach for obtaining decay estimates from differentiability properties of the function κ\kappa.

Main Result and Applications to Deep Networks

In this section, we present our main results concerning approximation properties of dot-product kernels on the sphere, and applications to the kernels arising from wide random neural networks. We begin by stating our main theorem, which provides eigenvalue decays for dot-product kernels from differentiability properties of the kernel function κ\kappa at the endpoints ±1\pm 1. We then present applications of this result to various kernels, including those coming from deep networks, showing in particular that the RKHSs associated to deep and shallow ReLU networks are the same (up to parity constraints).

for t≥0t\geq 0, where p1,p−1p_{1},p_{-1} are polynomials and ν>0\nu>0 is not an integer. Also, assume that the derivatives of κ\kappa admit similar expansions obtained by differentiating the above ones. Then, there is an absolute constant C(d,ν)C(d,\nu) depending on dd and ν\nu such that:

For kk even, if c1≠−c−1c_{1}\neq-c_{-1}: μk∼(c1+c−1)C(d,ν)k−d−2ν+1\mu_{k}\sim(c_{1}+c_{-1})C(d,\nu)k^{-d-2\nu+1};

For kk odd, if c1≠c−1c_{1}\neq c_{-1}: μk∼(c1−c−1)C(d,ν)k−d−2ν+1\mu_{k}\sim(c_{1}-c_{-1})C(d,\nu)k^{-d-2\nu+1}.

In the case ∣c1∣=∣c−1∣|c_{1}|=|c_{-1}|, then we have μk=o(k−d−2ν+1)\mu_{k}=o(k^{-d-2\nu+1}) for one of the two parities (or both if c1=c−1=0c_{1}=c_{-1}=0). If κ\kappa is infinitely differentiable on $sothatnosuchso that no such\nuexists,thenexists, then\mu_{k}$ decays faster than any polynomial.

The full theorem is given in Appendix B along with its proof, and requires an additional mild technical condition on the expansion which is verified for all kernels considered in this paper, namely, a finite number of terms in the expansions with exponents between ν\nu and ν+1\nu+1. The proof relies on integration by parts using properties of Legendre polynomials, in a way reminiscent of fast decays of Fourier series for differentiable functions, and on precise computations of the decay for simple functions of the form t↦(1−t2)νt\mapsto(1-t^{2})^{\nu}. This allows us to obtain the asymptotic decay for general kernel functions κ\kappa as long as the behavior around the endpoints is known, in contrast to previous approaches which rely on the precise form of κ\kappa, or of the corresponding activation in the case of arc-cosine kernels (Bach, 2017a; Basri et al., 2019; Bietti & Mairal, 2019b; Geifman et al., 2020). This enables the study of more general and complex kernels, such as those arising from deep networks, as discussed below. When κ\kappa is of the form κ(t)=∑kbktk\kappa(t)=\sum_{k}b_{k}t^{k}, the exponent ν\nu in Theorem 1 is also related to the decay of coefficients bkb_{k}. Such coefficients provide a dimension-free description of the kernel which may be useful for instance in the study of kernel methods in certain high-dimensional regimes (see, e.g., El Karoui, 2010; Ghorbani et al., 2019; Liang et al., 2020). We show in Appendix B.1 that the bkb_{k} may be recovered from the μk\mu_{k} by taking high-dimensional limits d→∞d\to\infty, and that they decay as k−ν−1k^{-\nu-1}.

2 Consequences for ReLU networks

When considering neural networks with ReLU activations, the corresponding random features and neural tangent kernels depend on the arc-cosine functions κ1\kappa_{1} and κ0\kappa_{0} defined in (4). These have the following expansions (with generalized exponents) near +1+1:

Indeed, the first follows from integrating the expansion of the derivative using the relation ddtarccos⁡(1−t)=12t1−t/2\frac{d}{dt}\arccos(1-t)=\frac{1}{\sqrt{2t}\sqrt{1-t/2}} and the second follows from the first using the expression of κ1\kappa_{1} in (4). Near −1-1, we have by symmetry κ0(−1+t)=1−κ0(1−t)=2πt1/2+O(t3/2)\kappa_{0}(-1+t)=1-\kappa_{0}(1-t)=\frac{\sqrt{2}}{\pi}t^{1/2}+O(t^{3/2}), and we have κ1(−1+t)=223πt3/2+O(t5/3)\kappa_{1}(-1+t)=\frac{2\sqrt{2}}{3\pi}t^{3/2}+O(t^{5/3}) by using κ1′=κ0\kappa_{1}^{\prime}=\kappa_{0} and κ1(−1)=0\kappa_{1}(-1)=0. The ability to differentiate the expansions follows from (Flajolet & Sedgewick, 2009, Theorem VI.8, p.419), together with a complex-analytic property known as Δ\Delta-analyticity, which was shown to hold for RF and NTK kernels by Chen & Xu (2021). By Theorem 1, we immediately obtain a decay of k−d−2k^{-d-2} for even coefficients for κ1\kappa_{1}, and k−dk^{-d} for odd coefficients for κ0\kappa_{0}, recovering results of Bach (2017a). For the two-layer ReLU NTK, we have κNTK2(u)=uκ0(u)+κ1(u)\kappa^{2}_{{\text{NTK}}}(u)=u\kappa_{0}(u)+\kappa_{1}(u), leading to a similar expansion to κ0\kappa_{0} and thus decay, up to a change of parity due to the factor uu which changes signs in the expansion around −1-1; this recovers Bietti & Mairal (2019b). We note that for these specific kernels, Bach (2017a); Bietti & Mairal (2019b) show in addition that coefficients of the opposite parity are exactly zero for large enough kk, which imposes parity constraints on functions in the RKHS, although such a constraint may be removed in the NTK case by adding a zero-initialized bias term (Basri et al., 2019), leading to a kernel κNTK,b(u)=(u+1)κ0(u)+κ1(u)\kappa_{{\text{NTK}},b}(u)=(u+1)\kappa_{0}(u)+\kappa_{1}(u).

Recall from Section 2.1 that the RF and NTK kernels for deep ReLU networks may be obtained through compositions and products using the functions κ1\kappa_{1} and κ0\kappa_{0}. Since asymptotic expansions can be composed and multiplied, we can then obtain expansions for the deep RF and NTK kernels. The following results show that such kernels have the same eigenvalue decay as the ones for the corresponding shallow (two-layer) networks.

For the random neuron kernel κRFL\kappa^{L}_{{\text{RF}}} of an LL-layer ReLU network with L≥3L\geq 3, we have μk∼C(d,L)k−d−2\mu_{k}\sim C(d,L)k^{-d-2}, where C(d,L)C(d,L) is different depending on the parity of kk and grows linearly with LL.

For the neural tangent kernel κNTKL\kappa^{L}_{{\text{NTK}}} of an LL-layer ReLU network with L≥3L\geq 3, we have μk∼C(d,L)k−d\mu_{k}\sim C(d,L)k^{-d}, where C(d,L)C(d,L) is different depending on the parity of kk and grows quadratically with LL (it grows linearly with LL when considering the normalized NTK κNTKL/L\kappa^{L}_{{\text{NTK}}}/L, which satisfies κNTKL(1)/L=1\kappa^{L}_{{\text{NTK}}}(1)/L=1).

The proofs, given in Appendix C, use the fact that κ1∘κ1\kappa_{1}\circ\kappa_{1} and κ1\kappa_{1} have the same non-integer exponent factors in their expansions, and similarly for κ0∘κ1\kappa_{0}\circ\kappa_{1} and κ0\kappa_{0}. One benefit compared to the shallow case is that the odd and even coefficients are both non-zero with the same decay, which removes the parity constraints, but as mentioned before, simple modifications of the shallow kernels can yield the same effect.

3 Extensions to other kernels

We now provide other examples of kernels for which Theorem 1 provides approximation properties thanks to its generality.

The Laplace kernel kc(x,y)=e−c∥x−y∥k_{c}(x,y)=e^{-c\|x-y\|} has been found to provide similar empirical behavior to neural networks when fitting randomly labeled data with gradient descent (Belkin et al., 2018). Recently, Geifman et al. (2020) have shown that when inputs are on the sphere, the Laplace kernel has the same decay as the NTK, which may suggest a similar conditioning of the optimization problem as for fully-connected networks, as discussed in Section 2.2. Denoting κc(u)=e−c1−u\kappa_{c}(u)=e^{-c\sqrt{1-u}} so that kc(x,y)=κc2(x⊤y)k_{c}(x,y)=\kappa_{c\sqrt{2}}(x^{\top}y), we may easily recover this result using Theorem 1 by noticing that κc\kappa_{c} is infinitely differentiable around −1-1 and satisfies

which yields the same decay k−dk^{-d} as the NTK. Geifman et al. (2020) also consider a heuristic generalization of the Laplace kernel with different exponents, κc,γ(u)=e−c(1−u)γ\kappa_{c,\gamma}(u)=e^{-c(1-u)^{\gamma}}. Theorem 1 allows us to obtain a precise decay for this kernel as well using κc,γ(1−t)=1−ctγ+O(t2γ)\kappa_{c,\gamma}(1-t)=1-ct^{\gamma}+O(t^{2\gamma}), which is of the form k−d−2γ+1k^{-d-2\gamma+1} for non-integer γ>0\gamma>0, and in particular approaches the limiting order of smoothness (d−1)/2(d-1)/2 when γ→0\gamma\to 0.For κc\kappa_{c} and κc,γ\kappa_{c,\gamma}, the ability to differentiate expansions is straightforward since we have the exact expansion κc,γ(u)=∑kck(1−u)γk/k!\kappa_{c,\gamma}(u)=\sum_{k}c^{k}(1-u)^{\gamma k}/k!, which may be differentiated term-by-term.

Finally, we note that Theorem 1 shows that kernels associated to infinitely differentiable activations (which are themselves infinitely differentiable, see Daniely et al. (2016)This requires the mild additional condition that each derivative of the activation is in L2L^{2} w.r.t. the Gaussian measure.), as well as Gaussian kernels on the sphere of the form e−c(1−x⊤y)e^{-c(1-x^{\top}y)}, have faster decays than any polynomial. This results in a “small” RKHS that only contains smooth functions. See Azevedo & Menegatto (2014); Minh et al. (2006) for a more precise study of the decay for Gaussian kernels on the sphere.

Numerical experiments

We now present numerical experiments on synthetic and real data to illustrate our theory. Our code is available at https://github.com/albietz/deep_shallow_kernel.

In Table 1, we consider the image classification datasets MNIST and Fashion-MNIST, which both consist of 60k training and 10k test images of size 28x28 with 10 output classes. We evaluate one-versus-all classifiers obtained by using kernel ridge regression by setting y=0.9y=0.9 for the correct label and y=−0.1y=-0.1 otherwise. We train on random subsets of 50k examples and use the remaining 10k examples for validation. We find that test accuracy is comparable for different numbers of layers in RF or NTK kernels, with a slightly poorer performance for the two-layer case likely due to parity constraints, in agreement with our theoretical result that the decay is the same for different LL. There is a small decrease in accuracy for growing LL, which may reflect changes in the decay constants or numerical errors when composing kernels. The slightly better performance of RF compared to NTK may suggest that these problems are relatively easy (e.g., the regression function is smooth), so that a faster decay is preferable due to better adaptivity to smoothness.

Discussion

In this paper, we have analyzed the approximation properties of deep networks in kernel regimes, by studying eigenvalue decays of integral operators through differentiability properties of the kernel function. In particular, the decay is governed by the form of the function’s (generalized) power series expansion around ±1\pm 1, which remains the same for kernels arising from fully-connected ReLU networks of varying depths. This result suggests that the kernel approach is unsatisfactory for understanding the power of depth in fully-connected networks. In particular, it highlights the need to incorporate other regimes in the study of deep networks, such as the mean field regime (Chizat & Bach, 2018; Mei et al., 2018), and other settings with hierarchical structure (see, e.g., Allen-Zhu & Li, 2020; Chen et al., 2020). We note that our results do not rule out benefits of depth for other network architectures in kernel regimes; for instance, depth may improve stability properties of convolutional kernels (Bietti & Mairal, 2019a; b), and a precise study of approximation for such kernels and its dependence on depth would also be of interest.

The authors would like to thank David Holzmüller for finding an error in an earlier version of the paper, which led us to include the new assumption on differentiation of asymptotic expansions in Theorem 1. This work was funded in part by the French government under management of Agence Nationale de la Recherche as part of the “Investissements d’avenir” program, reference ANR-19-P3IA-0001 (PRAIRIE 3IA Institute). We also acknowledge support of the European Research Council (grant SEQUOIA 724063).

References

Appendix A Background on Spherical Harmonics

For a given frequency kk, we have the following addition formula:

where PkP_{k} is the kk-th Legendre polynomial in dimension dd (also known as Gegenbauer polynomial when using a different scaling), given by the Rodrigues formula:

Note that these may also be expressed using the hypergeometric function 2F1{}_{2}F_{1} (see, e.g., Ismail, 2005, Section 4.5), an expression we will use in proof of Theorem 1 (see the proof of Lemma 6).

The polynomials PkP_{k} are orthogonal in L2(,dν)L^{2}(,d\nu) where the measure dνd\nu is given by the weight function dν(t)=(1−t2)(d−3)/2dtd\nu(t)=(1-t^{2})^{(d-3)/2}dt, and we have

We will use two other properties of Legendre polynomials, namely the following recurrence relation (Efthimiou & Frye, 2014, Eq. 4.36)

for k≥1k\geq 1, and for k=0k=0 we simply have tP0(t)=P1(t)tP_{0}(t)=P_{1}(t), as well as the differential equation (see, e.g., Efthimiou & Frye, 2014, Proposition 4.20):

The Funk-Hecke formula is helpful for computing Fourier coefficients in the basis of spherical harmonics in terms of Legendre polynomials: for any j=1,…,N(d,k)j=1,\ldots,N(d,k), we have

For example, we may use this to obtain decompositions of dot-product kernels by computing Fourier coefficients of functions κ(⟨x,⋅⟩)\kappa(\langle x,\cdot\rangle). Indeed, denoting

writing the decomposition of κ(⟨x,⋅⟩)\kappa(\langle x,\cdot\rangle) using (21) leads to the following Mercer decomposition of the kernel:

Appendix B Proof of Theorem 1

We begin by establishing a weak upper bound on the decay of κ\kappa (Lemma 5) by leveraging its regularity up to the terms of order (1−t2)ν(1-t^{2})^{\nu}. This is achieved by iteratively applying the following integration by parts lemma, which is conceptually similar to integrating by parts on the sphere by leveraging the spherical Laplacian relation (14) in Appendix A, but directly uses properties of κ\kappa and of Legendre polynomials instead (namely, the differential equation (20)). We note that the final statement in Theorem 1 on infinitely differentiable κ\kappa directly follows from Lemma 5.

In order to perform integration by parts, we use the following differential equation satisfied by Legendre polynomials (see, e.g., Efthimiou & Frye, 2014, Proposition 4.20):

Using this equation, we may write for k≥1k\geq 1,

We may integrate the second term by parts using

Noting that the first term in (26) cancels out with the integral resulting from the second term in (28), we then obtain

Integrating by parts once more, the second term becomes

for t∈t\in and j≥0j\geq 0, where pj,1,pj,−1p_{j,1},p_{j,-1} are polynomials and ν\nu may be non-integer. Then the Legendre coefficients μk(κ)\mu_{k}(\kappa) of κ\kappa given in (8) satisfy

Then fjf_{j} is C∞C^{\infty} on (−1,1)(-1,1) and has similar expansions to κ\kappa of the form

for some polynomials qj,±1q_{j,\pm 1}. We may apply Lemma 4 repeatedly as long as the terms in brackets vanish, until we obtain, for j=⌈ν+d−32⌉−1j=\lceil\nu+\frac{d-3}{2}\rceil-1,

Given our choice for jj, we have fj′(t)(1−t2)1+d−32=O(1)f_{j}^{\prime}(t)(1-t^{2})^{1+\frac{d-3}{2}}=O(1), and fj+1(t)(1−t2)(d−3)/2=O((1−t2)−1+ϵ)f_{j+1}(t)(1-t^{2})^{(d-3)/2}=O((1-t^{2})^{-1+\epsilon}) for some ϵ>0\epsilon>0. Since Pk(t)∈P_{k}(t)\in for any t∈t\in, we obtain μk(κ)=O(k−2(j+1))=O(k−d−2ν+3)\mu_{k}(\kappa)=O(k^{-2(j+1)})=O(k^{-d-2\nu+3}). ∎

We now provide precise decay estimates for functions of the form t↦(1−t2)νt\mapsto(1-t^{2})^{\nu} and t↦t(1−t2)νt\mapsto t(1-t^{2})^{\nu}, which will lead to the dominant terms in the decomposition of κ\kappa in the main theorem.

Let ϕν(t)=(1−t2)ν\phi_{\nu}(t)=(1-t^{2})^{\nu}, with ν>0\nu>0 non-integer, and let μk(ϕν)\mu_{k}(\phi_{\nu}) denote its Legendre coefficients in dd dimensions given by ωd−2ωd−1∫−11(1−t2)ν+(d−3)/2Pk(t)dt\frac{\omega_{d-2}}{\omega_{d-1}}\int_{-1}^{1}(1-t^{2})^{\nu+(d-3)/2}P_{k}(t)dt. We have

μk(ϕν)∼C(d,ν)k−d−2ν−1\mu_{k}(\phi_{\nu})\sim C(d,\nu)k^{-d-2\nu-1} for kk even, k→∞k\to\infty, with C(d,ν)C(d,\nu) a constant.

Analogously, let ϕˉν(t):=t(1−t2)ν\bar{\phi}_{\nu}(t):=t(1-t^{2})^{\nu}. We have

μk(ϕˉν)=0\mu_{k}(\bar{\phi}_{\nu})=0 if kk is even

μk(ϕˉν)∼C(d,ν)k−d−2ν−1\mu_{k}(\bar{\phi}_{\nu})\sim C(d,\nu)k^{-d-2\nu-1} for kk odd, k→∞k\to\infty, with C(d,ν)C(d,\nu) a constant.

We recall the following representation of Legendre polynomials based on the hypergeometric function (e.g., Ismail, 2005, Section 4.5):Here we normalize such that Pk(1)=1P_{k}(1)=1 as is standard for Legendre polynomials, in contrast to (Ismail, 2005) where the standard Jacobi/Gegenbauer normalization is used.

where the hypergeometric function is given in its generalized form by

where (a)s=Γ(a+s)/Γ(a)(a)_{s}=\Gamma(a+s)/\Gamma(a) is the rising factorial or Pochhammer symbol.

Using the above definitions and the integral representation of Beta functions, we then have

Now, we use Watson’s theorem (e.g., Ismail, 2005, Eq. (1.4.12)), which states that

We remark that with a=−k,b=k+d−2,c=ν+(d−1)/2a=-k,b=k+d-2,c=\nu+(d-1)/2, our expression above is of the form of Watson’s theorem, and we may thus evaluate μk\mu_{k} in closed form. Indeed, we have

When k→∞k\to\infty, Stirling’s formula Γ(x)∼xx−12e−x2π\Gamma(x)\sim x^{x-\frac{1}{2}}e^{-x}\sqrt{2\pi} yields the equivalent

The decay for ϕˉν\bar{\phi}_{\nu} follows from the decay of ϕν\phi_{\nu} and the recurrence relation (Efthimiou & Frye, 2014, Eq. (4.36))

which ensures the same decay with a change parity. ∎

We are now ready to prove our main theorem, which differs from the simplified statement of Theorem 1 by the technical assumption that only a finite number rr of terms of order between ν\nu and ν+1\nu+1 are present in the series expansions around ±1\pm 1.

for t∈t\in, where p1,p−1p_{1},p_{-1} are polynomials and 0<ν1<…<νr0<\nu_{1}<\ldots<\nu_{r} are not integers and 0<ϵ<ν2−ν10<\epsilon<\nu_{2}-\nu_{1}. We also assume that the derivatives κ(s)\kappa^{(s)} of κ\kappa have the following expansions:

for some polynomials ps,±1p_{s,\pm 1}. Then we have, for an absolute constant C(d,ν1)C(d,\nu_{1}) depending only on dd and ν1\nu_{1},

For kk even, if cν1,1≠−c1,−1c_{\nu_{1},1}\neq-c_{1,-1}: μk∼(c1,1+c1,−1)C(d,ν1)k−d−2ν1+1\mu_{k}\sim(c_{1,1}+c_{1,-1})C(d,\nu_{1})k^{-d-2\nu_{1}+1};

For kk even, if c1,1=−c1,−1c_{1,1}=-c_{1,-1}: μk=o(k−d−2ν1+1)\mu_{k}=o(k^{-d-2\nu_{1}+1});

For kk odd, if c1,1≠c1,−1c_{1,1}\neq c_{1,-1}: μk∼(c1,1−c1,−1)C(d,ν1)k−d−2ν1+1\mu_{k}\sim(c_{1,1}-c_{1,-1})C(d,\nu_{1})k^{-d-2\nu_{1}+1}.

For kk odd, if c1,1=c1,−1c_{1,1}=c_{1,-1}: μk=o(k−d−2ν1+1)\mu_{k}=o(k^{-d-2\nu_{1}+1}).

for j=1,…,rj=1,\ldots,r, where ϕν,ϕˉν\phi_{\nu},\bar{\phi}_{\nu} are defined in Lemma 6. We have the asymptotic expansions:These are obtained by writing ψj(t)=(a+bt)(1+t)ν(1−t)ν\psi_{j}(t)=(a+bt)(1+t)^{\nu}(1-t)^{\nu} and computing, e.g., the first two terms in the analytic expansion of t↦(a+bt)(1+t)νt\mapsto(a+bt)(1+t)^{\nu} around 1.

The result then follows from Lemma 6, with a constant C(d,ν1)/2ν1+1C(d,\nu_{1})/2^{\nu_{1}+1}, where C(d,ν1)C(d,\nu_{1}) is given by the proof of Lemma 6. ∎

B.1 Dimension-free description

While our above description of the RKHS depends on the dimension dd, in some cases a dimension-free description given by Taylor coefficients of the kernel κ\kappa at may be useful, for instance for the study of kernel methods in certain high-dimensional regimes (e.g., El Karoui, 2010; Ghorbani et al., 2019; Liang et al., 2020). Here we remark that such coefficients and their decay may be recovered from the Legendre coefficients in dd dimensions, by taking high-dimensional limits d→∞d\to\infty. We illustrate this on the functions ϕν(t)=(1−t2)ν\phi_{\nu}(t)=(1-t^{2})^{\nu}, for which Lemma 6 provides precise estimates of the Legendre coefficients μk,d(ϕν)\mu_{k,d}(\phi_{\nu}) in dd dimensions (this only serves as an instructive illustration, since in this case Taylor coefficients may be computed directly through a power series expansion of ϕν\phi_{\nu} using the Binomial formula).

Let bk(ϕν):=ϕν(k)k!b_{k}(\phi_{\nu}):=\frac{\phi_{\nu}^{(k)}}{k!} for some non-integer ν>0\nu>0. For kk even, we have

for a constant CνC_{\nu} depending only on ν\nu. This leads to an equivalent bk∼Cν′k−ν−1b_{k}\sim C_{\nu}^{\prime}k^{-\nu-1} for k→∞k\to\infty with kk even.

Now, note that when dd is large enough compared to kk, we may use the Rodrigues formula (16) and integration by parts to obtain the following alternative expression:

Following similar arguments to Ghorbani et al. (2019), we may then use dominated convergence to show:

Indeed, Γ(d2)πΓ(d−12)(1−t2)(d−3)/2\frac{\Gamma(\frac{d}{2})}{\sqrt{\pi}\Gamma(\frac{d-1}{2})}(1-t^{2})^{(d-3)/2} is a probability density that approaches a Dirac mass at 0 when d→∞d\to\infty. This yields

Plugging (59) and using Stirling’s formula to take limits d→∞d\to\infty yields

where CνC_{\nu} only depends on ν\nu. Using Stirling’s formula once again yields the desired equivalent bk(ϕν)∼Cν′k−ν−1b_{k}(\phi_{\nu})\sim C^{\prime}_{\nu}k^{-\nu-1} for k→∞k\to\infty, kk even, with a different constant Cν′C^{\prime}_{\nu}. ∎

We note that a similar asymptotic equivalent holds for bk(ϕˉν)b_{k}(\bar{\phi}_{\nu}) for kk odd. The next result leverages this to derive asymptotic decays of bk(κ)b_{k}(\kappa) for any κ\kappa of the form κ(u)=∑k≥0bk(κ)uk\kappa(u)=\sum_{k\geq 0}b_{k}(\kappa)u^{k} satisfying similar conditions as in Theorem 7.

for t∈t\in, where p1,p−1p_{1},p_{-1} are polynomials and 0<ν1<…<νr0<\nu_{1}<\ldots<\nu_{r} are not integers and 0<ϵ<ν2−ν10<\epsilon<\nu_{2}-\nu_{1}. Then we have, for an absolute constant C(ν1)C(\nu_{1}) depending only on ν1\nu_{1},

For kk even, if cν1,1≠−cν1,−1c_{\nu_{1},1}\neq-c_{\nu_{1},-1}: bk∼(cν1,1+cν1,−1)C(ν1)k−ν1−1b_{k}\sim(c_{\nu_{1},1}+c_{\nu_{1},-1})C(\nu_{1})k^{-\nu_{1}-1};

For kk even, if cν1,1=−cν1,−1c_{\nu_{1},1}=-c_{\nu_{1},-1}: bk=o(k−ν1−1)b_{k}=o(k^{-\nu_{1}-1});

For kk odd, if cν1,1≠cν1,−1c_{\nu_{1},1}\neq c_{\nu_{1},-1}: bk∼(cν1,1−cν1,−1)C(ν1)k−ν1−1b_{k}\sim(c_{\nu_{1},1}-c_{\nu_{1},-1})C(\nu_{1})k^{-\nu_{1}-1}.

For kk odd, if cν1,1=cν1,−1c_{\nu_{1},1}=c_{\nu_{1},-1}: bk=o(k−ν1−1)b_{k}=o(k^{-\nu_{1}-1}).

The result then follows from Lemma 8 by using the decays of bk(ϕν)b_{k}(\phi_{\nu}) and bk(ϕˉν)b_{k}(\bar{\phi}_{\nu}).

Appendix C Other Proofs

In this section, we provide the proofs for results in Section 3.3 related to obtaining power series expansions (with generalized exponents) of kernels arising from deep networks, which leads to the corresponding decays by Theorem 1. We note that for the kernels considered in this section, we can differentiate the expansions since the kernel function is Δ\Delta-analytic (see Chen & Xu, 2021, Theorem 7), so that the technical assumption in Theorem 1 is verified.

C.2 Proof of Corollary 3

which proves the claim for the expansion around +1+1.

C.3 Deep networks with step activations

In this section, we study the decay of the random weight kernel arising from deep networks with step activations, as presented in Section 3.3. For an LL-layer network, this kernel is of the form κsL:=κ0∘⋯∘κ0⏟L−1 times\kappa_{s}^{L}:=\underbrace{\kappa_{0}\circ\cdots\circ\kappa_{0}}_{L-1\text{ times}}.

κsL\kappa_{s}^{L} has a decay k−d−2νL+1k^{-d-2\nu_{L}+1} with νL=1/2L−1\nu_{L}=1/2^{L-1} for LL layers.