Self-Consistent Dynamical Field Theory of Kernel Evolution in Wide Neural Networks
Blake Bordelon, Cengiz Pehlevan
Introduction
Deep learning has emerged as a successful paradigm for solving challenging machine learning and computational problems across a variety of domains . However, theoretical understanding of the training and generalization of modern deep learning methods lags behind current practice. Ideally, a theory of deep learning would be analytically tractable, efficiently computable, capable of predicting network performance and internal features that the network learns, and interpretable through a reduced description involving desirably initialization-independent quantities.
Several recent theoretical advances have fruitfully considered the idealization of wide neural networks, where the number of hidden units in each layer is taken to be large. Under certain parameterization, Bayesian neural networks and gradient descent trained networks converge to gaussian processes (NNGPs) and neural tangent kernel (NTK) machines in their respective infinite-width limits. These limits provide both analytic tractability as well as detailed training and generalization analysis . However, in this limit, with these parameterizations, data representations are fixed and do not adapt to data, termed the lazy regime of NN training, to contrast it from the rich regime where NNs significantly alter their internal features while fitting the data . The fact that the representation of data is fixed renders these kernel-based theories incapable of explaining feature learning, an ingredient which is crucial to the success of deep learning in practice . Thus, alternative theories capable of modeling feature learning dynamics are needed.
Recently developed alternative parameterizations such as the mean field and the parameterizations allow feature learning in infinite-width NNs trained with gradient descent. Using the Tensor Programs framework, Yang & Hu identified a stochastic process that describes the evolution of preactivation features in infinite-width NNs . In this work, we study an equivalent parameterization to with self-consistent dynamical mean field theory (DMFT) and recover the stochastic process description of infinite NNs using this alternative technique. In the same large width scaling, we include a scalar parameter that allows smooth interpolation between lazy and rich behavior . We provide a new computational procedure to sample this stochastic process and demonstrate its predictive power for wide NNs.
Our novel contributions in this paper are the following:
We develop a path integral formulation of gradient flow dynamics in infinite-width networks in the feature learning regime. Our parameterization includes a scalar parameter to allow interpolation between rich and lazy regimes and comparison to perturbative methods.
Using a stationary action argument, we identify a set of saddle point equations that the kernels satisfy at infinite-width, relating the stochastic processes that define hidden activation evolution to the kernels and vice versa. We show that our saddle point equations recover at , from an alternative method, the same stochastic process obtained previously with Tensor Programs .
We develop a polynomial-time numerical procedure to solve the saddle point equations for deep networks. In numerical experiments, we demonstrate that solutions to these self-consistency equations are predictive of network training at a variety of feature learning strengths, widths and depths. We provide comparisons of our theory to various approximate methods, such as perturbation theory.
A natural extension to the lazy NTK/NNGP limit that allows the study of feature learning is to calculate finite width corrections to the infinite-width limit. Finite width corrections to Bayesian inference in wide networks have been obtained with various perturbative and self-consistent techniques . In the gradient descent based setting, leading order corrections to the NTK dynamics have been analyzed to study finite width effects . These methods give approximate corrections which are accurate provided the strength of feature learning is small. In very rich feature learning regimes, however, the leading order corrections can give incorrect predictions .
Another approach to study feature learning is to alter NN parameterization in gradient-based learning to allow significant feature evolution even at infinite-width, the mean field limit . Works on mean field NNs have yielded formal loss convergence results and shown equivalences of gradient flow dynamics to a partial differential equation (PDE) .
Our results are most closely related to a set of recent works which studied infinite-width NNs trained with gradient descent (GD) using the Tensor Programs (TP) framework . We show that our discrete time field theory at unit feature learning strength recovers the stochastic process which was derived from TP. The stochastic process derived from TP has provided insights into practical issues in NN training such as hyper-parameter search . Computing the exact infinite-width limit of GD has exponential time requirements , which we show can be circumvented with an alternating sampling procedure. A projected variant of GD training has provided an infinite-width theory that could be scaled to realistic datasets like CIFAR-10 . Inspired by Chizat and Bach’s work on mechanisms of lazy and rich training , our theory interpolates between lazy and rich behavior in the mean field limit for varying and allows comparison of DMFT to perturbative analysis near small . Further, our derivation of a DMFT action allows the possibility of pursuing finite width effects.
Our theory is inspired by self-consistent dynamical mean field theory (DMFT) from statistical physics . This framework has been utilized in the theory of random recurrent networks , tensor PCA , phase retrieval , and high-dimensional linear classifiers , but has yet to be developed for deep feature learning. By developing a self-consistent DMFT of deep NNs, we gain insight into how features evolve in the rich regime of network training, while retaining many pleasant analytic properties of the infinite-width limit.
Problem Setup and Definitions
where we define base cases . We note that the above formula holds for any data point which may or may not be in the set of training examples. The above expressions demonstrate that knowledge of the temporal trajectory of the NTK on the diagonal gives the temporal trajectory of the network predictions .
Following prior works on infinite-width networks , we study the mean field limit
As we demonstrate in the Appendix D and N, this is the only -scaling which allows feature learning as . The limit recovers the static NTK limit . We discuss other scalings and parameterizations in Appendix N, relating our work to the -parameterization and TP analysis of , showing they have identical feature dynamics in the infinite-width limit. We also analyze the effect of different hidden layer widths and initialization variances in the Appendix D.8. We focus on equal widths and NTK parameterization (as in eq. (1)) in the main text to reduce complexity.
Self-consistent DMFT
Next, we derive our self-consistent DMFT in a limit where . Our goal is to build a description of training dynamics purely based on representations, and independent of weights. Studying feature learning at infinite-width enjoys several analytical properties:
The next section derives these facts from a path-integral formulation of gradient flow dynamics.
We let represent the moment generating functional (MGF) for these stochastic fields
2 Deriving the DMFT Equations from the Path Integral Saddle Point
where denotes an average over the stochastic process induced by , which is defined below
This theory is easily extended to more general architectures such as networks with varying widths by layer (App. D.8), trainable bias parameter (App. H), multiple (but ) output channels (App. I), convolutional architectures (App. G), networks trained with weight decay (App. J), Langevin sampling (App. K) and momentum (App. L), discrete time training (App. M). In Appendix N, we discuss parameterizations which give equivalent feature and predictor dynamics and show our derived stochastic process is equivalent to the scheme of Yang & Hu .
Solving the Self-Consistent DMFT
Examples of the predictions obtained by solving these systems of equations are provided in Figure 2. We see that these DMFT equations describe kernel evolution for networks of a variety of depths and that the change in each layer’s kernel increases with the depth of the network.
2 Feature Learning with L2 Regularization
As we show in Appendix J, the DMFT can be extended to networks trained with weight decay . If neural network is homogenous in its parameters so that (examples include networks with linear, ReLU, quadratic activations), then the final network predictor is a kernel regressor with the final NTK where is the final-NTK, and . We note that the effective regularization increases with depth . In NTK parameterization, weight decay in infinite width homogenous networks gives a trivial fixed point and consequently a zero predictor . However, as we show in Figure 3, increasing feature learning can prevent convergence to the trivial fixed point, allowing a non-zero fixed point for even at infinite width. The kernel and function dynamics can be predicted with DMFT. The fixed point is a nontrivial function of the hyperparameters .
Approximation Schemes
We now compare our exact DMFT with approximations of prior works, providing an explanation of when these approximations give accurate predictions and when they break down.
In the limit, we recover static kernels, giving linear dynamics identical to the NTK limit . Corrections to this lazy limit can be extracted at small but finite . This is conceptually similar to recent works which consider perturbation series for the NTK in powers of (though not identical, see Appendix P.7 for finite effects). We expand all observables in a power series in , giving and compute corrections up to . We show that the and corrections to kernels vanish, giving leading order expansions of the form and (see Appendix P.2). Further, we show that the NTK has relative change at leading order which scales linearly with depth , which is consistent with finite width effective field theory at (Appendix P.6). Further, at the leading order correction, all temporal dependencies are controlled by functions and , which is consistent with those derived for finite width NNs using a truncation of the Neural Tangent Hierarchy . To lighten notation, we focus our main text comparison of our non-perturbative DMFT to perturbation theory in the deep linear case. Full perturbation theory is in Appendix P.2.
Using the timescales derived in the previous section, we find that the leading order correction to the kernels in infinite-width deep linear network have the form
We see that the relative change in the NTK , so that large depth networks exhibit more significant kernel evolution, which agrees with other perturbative studies as well as the non-perturbative results in Figure 2. However at large and large , this theory begins to break down as we show in Figure 4.
Our DMFT suggests that for networks sufficiently wide for their kernels to concentrate, the dynamics of loss and kernels should be invariant under the rescaling , which keeps fixed. To evaluate how well this idea holds in a realistic deep learning problem, we trained CNNs of varying channel counts on two-class CIFAR classification . We tracked the dynamics of the loss and the last layer kernel. The results are provided in Figure 5. We see that dynamics are largely independent of rescaling as predicted. Further, as expected, larger leads to larger changes in kernel norm and faster alignment to the target function , as was also found in . Consequently, the higher networks train more rapidly. The trend is consistent for width and . More details about the experiment can be found in Appendix C.2.
Discussion
We provided a unifying DMFT derivation of feature dynamics in infinite networks trained with gradient based optimization. Our theory interpolates between lazy infinite-width behavior of a static NTK in and rich feature learning. At , our DMFT construction agrees with the stochastic process derived previously with the Tensor Programs framework . Our saddle point equations give self-consistency conditions which relate the stochastic fields to the kernels. These equations are exactly solveable in deep linear networks and can be efficiently solved with a numerical method in the nonlinear case. Comparisons with other approximation schemes show that DMFT can be accurate at a much wider range of . We believe our framework could be a useful perspective for future theoretical analyses of feature learning and generalization in wide networks.
Though our DMFT is quite general in regards to the data and architecture, the technique is not entirely rigorous and relies on heuristic physics techniques. Our theory holds in the and may break down otherwise; other asymptotic regimes (such as , etc) may exhibit phenomena relevant to deep learning practice . The computational requirements of our method, while smaller than the exponential time complexity for exact solution , are still significant for large . In Table 1, we compare the time taken for various theories to compute the feature kernels throughout steps of gradient descent. For a width network, computation of each forward pass on all data points takes computations. The static NTK requires computation of entries in the kernel which do not need to be recomputed. However, the DMFT requires matrix multiplications on matrices giving a time scaling. Future work could aim to improve the computational overhead of the algorithm, by considering data averaged theories or one pass SGD . Alternative projected versions of gradient descent have also enabled much better computational scaling in evaluation of the theoretical predictions , allowing evaluation on full CIFAR-10.
Acknowledgments and Disclosure of Funding
This work was supported by NSF grant DMS-2134157 and an award from the Harvard Data Science Initiative Competitive Research Fund. BB acknowledges additional support from the NSF-Simons Center for Mathematical and Statistical Analysis of Biology at Harvard (award #1764269) and the Harvard Q-Bio Initiative.
BB thanks Jacob Zavatone-Veth, Alex Atanasov, Abdulkadir Canatar, and Ben Ruben for comments on this manuscript as well as Greg Yang, Boris Hanin, Yasaman Bahri, and Jascha Sohl-Dickstein for useful discussions.
References
Checklist
Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] As described in the abstract and introduction, we provide a dynamical field theory of deep networks based on kernel evolution.
Did you describe the limitations of your work? [Yes] We have an explicit limitations as the last paragraph of the paper in Section 7.
Did you discuss any potential negative societal impacts of your work? [N/A] This work is theoretical and is very unlikely to present negative social impacts.
Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
If you are including theoretical results…
Did you state the full set of assumptions of all theoretical results? [Yes] We describe that our theory holds for NN architectures in the infinite-width limit.
Did you include complete proofs of all theoretical results? [Yes] All claims made in the main text are supported by derivations in the Appendix.
Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] Code to reproduce experimental results is provided in the supplementary material.
Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We provide details of all experiments in C.
Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We provided errorbars in the alignment scores of DMFT as a function of width in Figure 1. All other runs were over a single wide network, where performance is predicted to concentrate over initialization.
Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] We mention our GPU usage in C.2.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets…
If your work uses existing assets, did you cite the creators? [Yes] We cited the creators of Jax, Neural Tangents, and CIFAR-10.
Did you mention the license of the assets? [N/A] These are all open source provided they are appropriately credited in academic research.
Did you include any new assets either in the supplemental material or as a URL? [N/A]
Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
If you used crowdsourcing or conducted research with human subjects…
Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
Appendix
Appendix A Additional Figures
Appendix B Algorithmic Implementation
The parameter controls recency weighting of the samples obtained at each iteration. If , then the rank of the kernel estimates is limited to the number of samples used in a single iteration, but with smaller sample sizes can be used to still obtain accurate results. We used in our deep network experiments. Convergence is usually achieved in around steps for a depth 4 ( hidden layer) network such as the one in Figure 1 and 7.
Appendix C Experimental Details
All NN training was performed with Jax gradient descent optimizer with fixed learning rate.
C.2 CNN Experiments on CIFAR-10
We define a depth CNN model with ReLU activations and stride , which is implemented as a pytree of parameters in JAX . We apply global average pooling in the final layer before a dense readout layer. The code to initialize and evaluate the model is provided below.
Appendix D Derivation of Self-Consistent Dynamical Field Theory
In this section, we introduce the dynamical field theory setup and saddle point equations. The path integral theory we develop is based on the Martin-Siggia-Rose-De Dominicis-Janssen (MSRDJ) framework , of which a useful review for random recurent networks can be found here . Similar computations can be found in recent works which consider typical behavior in high dimensional classification on random data .
As discussed in the main text, we consider the following wide network architecture parameterzied by trainable weights , giving network output defined as
Since is at initialization, it is clear that to have evolution of the network output at initialization we need . With this scaling, we have the following
which allows us to compute the NTK in terms of these features
where is the input Grammian. We see that the NTK can be built out of the following primitive kernels
We observe that the dynamics of the hidden features is controlled by the factor . If then we recover static NTK in the limit as . However, if then we obtain evolution of our features and we reach a new rich regime. We choose the scaling for our field theory so that will give a feature learning network.
D.2 Warmup: DMFT for One Hidden Layer NN
where the network predictions evolve as for kernels and . At finite , the kernels will depend on the random initial conditions , leading to a predictor which varies over initializations. If we can establish that the kernels concentrate at infinite-width , then are deterministic. We now study the moment generating function for the fields
To perform the average over , we enforce the definition of with delta functions
Though this step may seem redundant in this example, it will be very helpful in the deep network case, so we pursue it for illustration. After mulitplying by these factors of unity and performing the Gaussian integrals, we obtain
We now aim enforce the definitions of the kernel order parameters with delta functions
where the fields are regarded as functions of (see Equation (D.2)) and the integrals run over the imaginary axis . After this step, we can write
where the DMFT action is and has the form
The single site moment generating function arises from the factorization of the integrals over different fields in the hidden layer and takes the form
where the -th single site average of an observable is defined as
Since the single site MGF reveals that the initial fields are independent Gaussians and . At zero source , all single site averages are equivalent and we may merely write , where is the average over the single site distributions for .
Putting all of the saddle point equations together, we arrive at the following DMFT
We see that for networks, it suffices to solve for the kernels on the time-time diagonal. Further in this two layer case are independent and do not vary in time. These facts will not hold in general for networks, which requires a more intricate analysis as we show in the next section.
D.3 Path Integral Formulation for Deep Networks
Moments of these stochastic fields can be computed through differentiation of near zero-source
D.4 Order Parameters and Action Definition
We define the following order parameters which we will show concentrate in the limit
After introducing these order parameters into the definition of the partition function, we have a factorization of the integrals over each of the sites in each hidden layer. This gives the following partition function
We thus see that the action consists of inner-products between order parameters and their duals as well as a single site MGF , which is defined as
D.5 Saddle Point Equations
Since the integrand in the moment generating function takes the form , the limit can be obtained from saddle point integration, also known as the method of steepest descent . This consists in finding order parameters which render the action locally stationary. Concretely, this leads to the following saddle point equations.
We use the notation to denote an average over the self-consistent distribution on fields induced by the single-site moment generating function at the saddle point. Concretely if then the single-site self-consistent average of observable is defined as
As we will demonstrate in the next subsection, these correlators must vanish. Lastly, we can calculate the remaining correlators in terms of primal variables
D.6 Single Site Stochastic Process: Hubbard Trick
To get a better sense of this distribution, we can now simplify the quadratic forms appearing in using the Hubbard trick , which merely relates a Gaussian function to its Fourier transform.
Applying this to the quadratic forms in the single-site MGF , we get
D.7 Final DMFT Equations
D.8 Varying Network Widths and Initialization Scales
Using our definition of the kernels and the fields
We also find the usual formula for the NTK
Appendix E Two Layer Networks
In a two layer network, there are no or order parameters, so the fields and are always independent. Further, and are both constant throughout training dynamics. Thus we can obtain differential rather than integral equations for the stochastic fields which are
where the average is taken over the random initial conditions and . An example of the two layer theory for a ReLU network can be found in Appendix Figure 6. In this two layer setting, a drift PDE can be obtained for the joint density of preactivations and feedback fields
which is a zero-diffusion feature space version of the PDE derived in the original two layer mean field limit of neural networks .
Appendix F Deep Linear Networks
Using the formulas which define the fields, we have
The saddle point equations can thus be written as
The kernels and thus evolve as
where the initial conditions are , and . These equations hold for any choice of data .
For input data which is whitened where , then the dynamics can be simplified even further, recovering the sigmoidal curves very similar to those obtained under a special initialization . In this case we note that the error signal always evolves in the direction, , and that only evolves in a rank one direction direction as well. Let . Let represent the norm of the target vector, then the relevant scalar dynamics are
We note that this system obeys a conservation law which constrains to a hyperbola
This conservation law implies that or that the final kernel has the form . The result that the final kernel becomes a rank one spike in the direction of the target function was also obtained in finite width networks in the limit of small initialization and also from a normative toy model of feature learning . We can use the conservation law above to simplify the dynamics to a one dimensional system
where . We see that increasing provides strict acceleration in the learning dynamics, illustrating the training benefits of feature evolution. Since this system is separable, we can solve for the time it takes for the network output norm to reach output level
The NTK limit can be obtained by taking which gives
which recovers the usual convergence rate of a linear model. The right hand side of Equation (F.1.1) has a perturbation series in which converges in the disk . The other limit of interest is the limit where
which recovers the logistic growth observed in the initialization scheme of prior works . The timescale required to learn is only , which is much smaller than the time to learn predicted from the small expansion. We note that the above leading order asymptotic behavior at large considers the DMFT initial condition as an unstable fixed point. For realistic learning curves, one would need to stipulate some alternative initial condition such as for some small in order to have nontrivial leading order dynamics.
F.2 Deep Linear Whitened Data
Lastly we have the simple evolution equation for the scalar error
Appendix G Convolutional Networks with Infinite Channels
The feature space description of the forward and backward pass relations is
These two order parameters per layer collectively define the neural tangent kernel. Following the computation in D, we obtain the following field theory in the limit:
We see that this field theory essentially multiples the number of sample indices by the number of spatial indices . Thus the time complexity of evaluation of this theory scales very poorly as , rendering DMFT solutions very computationally intensive.
Appendix H Trainable Bias Parameter
Appendix I Multiple Output Channels
We can now compute the NTK for samples
From these fields, the saddle point equations define the kernels as
This allows studying the multi-class structure of learned representations.
Appendix J Weight Decay in Deep Homogenous Networks
If we train with weight decay, , in a -degree homogenous network (), then the prediction dynamics satisfy
This holds by the following identity , which when evaluated at gives . This identity was utilized in a prior work which studied L2 regularization in the lazy regime . For a -hidden layer ReLU network , the degree is , while rectified power law nonlinearities give degrees . We note that the fixed point of the function dynamics above gives a representer theorem with the final NTK
where and . The prior work of Lewkowycz et al considered NTK parameterization . In this limit, the kernel (and consequently output function) decay to zero at large time, but if , then the network converges to a nontrivial fixed point as . In the DMFT limit we can determine the final kernel by solving the following field dynamics
We see that the contribution from initial conditions is exponentially suppressed at large time while the second term contributes most when the system has equilibrated. We provide an example of the weight decay DMFT showing its validity in a two layer ReLU network in Figure 3.
Appendix K Bayesian/Langevin Trained Mean Field Networks
Rather than studying exact gradient flow, many works have considered Langevin dynamics (gradient flow with white noise process on the weights) of neural network training . This setting is of special theoretical interest since the distribution of parameters converges at long times to a Gibbs equilibrium distribution which has a Bayesian interpretation . The relevant Langevin equation for our mean field gradient flow is
where is a ridge penalty which controls the scale of parameters, and is a Brownian motion term which has covariance structure . The parameter , known as the inverse temperature controls the scale of the random Gaussian noise injected into this stochastic process. The dynamical treatment of the limit will coincide with our usual DMFT while the will exhibit a nontrivial balance between the usual DMFT feature updates and the random Langevin noise. At late times, such a system will equilibrate to its Gibbs distribution.
In this section we analyze the dynamical mean field theory for these Langevin dynamics. First we note that the effect of regularization can be handled with a simple integrating factor
Our aim is now to compute the moment generating function for the fields which causally determine . This MGF has the form
We insert Dirac-delta functions in the usual way to enforce the definitions of and then average over . These averages can be performed separately with the average giving the identical terms as derived in previous sections. We focus on the average over Brownian disorder
The order parameters can be determined by the saddle point equations. These equations for are the same as before. The new equations are
As before, we make the substitutions and and arrive at the final DMFT equations
K.2 Weak Feature Learning, Long Time Limit
On the temporal diagonal , these equations give the usual recursions used to compute the NNGP kernels at initialization , though with initialization variance , set by the weight decay term in the Langevin dynamics. This indicates that the long time Langevin dynamics at simply rescales the Gaussian weight variance based on . It would be interesting to explore fluctuation dissipation relationships at finite within this framework which we leave to future work.
K.3 Equilibrium Analysis
We see that where
which implies that at the fixed point satisfies the following equations
The last layer’s dual kernel has the form , which we see vanishes as feature learning strength is taken to zero , while for non-negligible , we see that the last layer features are non-Gaussian. We thus see that the moment generating function for the last layer field has the form
In the limit, the non-Gaussian component of this density vanishes. Now that we have this form, we can compute conditional on . Next, we calculate , giving
Again, we note that in the limit, since , so that , implying that the fields are also Gaussian in this limit. For arbitrary , this recursive argument can be completed going backwards using
For deep linear networks, the distributions are all Gaussian, allowing one to close algebraically, the saddle point equations for .
Appendix L Momentum Dynamics
Standard gradient descent often converges slowly and requires careful tuning of learning rate. Momentum, in contrast can, be stable under a wider range of learning rates and can benefit from acceleration on certain problems . In this section we show that our field theory is still valid when training with momentum; simply altering the field definitions appropriately gives the infinite-width feature learning behavior.
which implies the following field evolution
We see that in the limit, the integral is dominated by the contribution at recovering usual gradient descent dynamics. For , we see that the integral accumulates additional contributions from the past values of fields and kernels.
Appendix M Discrete Time
We treat as a potentially random variable and insert
Noting that is involved in the definition of both and , we see that the average over now takes the form
We extend our definition as before . Proceeding with the calculation as usual, we find that
The saddle point equations can now be analyzed. In addition to the usual order parameters, we note that also generate saddle point equations
We also obtain saddle point equations for the new order parameters.
which implies and . This gives the following DMFT
We leave it to future work to verify that a continuous time limit of the above DMFT recovers function evolution governed by the NTK.
Appendix N Equivalent Parameterizations
We will now derive constraints on which give desired large width behavior. We will identify a one-dimensional family of parameterizations which satisfy three desiderata of network training 1. finite preactivations, 2. learning in finite time, 3. feature learning.
As before we let the NTK be the matrix which defines network prediction dynamics . We demand that this matrix be so that the network predictions have evolution
Having fields which are can be ensured at initialization provided that
Since we already demanded that , this inner product will be . Now we will see whether it remains under its recursion
which is indeed as desired provided that .
N.4 Putting Constraints Together
We now let . We see that the set of parameterizations which yield feature evolution are those for which
Now that we have established that the parameterization we consider here (modified NTK parameterization) is equivalent to , (modified standard parameterization), we will now demonstrate that the stochastic process which we obtained through a stationary action principle applied to our DMFT action is equivalent to the stochastic process derived from the Tensor Programs framework of Yang . Using the notation from Appendix H of Yang and Hu , they give the following evolution equations for the preactivations in a hidden layer in one pass SGD
After these substitutions are made, we see that the equations above match the one-pass SGD version of the DMFT Equations in Appendix M. A similar identification can be made for the backward pass. This shows that both Tensor Programs and DMFT, though alternative derivations, give identical descriptions of the stochastic processes induced by random initializations + GD in infinite neural networks.
Appendix O Gradient Independence
Appendix P Perturbation Theory
In this section we analyze the leading corrections in a small expansion of our DMFT theory. All fields are expanded in power series in .
Our goal is to calculate all corrections to the kernels up to to show that the leading correction is and the subleading correction is . It will again be convenient to utilize the vector notation defined in D.
We note that unlike other works on perturbation theory in wide networks, we do not attempt to characterize fluctuation effects in the kernels due to finite width, but rather operate in a regime where the kernels are concentrating and their variance is negligible. For a more thorough discussion of perturbative field theory in finite width networks, see .
Note that and note that .
We can simplify the notation by introducing functions and .
P.2 Nonlinear Perturbation Theory
We start with the formula which implicitly defines
We proceed under the assumption of a power series in
We start in the first layer where (note that this is ) and compute the expansion of in
We also obtain, by a similar argument, that the cubic term vanishes. To see this, note that only contains odd powers of . Next, contains only odd powers of , and is cubic in . Since all odd moments of a mean-zero Gaussian vanish, all averages of these terms over annihilate, causing the terms to vanish. Thus .
The analogous argument for now can be provided. First note that is independent of and of . Thus we can find that has no linear-in- term in its expansion since
each term contains only odd powers of and odd moments of Gaussian variables vanish. After much more work, one can verify that also must vanish since all terms contain odd powers of .
First, note that is linear in . Next, note that only depends on even powers of since . Next, we have
which only depends on odd powers of . Lastly, we have
which we see only contains even powers of . Thus will be odd in . Looking at the expansion for , we see that all terms are odd in and so the averages vanish under the Gaussian integrals.
P.6 Form of the Leading Corrections
The first term requires additional expansion to extract the corrections in
Now the correction to the NTK has the form
P.7 Perturbation Theory in Width N𝑁N (Finite Size Corrections)
The infinite-width DMFT is characterized by the set of saddle point equations which are . Let the saddle point be . To identify corrections to the observable average due to finite size, we now Taylor expand around
The linear component vanishes at the saddle point since . Our observable average is thus
where we made the change of variables . The function contains all higher order terms (cubic and higher) in the Taylor expansion of . Since the leading power in is cubic in , the leading behavior of this remainder is so it can be regarded as a perturbation to the Gibbs distribution. Taylor expanding the exponential in both numerator and denominator, we eliminate the presence of the higher order terms in the Gibbs measure. Lastly, we let represent an average over the unperturbed Gaussian potential . For notational simplicity, we let and obtain
where represents a connected cumulant . The first two connected correlations have the form
If one is interested only in the leading order correction to the observable , this can be obtained with the following correction
Since both corrections are of order . This analysis shows that the leading order correction of the kernel distributions is and can be approximated by performing averages over a Gaussian distribution for determined by the saddle point solution and covariance given by . We derive expressions for the components of this Hessian in P.7.1. These fluctuations have standard deviation . This technique is a common approach to identifying finite size effects and was recently employed in Bayesian inference setting for networks in the lazy regime .
Before computing the Hessian terms, we can compare finite size effects under NTK scaling , and the mean field scaling . Concretely, we are interested in the feature learning component of the kernel change which is . Let represent the change in the kernel through training, which we showed in P.2 is of size . We will now define the signal to noise ratio of feature learning as
For NTK regime, this is vanishing as , while for the DMFT regime, this is goes as since kernel evolution is always but variance is .