Deep Neural Tangent Kernel and Laplace Kernel Have the Same RKHS
Lin Chen, Sheng Xu
Introduction
In the past few years, one of the most seminal discoveries in the theory of neural networks is the neural tangent kernel (NTK) . The gradient flow on a normally initialized, fully connected neural network with a linear output layer in the infinite-width limit turns out to be equivalent to kernel regression with respect to the NTK (This statement does not necessarily hold for a non-linear output layer, because the NTK is non-constant ). Through the NTK, theoretical tools from kernel methods were introduced to the study of deep overparametrized neural networks. Theoretical results were thereby established regarding the convergence , generalization , and loss landscape of overparametrized neural networks in the NTK regime.
While NTK has proved to be a powerful theoretical tool, a recent work posed an important question whether the NTK is significantly different from our repertoire of standard kernels. Prior work provided empirical evidence that supports a negative answer. For example, Belkin et al. showed experimentally that the Laplace kernel and neural networks had similar performance in fitting random labels. In the task of speech enhancement, exponential power kernels , which include the Laplace kernel as a special case, outperform deep neural networks with even shorter training time . The experiments in also exhibited similar performance of the Laplace kernel and the NTK.
The expressive power of a positive definite kernel can be characterized by its associated reproducing kernel Hilbert space (RKHS) . The work considered the RKHS of the kernels restricted to the sphere and presented a partial answer to the question by showing the following subset inclusion relation
where the four spaces denote the RKHS associated with the Gaussian kernel, Laplace kernel, the NTK of two-layer and -layer () fully connected neural networks, respectively. All four kernels are restricted to . However, the relation between and remains open in .
We make a final conclusion on this problem and show that the RKHS of the Laplace kernel and the NTK with any number of layers have the same set of functions, when they are both restricted to . In other words, we prove the following theorem.
Let and be the RKHS associated with the Laplace kernel () and the neural tangent kernel of a -layer fully connected ReLU network. Both kernels are restricted to the sphere . Then the two spaces include the same set of functions:
Our second result is that the exponential power kernel with a smaller power (making the kernel less smooth) leads to a larger RKHS, both when it is restricted to the sphere and when it is defined on the entire .
Let and be the RKHS associated with the exponential power kernel () when it is restricted to the unit sphere and defined on the entire , respectively. Then we have the following RKHS inclusions:
If are rational,
If it is restricted to the unit sphere, the RKHS of the exponential power kernel with is even larger than that of NTK. This result partially explains the observation in that the best performance is attained by a highly non-smooth exponential power kernel with . Geifman et al. applied the exponential power kernel and the NTK to classification and regression tasks on the UCI dataset and other large scale datasets. Their experiment results also showed that the exponential power kernel slightly outperforms the NTK.
Minh et al. showed the complete spectrum of the polynomial and Gaussian kernels on . They also gave a recursive relation for the eigenvalues of the polynomial kernel on the hypercube . Prior to the NTK , Cho and Saul presented a pioneering study on kernel methods for neural networks. Bach studied the eigenvalues of positively homogeneous activation functions of the form (e.g., the ReLU activation when ) in their Mercer decomposition with Gegenbauer polynomials. Using the results in , Bietti and Mairal analyzed the two-layer NTK and its RKHS in order to investigate the inductive bias in the NTK regime. They studied the Mercer decomposition of two-layer NTK with ReLU activation on and characterized the corresponding RKHS by showing the asymptotic decay rate of the eigenvalues in the Mercer decomposition with Gegenbauer polynomials. In their derivation of a more concise expression of the ReLU NTK, they used the calculation of on arc-cosine kernels of degree and . Cao et al. improved the eigenvalue bound for the -th eigenvalue derived in when . Geifman et al. used the results in and considered the two-layer ReLU NTK with bias initialized with zero, rather than initialized with a normal distribution . However, neither nor went beyond two layers when they tried to characterize the RKHS of the ReLU NTK. This line of work is closely related to the Mercer decomposition with spherical harmonics. Interested readers are referred to for spherical harmonics on the unit sphere. The concurrent work analyzed the eigenvalues of the ReLU NTK.
Arora et al. presented a dynamic programming algorithm that computes convolutional NTK with ReLU activation. Yang and Salman analyzed the spectra of the conjugate kernel (CK) and NTK on the boolean cube. Fan and Wang studied the spectrum of the gram matrix of training samples under the CK and NTK and showed that their eigenvalue distributions converge to a deterministic limit. The limit depends on the eigenvalue distribution of the training samples.
Preliminaries
Let denote the set of all complex numbers and write . For , write , , for its real part, imaginary part, and argument, respectively. Let denote the upper half-plane and denote the lower half-plane. Write for the open ball and for the closed ball .
Suppose that has a power series representation around . Denote to be the coefficient of the -th order term.
For two sequences and , write if . Similarly, for two functions and , write as if . We also use big- and little- notation to characterize asymptotics.
Write for the Laplace transform of a function . The inverse Laplace transform of is denoted by .
For any positive definite kernel function defined for , denote its associated reproducing kernel Hilbert space (RKHS). For any two positive definite kernel functions and , we write if is a positive definite kernel. For a complete review of results on kernels and RKHS, please see .
In the sequel, we introduce two instances of the positive definite kernel that this paper will investigate.
The exponential power kernel with and is given by . If and are restricted to the sphere , we have .
Given the input (we define ) and parameter , this paper considers the following network model with layers
where the parameter encodes , (), , and . The weight matrices are initialized with and the biases are initialized with zero, where is the multivariate standard normal distribution. The activation function is chosen to be the ReLU function .
Geifman et al. and Bietti and Mairal presented the following recursive relations of the NTK of the above ReLU network (1):
where and are the arc-cosine kernels of degree 0 and 1 given by
The NTKs defined in and are slightly different. There is no bias term in , while the bias term appears in . We adopt the more general setup with the bias term.
for any and .
where is the -th iterate of . For example, , and . We present a detailed derivation of (4) in Section A.2.
Results on Neural Tangent Kernel
In this section, we present an overview of our proof for Theorem 1. Since showed , it suffices to prove the reverse inclusion . We then relate positive definite kernels with their RKHS according to the following lemma.
Let be two positive definite kernels. Then the Hilbert space is a subset of if and only if there exists some constant such that
Lemma 4 implies that in order to show , it suffices to show is a positive definite kernel for some . Note that both and are positive definite kernels on the unit sphere. Then the Maclaurin series of and have all non-negative coefficients by the classical approximation theory; see [28, Theorem 2], , and [13, Chapter 17]. Conversely, if the Maclaurin series of have all non-negative coefficients, is a positive definite kernel on the unit sphere. To be precise, we have the following lemma.
Suppose that where and is continuous on $xyx^{\top}x=y^{\top}y=1x^{\top}yK\bS^{d-1}df(u)=\sum_{k=0}^{\infty}a_{k}u^{k}a_{k}\geq 0\sum_{k=0}^{\infty}a_{k}<\infty$.
Thus, we turn to show that there exists such that holds for every .
Exact calculation of the asymptotic rate of the Maclaurin coefficients is intractable for due to its recursive definition. Instead, we apply singularity analysis tools in analytic combinatorics. We refer the readers to for a systematic introduction. We treat all (zonal) kernels, , , , and , as complex functions of variable . To emphasize, we use instead of to denote the variable. The theory of analytic combinatorics states that the asymptotic of the coefficients of the Maclaurin series is determined by the local nature of the complex function at its dominant singularities (i.e., the singularities closest to ).
To apply the methodology from , we introduce some additional definitions. For and , the -domain is defined by
For a complex number , a -domain at is the image by the mapping of for some and . A function is -analytic at if it is analytic on a -domain at .
Suppose the function has only one dominant singularity and without loss of generality assume that it lies at . We then have the following lemma.
If is -analytic at its dominant singularity and
with , we have
If the function has multiple dominant singularities, the influence of each singularity is added up (See [19, Theorem VI.5] for more details). Careful singularity analysis then gives
for some positive constants . We refer to Section 3.2 and Section A.4 for more detailed steps. They are indeed of the same order of decay rate , which implies that such exists. This shows .
We present the -analyticity of the NTKs here. In light of (4), the NTKs are compositions of arc-cosine kernels and . We analytically extend and to a complex function of a complex variable . Both complex functions and have branch points at . Therefore, the branch cut of and is . They have a single-valued analytic branch on
where we use the principal value of the logarithm and square root. We then show the dominant singularities of are and that is -analytic at for any . We further have the following theorem on the -singularity for .
For each , the dominant singularities of are . There exists such that is analytic on , where .
The following theorem demonstrates the asymptotic rates of Maclaurin coefficients for .
The -th order coefficient of the Maclaurin series of the -layer NTK in (2) satisfies .
In the proof of Theorem 8, we show the following asymptotics
When , the singularity at will not provide a term. The dominating term in (7) is a higher power of . As a result, the contribution of the singularity at to the Maclaurin coefficients is and dominated by the contribution of the singularity at . The singularity at provides a term and thus contributes to decay rate of . In addition, from (6), we deduce
When , both singularities contribute to the Maclaurin cofficients. The contribution of is
Based on Theorem 8, we are ready to prove Theorem 1.
Let , where is an arbitrary constant. We have . The complex function is analytic on . As , we have
Note that from Theorem 8. Therefore, there exists such that for all . This further implies is a positive definite kernel. According to Lemma 4, we have . Note that, due to [20, Theorem 3], we also have . Therefore, for any , .
Results on Exponential Power Kernel
This section presents the proof of Theorem 2. We first show part (1) below by singularity analysis.
Recall that the exponential power kernel restricted to the unit sphere with and is given by . Let us study the decay rate of the Maclaurin coefficients of , where . The dominant singularity lies at . As , we get
Applying Lemma 6 gives . Therefore, a smaller results in a larger RKHS. ∎
Part (2) of Theorem 2 requires more technical preparation. Recall that and denote the Laplace transform and inverse Laplace transform, respectively. We explicitly calculate the inverse Laplace transform using Bromwich contour integral and get the following lemma.
For , exists. Moreover, is continuous in and satisfies . If , we have
Based on the series representation (11), we then analyze the asymptotic rate for when is rational. Note that if , we have .
Let be as defined in Lemma 9. For ( and are co-prime), we have as .
Thus, We have the following corollary for general exponential power kernel.
For ( and are co-prime) and , is continuous in and satisfies . Moreover, as , for some constant .
Use the property , where and . ∎
Before completing the proof for part (2), we need two additional lemmas from the classical approximation theory. Recall that a function is completely monotone if it is continuous on , infinitely differentiable on and satisfies for every and [13, Chapter 14].
If is completely monotone but not constant on , then for any distinct points in any inner-product space, the matrix is positive definite.
A function is completely monotone if and only if there is a nondecreasing bounded function such that .
By Lemma 12 and Lemma 4, we need to show that
is completely monotone but not constant on for some . By Lemma 13, it suffices to check that (12) is the Laplace transform of a non-negative function on . By 11, for rational , there exists such that
is continuous and positive on , which completes the proof. ∎
Numerical Results
We verify the asymptotics of the Maclaurin coefficients of the Laplace kernel and NTKs through numerical results.
Fig. 1 plots versus for different kernels, including the Laplace kernel and NTKs with . All curves converge to a constant as , which indicates that for every kernel considered here, we have . The numerical results agree with our theory in the proofs of Theorem 8 and Theorem 1.
Now we investigate the value of . Table 1 reports for the Laplace kernel and NTKs with . These numerical values are the final values of the curves in Fig. 1. The theoretical predictions are obtained through the asymptotic of , which we shall explain below. The theoretical prediction of with is presented below due to the space limit in the table
We observe that the theoretical prediction by the asymptotic is close to the corresponding numerical value. There are two possible reasons that account for the minor discrepancy between them. First, the theoretical prediction reflects the situation for an infinitely large (so that the lower order terms become negligible), while is clearly finite. Second, the numerical results for the Maclaurin series are obtained by numerical Taylor expansion and therefore numerical errors could be present.
In what follows, we explain how to obtain the theoretical predictions. First, (10) gives
As a result, the theoretical prediction for is . Now we explain the thereotical predictions for NTKs. When , the theoretical prediction is given by (8). We present it in the third column of Table 1 for . When , we plug into (9) and obtain
The above expression (when on the right-hand side) is the theoretical value presented in the fifth column of Table 1 for NTKs.
Discussion
Our result provides further evidence that the NTK is similar to the existing Laplace kernel. However, the following mysteries remain open. First, if we still restrict them to the unit sphere, do they have a similar learning dynamic when we perform kernelized gradient descent? Second, what is the behavior of the NTK and the Laplace kernel outside of and in the entire space ? Do they still share similarities in terms of the associated RKHS? If not, how far do they deviate from each other and is the difference significant? Third, this work along with focuses on the NTK with ReLU activation. It would be interesting to explore the influence of different activations upon the RKHS and other kernel-related quantities. We would like to remark that the ReLU NTK has a clean expression partly because the expectation over the Gaussian process in the general NTK can be computed exactly if the activation function is ReLU (which may not be true for other non-linearities, for example, it may require more work for sigmoid). Fourth, we showed that highly non-smooth exponential power kernels have an even larger RKHS than the NTK. It would be worthwhile comparing the performance of these non-smooth kernels and deep neural networks through more extensive experiments in a variety of machine learning tasks.
Moreover, we show that a less smooth exponential power kernel leads to a larger RKHS and therefore greater expressive power. Its generalization capability is a related but different topic. Analyzing the generalization error requires more efforts in general. Researchers often use the RKHS norm to provide an upper bound for it. We will study its generalization in future work.
We gratefully acknowledge the support of the Simons Institute for the Theory of Computing. We thank Peter Bartlett, Mikhail Belkin, Jason D. Lee, and Iosif Pinelis for helpful discussions and thank Mikhail Belkin and Alexandre Eremenko for introducing to us the works and , respectively.
References
Appendices
We show it by induction. It holds when by the initial condition (3). Assume that it holds for some , i.e., . Consider . We have
A.2 Proof of Equation (4)
We plug into (2) and obtain
Recall . By induction, we get
where is the -th iterate of . Then it follows
A.3 Proof of Theorem 7
Lemma 14 and Lemma 15 demonstrate that are indeed singularities and analyze the asymptotics for as tends to , respectively. Our calculation is inspired by Pinelis , which only considers .
For every , there exists such that
We prove by induction on . We first prove the statement for . Let . Taylor’s theorem around with integral form of remainder gives
where is the simple straight line connecting and taking the form . It follows
Therefore, there exists such that and
Next, assume that the desired equation holds for some . We then have
where . Recall that when , we have as well. Therefore we deduce
For every , there exist and a complex function such that
We prove by induction on . We first prove the statement for . Let . Taylor’s theorem around with integral form of remainder gives
where is the simple straight line connecting and taking the form . Similar arguments as in the proof of Lemma 14 give
where .
Next, assume that the desired equation holds for some . Define . Since is strictly increasing on $\kappa_{1}(-1)=0\kappa_{1}(1)=1h_{1}=0h_{k}\in(0,1)k>1\kappa_{1}h_{k}$ yields
where . It follows that
where and . By induction, we can show that for all . Since is strictly increasing on $\kappa_{1}^{\prime}(-1)=0\kappa_{1}^{\prime}(1)=1\kappa_{1}^{\prime}(h_{k})\geq\kappa_{1}^{\prime}(0)>0$. As a result,
In the sequel, we show that are the only dominant singularities of and is -analytic at (Lemma 19).
For any with , . For any with , .
The second part of the statement follows from the first according to the reflection principle. We only prove the first part here. Let with . Taylor’s theorem with integral form of the remainder and direct calculation give
where is the simple straight line connecting and taking the form . Then we have
Since , we have . Further
Noting , we get
which gives a positive imaginary part. Combining with yields the desired statement. ∎
For every and , there exists such that is analytic on and with
We present the proof for here and that for can be shown similarly. We adopt an induction argument on .
For , is analytic on . Since is continuous at , for any , there exists such that
Lemma 16 implies . Combining them yields
Now assume that the statement holds true for some . Note that for any , there exists such that (14) holds. Then by induction hypothesis, for this chosen , there exists such that is analytic on and
for any , where the equality holds if and only if .
The Taylor series of around is
The equality holds if and only if . ∎
For each , there exists such that is analytic on , where .
For any , there exists such that for all with , we have
To see this, we use an argument similar to . If we define , we have
for some . Consider the Taylor series of around
Lemma 17 shows that there exists such that is analytic on . From the argument above, we know that maps to inside of the open unit ball . Since is compact and Lemma 18 implies that maps to , there exists such that maps
to . It follows that is analytic on . Let us pick such that . Then we conclude that is analytic on . ∎
Since and are both analytic on , similar arguments as in the proof of Lemma 19 shows that is analytic on for all and some . We then show, for any , there exists some such that is analytic on by induction. The function is analytic on . Assume is analytic on for some . Recall that
Then we can find some such that is analytic on . ∎
A.4 Proof of Theorem 8
We first analyze the behavior of as for any . We aim to show, for any , there exists a sequence of complex functions with such that
The fundamental theorem of calculus then gives for any
where is the simple straight line connecting and . As , we have . Therefore, similar arguments as in the proof of Lemma 14 give
where . Combining with Lemma 14 further gives, for any
where . For , we then have
where and . Assume with . We further have
where we set and , as . Moreover, we have
Next we study the behavior of as for any . We aim to show, for any , there exists a sequence of complex functions with and as defined in Lemma 15 such that
We again adopt induction on . Taylor’s theorem gives
where . Combining with Lemma 15 further gives, for any
where is the simple straight line connecting and . As , we have . Therefore, similar arguments as in the proof of Lemma 14 give
where as . We then have
where . Assume with . We further have
where we use the induction assumption in the fourth equation, use the fact in the fifth equation and define
Finally, according to Theorem 7, combining (15) and (16), applying [19, Theorem VI.5] with , , , , , , , , we conclude . ∎
Appendix B Proofs for Exponential Power Kernel
According to [15, Theorem 28.2], we have, for ,
Also [15, Theorem 28.2] implies that is continuous in and .
Next we explicitly calculate using Bromwich contour integral. We denote each part of the Bromwich contour by as depicted in Fig. 2. Denote the radius of the outer and inner arc by and . When , we have . Also we let and tend to from above and below respectively in the limit. By the residue theorem, we have
where the last two limits are taken as , , and tend to . We then calculate each part separately.
Part I: We calculate the parts for and . We follow the similar idea as in the proof of [29, Theorem 7.1]. Along , since with , ,
where . Since , we have
As , we have .
First, we consider the case . We have and . It follows
where in the last inequality we use the fact for . Thus, . Next, we consider . Define
We then have its second derivative as follows
Choose to be a fixed constant in . Since , then . If ,
Since , there exists some large such that holds for all . If ,
Since by the choice of , we get . Then we also have . Therefore, if , is convex in . As a result, we get
which goes to as . Therefore, converges to uniformly (as a function of with index ), which implies
Hence, we establish for all .
Combining these above, we conclude . Similarly, .
Part II: We calculate the parts for and . By the dominated convergence theorem, we have, for
We then calculate the limit of the summand.
Similarly, we obtain the corresponding part in :
Combining the parts of and together, we get
Part III: We get the limit for is as .
Combining the three parts above, we conclude
B.2 Proof of Lemma 10
First, we show that the series in (17) converges absolutely:
The inner summation in (18) is a power series in . We would like to show that its radius of convergence is . Define
As a result, the radius of convergence is . Then we have
Notice that the quantity goes to as . Therefore we deduce