<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Self-consistent dynamical field theory of kernel evolution in wide neural networks &lt;sup&gt;*&lt;/sup&gt;</title></titleStmt>
			<publicationStmt>
				<publisher>IOP Publishing Ltd and SISSA Medialab</publisher>
				<date>11/01/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10541946</idno>
					<idno type="doi">10.1088/1742-5468/ad01b0</idno>
					<title level='j'>Journal of Statistical Mechanics: Theory and Experiment</title>
<idno>1742-5468</idno>
<biblScope unit="volume">2023</biblScope>
<biblScope unit="issue">11</biblScope>					

					<author>Blake Bordelon</author><author>Cengiz Pehlevan</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[<title>Abstract</title> <p>We analyze feature learning in infinite-width neural networks trained with gradient flow through a self-consistent dynamical field theory. We construct a collection of deterministic dynamical order parameters which are inner-product kernels for hidden unit activations and gradients in each layer at pairs of time points, providing a reduced description of network activity through training. These kernel order parameters collectively define the hidden layer activation distribution, the evolution of the neural tangent kernel (NTK), and consequently, output predictions. We show that the field theory derivation recovers the recursive stochastic process of infinite-width feature learning networks obtained by Yang and Hu with tensor programs. For deep linear networks, these kernels satisfy a set of algebraic matrix equations. For nonlinear networks, we provide an alternating sampling procedure to self-consistently solve for the kernel order parameters. We provide comparisons of the self-consistent solution to various approximation schemes including the static NTK approximation, gradient independence assumption, and leading order perturbation theory, showing that each of these approximations can break down in regimes where general self-consistent solutions still provide an accurate description. Lastly, we provide experiments in more realistic settings which demonstrate that the loss and kernel dynamics of convolutional neural networks at fixed feature learning strength are preserved across different widths on a image classification task.</p>]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Deep learning has emerged as a successful paradigm for solving challenging machine learning and computational problems across a variety of domains <ref type="bibr">[1,</ref><ref type="bibr">2]</ref>. 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.</p><p>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 (GD) trained networks converge to gaussian processes (NNGPs) <ref type="bibr">[3]</ref><ref type="bibr">[4]</ref><ref type="bibr">[5]</ref> and neural tangent kernel (NTK) machines <ref type="bibr">[6]</ref><ref type="bibr">[7]</ref><ref type="bibr">[8]</ref> in their respective infinite-width limits. These limits provide both analytic tractability as well as detailed training and generalization analysis <ref type="bibr">[9]</ref><ref type="bibr">[10]</ref><ref type="bibr">[11]</ref><ref type="bibr">[12]</ref><ref type="bibr">[13]</ref><ref type="bibr">[14]</ref><ref type="bibr">[15]</ref><ref type="bibr">[16]</ref>. 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 <ref type="bibr">[17,</ref><ref type="bibr">18]</ref>. 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 <ref type="bibr">[19,</ref><ref type="bibr">20]</ref>. Thus, alternative theories capable of modeling feature learning dynamics are needed.</p><p>Recently developed alternative parameterizations such as the mean field <ref type="bibr">[21]</ref> and the &#181;P <ref type="bibr">[22]</ref> parameterizations allow feature learning in infinite-width NNs trained with GD. Using the tensor programs (TPs) framework, Yang and Hu identified a stochastic process that describes the evolution of preactivation features in infinite-width &#181;P NNs <ref type="bibr">[22]</ref>. In this work, we study an equivalent parameterization to &#181;P 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 &#947; 0 that allows smooth interpolation between lazy and rich behavior <ref type="bibr">[17]</ref>. We provide a new computational procedure to sample this stochastic process and demonstrate its predictive power for wide NNs.</p><p>Our novel contributions in this paper are the following:</p><p>(i) 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 &#947; 0 to allow interpolation between rich and lazy regimes and comparison to perturbative methods. (ii) 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 &#947; 0 = 1, from an alternative method, the same stochastic process obtained previously with TPs <ref type="bibr">[22]</ref>. (iii) We develop a polynomial-time numerical procedure to solve the saddle point equations for deep networks. In numerical experiments, we demonstrate that Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>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.</p><p>Code to reproduce our experiments can be found on our Github.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1.">Related works</head><p>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 <ref type="bibr">[23]</ref><ref type="bibr">[24]</ref><ref type="bibr">[25]</ref><ref type="bibr">[26]</ref><ref type="bibr">[27]</ref><ref type="bibr">[28]</ref><ref type="bibr">[29]</ref> and self-consistent techniques <ref type="bibr">[30]</ref><ref type="bibr">[31]</ref><ref type="bibr">[32]</ref><ref type="bibr">[33]</ref>. In the GD based setting, leading order corrections to the NTK dynamics have been analyzed to study finite width effects <ref type="bibr">[27,</ref><ref type="bibr">[34]</ref><ref type="bibr">[35]</ref><ref type="bibr">[36]</ref>. 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 <ref type="bibr">[37,</ref><ref type="bibr">38]</ref>.</p><p>Another approach to studying feature learning is to alter NN parameterization in gradient-based learning to allow significant feature evolution even at infinite-width, the mean field limit <ref type="bibr">[21,</ref><ref type="bibr">39]</ref>. Works on mean field NNs have yielded formal loss convergence results <ref type="bibr">[40,</ref><ref type="bibr">41]</ref> and shown equivalences of gradient flow dynamics to a partial differential equation (PDE) <ref type="bibr">[42]</ref><ref type="bibr">[43]</ref><ref type="bibr">[44]</ref>.</p><p>Our results are most closely related to a set of recent works which studied infinitewidth NNs trained with GD using the TPs framework <ref type="bibr">[22]</ref>. We show that our discrete time field theory at unit feature learning strength &#947; 0 = 1 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 <ref type="bibr">[45]</ref>. Computing the exact infinite-width limit of GD has exponential time requirements <ref type="bibr">[22]</ref>, 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 <ref type="bibr">[46]</ref>. Inspired by Chizat and Bach's work on mechanisms of lazy and rich training <ref type="bibr">[17]</ref>, our theory interpolates between lazy and rich behavior in the mean field limit for varying &#947; 0 and allows comparison of DMFT to perturbative analysis near small &#947; 0 . Further, our derivation of a DMFT action allows the possibility of pursuing finite width effects.</p><p>Our theory is inspired by self-consistent DMFT from statistical physics <ref type="bibr">[47]</ref><ref type="bibr">[48]</ref><ref type="bibr">[49]</ref><ref type="bibr">[50]</ref><ref type="bibr">[51]</ref><ref type="bibr">[52]</ref><ref type="bibr">[53]</ref>. This framework has been utilized in the theory of random recurrent networks <ref type="bibr">[54]</ref><ref type="bibr">[55]</ref><ref type="bibr">[56]</ref><ref type="bibr">[57]</ref><ref type="bibr">[58]</ref><ref type="bibr">[59]</ref>, tensor PCA <ref type="bibr">[60,</ref><ref type="bibr">61]</ref>, phase retrieval <ref type="bibr">[62]</ref>, and high-dimensional linear classifiers <ref type="bibr">[63]</ref><ref type="bibr">[64]</ref><ref type="bibr">[65]</ref><ref type="bibr">[66]</ref>, 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.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Problem setup and definitions</head><p>Our theory applies to infinite-width networks, both fully-connected and convolutional. For notational ease we will relegate convolutional results to later sections.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>For input x &#181; &#8712; R D , we define the hidden pre-activation vectors h &#8467; &#8712; R N for layers &#8467; &#8712; {1, . . . , L} as</p><p>where &#952; = Vec{W 0 , . . . , w L } are the trainable parameters of the network and &#981; is a twice differentiable activation function. Inspired by previous works on the mechanisms of lazy gradient based training, the parameter &#947; will control the laziness or richness of the training dynamics <ref type="bibr">[17,</ref><ref type="bibr">18,</ref><ref type="bibr">22,</ref><ref type="bibr">42]</ref>. Each of the trainable parameters are initialized as Gaussian random variables with unit variance W &#8467; ij &#8764; N (0, 1). They evolve under gradient flow d dt &#952; = -&#947; 2 &#8711; &#952; L. The choice of learning rate &#947; 2 causes d dt L| t=0 to be independent of &#947;. To characterize the evolution of weights, we introduce back-propagation variables</p><p>where z &#8467; &#181; is the pre-gradient signal. The relevant dynamical objects to characterize feature learning are feature and gradient kernels for each hidden layer &#8467; &#8712; {1, . . . , L}, defined as</p><p>From the kernels {&#934; &#8467; , G &#8467; } L &#8467;=1 , we can compute the NTK K NTK &#181;&#945; (t, s) = &#8711; &#952; f &#181; (t) &#8226; &#8711; &#952; f &#945; (s) = L &#8467;=0 G &#8467;+1 &#181;&#945; (t, s)&#934; &#8467; &#181;&#945; (t, s), <ref type="bibr">[6]</ref> and the dynamics of the network function</p><p>where we define base cases G L+1 &#181;&#945; (t, s) = 1, &#934; 0 &#181;&#945; (t, s) = K x &#181;&#945; = 1 D x &#181; &#8226; x &#945; . In prior work, &#934; &#8467; , G &#8467; were termed forward and backward kernels and were theoretically computed at initialization and empirically measured through training <ref type="bibr">[67]</ref>. Our DMFT will provide exact formulas for these kernels throughout the full dynamics of feature learning. We note that the above formula holds for any data point &#181; which may or may not be in the set of P training examples. The above expressions demonstrate that knowledge of the temporal trajectory of the NTK on the t = s diagonal gives the temporal trajectory of the network predictions f &#181; (t).</p><p>Following prior works on infinite-width networks <ref type="bibr">[18,</ref><ref type="bibr">21,</ref><ref type="bibr">22,</ref><ref type="bibr">40]</ref>, we study the mean field limit</p><p>As we demonstrate in the appendices D and N, this is the only N -scaling which allows feature learning as N &#8594; &#8734;. The &#947; 0 = 0 limit recovers the static NTK limit <ref type="bibr">[6]</ref>. We discuss other scalings and parameterizations in appendix N, relating our work to the &#181;Pparameterization and TP analysis of <ref type="bibr">[22]</ref>, showing they have identical feature dynamics</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>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 equation ( <ref type="formula">1</ref>)) in the main text to reduce complexity.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Self-consistent DMFT</head><p>Next, we derive our self-consistent DMFT in a limit where t, P = O N (1). 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:</p><p>&#8226; The kernel order parameters &#934; &#8467; , G &#8467; concentrate over random initializations but are dynamical, allowing flexible adaptation of features to the task structure. &#8226; In each layer &#8467;, each neuron's preactivation h &#8467; i and pregradient z &#8467; i become i.i.d. draws from a distribution characterized by a set of order parameters {&#934; &#8467; , G &#8467; , A &#8467; , B &#8467; }.</p><p>&#8226; The kernels are defined as self-consistent averages (denoted by &#10216;&#10217;) over this distribution of neurons in each layer</p><p>The next section derives these facts from a path-integral formulation of gradient flow dynamics.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Path integral construction</head><p>Gradient flow after a random initialization of weights defines a high dimensional stochastic process over initalizations for variables {h, g}. Therefore, we will utilize DMFT formalism to obtain a reduced description of network activity during training. For a simplified derivation of the DMFT for the two-layer (L = 1) case, see appendix D.2. Generally, we separate the contribution on each forward/backward pass between the initial condition and gradient updates to weight matrix W &#8467; , defining new stochastic variables &#967; &#8467; , &#958; &#8467; &#8712; R N as</p><p>We let Z represent the moment generating functional (MGF) for these stochastic fields</p><p>, which requires, by construction the normalization condition Z[{0, 0}] = 1. We enforce our definition of &#967;, &#958; using an integral representation of the delta-function. Thus for each sample &#181; &#8712; [P ] and each time t &#8712; R + , we multiply Z by Self-consistent dynamical field theory of kernel evolution in wide neural networks</p><p>for &#967; and the respective expression for &#958;. After making such substitutions, we perform integration over initial Gaussian weight matrices to arrive at an integral expression for Z, which we derive in the appendix D.4. We show that Z can be described by set of order-parameters</p><p>where S is the DMFT action and Z is a single-site MGF, which defines the distribution of fields {&#967; &#8467; , &#958; &#8467; } over the neural population in each layer. The order parameters A and B are related to the correlations between feedforward and feedback signals. We provide a detailed formula for Z in appendix D.4 and show that it factorizes over different layers Z = L &#8467;=1 Z &#8467; . Each of the single site MGFs has the form</p><p>where H &#8467; is a single-site Hamiltonian that depends on the order parameters and defines the probability density over fields {&#967; &#8467; , &#958; &#8467; , &#967;&#8467; , &#958;&#8467; }. We introduce the single site average</p><p>In the next section, we express the DMFT saddle-point equations defining {&#934; &#8467; , G &#8467; } in terms of such single site averages.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Deriving the DMFT equations from the path integral saddle point</head><p>As N &#8594; &#8734;, the moment-generating function Z is exponentially dominated by the saddle point of S. The equations that define this saddle point also define our DMFT. We thus identify the kernels that render S locally stationary (&#948;S = 0). The most important equations are those which define {&#934; &#8467; , G &#8467; } Self-consistent dynamical field theory of kernel evolution in wide neural networks</p><p>where &#10216;&#10217; denotes an average over the stochastic process induced by Z, which is defined below</p><p>where we define base cases &#934; 0 &#181;&#945; (t, s) = K x &#181;&#945; and G L+1 &#181;&#945; (t, s) = 1, A 0 = B L = 0. We see that the fields {h &#8467; , z &#8467; }, which represent the single site preactivations and pre-gradients, are implicit functionals of the mean-zero Gaussian processes {u &#8467; , r &#8467; } which have covariances</p><p>The other saddle point equations give the linear response functions</p><p>which arise due to dependence between the feedforward and feedback signals. We note that, in the lazy limit &#947; 0 &#8594; 0, the fields approach Gaussian processes h &#8467; &#8594; u &#8467; , z &#8467; &#8594; r &#8467; . Lastly, the final saddle point equations &#948;S &#948;&#934; &#8467; = 0, &#948;S &#948;G &#8467; = 0 imply that &#934;&#8467; = &#284;&#8467; = 0. The full set of equations that define the DMFT are given in appendix D.7.</p><p>This theory is easily extended to more general architectures such as networks with varying widths by layer (appendix D.8), trainable bias parameter (appendix H), multiple (but O N (1)) output channels (appendix I), convolutional architectures (appendix G), networks trained with weight decay (appendix J), Langevin sampling (appendix K) and momentum (appendix L), discrete time training (appendix M). In appendix N, we discuss parameterizations which give equivalent feature and predictor dynamics and show our derived stochastic process is equivalent to the &#181;P scheme of Yang and Hu <ref type="bibr">[22]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Solving the self-consistent DMFT</head><p>The saddle point equations obtained from the field theory discussed in the previous section must be solved self-consistently. By this we mean that, given knowledge of the kernels, we can characterize the distribution of {h &#8467; , z &#8467; }, and given the distribution of {h &#8467; , z &#8467; }, we can compute the kernels <ref type="bibr">[64,</ref><ref type="bibr">68]</ref>. In appendix B, we provide algorithm 1, a numerical procedure based on this idea to efficiently solve for the kernels with an  alternating Monte-Carlo strategy. The output of the algorithm are the dynamical kernels &#934; &#8467; &#181;&#945; (t, s), G &#8467; &#181;&#945; (t, s), A &#8467; &#181;&#945; (t, s), B &#8467; &#181;&#945; (t, s), from which any network observable can be computed as we discuss in appendix D. We provide an example of the solution to the saddle point equations compared to training a finite NN in figure <ref type="figure">1</ref>. We plot &#934; &#8467; , G &#8467; at the end of training and the sample-trace of these kernels through time. Additionally, we compare the kernels of finite width N network to the DMFT predicted kernels using a  Deep linear networks (&#981;(h) = h) are of theoretical interest since they are simpler to analyze than nonlinear networks but preserve nontrivial training dynamics and feature learning <ref type="bibr">[23,</ref><ref type="bibr">25,</ref><ref type="bibr">32,</ref><ref type="bibr">[69]</ref><ref type="bibr">[70]</ref><ref type="bibr">[71]</ref><ref type="bibr">[72]</ref><ref type="bibr">[73]</ref>. In a deep linear network, we can simplify our saddle point equations to algebraic formulas that close in terms of the kernels <ref type="bibr">[22]</ref>. This is a significant simplification since it allows the solution of the saddle point equations without a sampling procedure.</p><p>To describe the result, we first introduce a vectorization notation h &#8467; = Vec{h &#8467; &#181; (t)} &#181;&#8712;[P ],t&#8712;R+ . Likewise we convert kernels H &#8467; = Mat{H &#8467; &#181;&#945; (t, s)} &#181;,&#945;&#8712;[P ],t,s&#8712;R+ into matrices. The inner product under this vectorization is defined as a &#8226; b = &#180;&#8734; 0 dt P &#181;=1 a &#181; (t)b &#181; (t). In a practical computational implementation, the theory would be evaluated on a grid of T time points with discrete time GD, so these kernels H &#8467; &#8712; R P T &#215;P T would indeed be matrices of the appropriate size. The fields h &#8467; , g &#8467; are linear functionals of independent Gaussian processes u &#8467; , r &#8467; , giving (I -</p><p>The matrices C &#8467; and D &#8467; are causal integral operators which depend on {A &#8467;-1 , H &#8467;-1 } and {B &#8467; , G &#8467;+1 } respectively which we define in appendix F. The saddle point equations which define the kernels are</p><p>Examples of the predictions obtained by solving these systems of equations are provided in figure <ref type="figure">2</ref>. 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. Unlike many prior results <ref type="bibr">[69]</ref><ref type="bibr">[70]</ref><ref type="bibr">[71]</ref><ref type="bibr">[72]</ref>, our DMFT does not require any restrictions on the structure of the input data but holds for any K x , y. However, for whitened data K x = I we show in appendix F.1.1, appendix F.2 that our DMFT learning curves interpolate between NTK dynamics and the sigmoidal trajectories of prior works <ref type="bibr">[69,</ref><ref type="bibr">70]</ref> as &#947; 0 is increased. For example, in the two layer (L = 1) linear network with K x = I, the dynamics of the error norm &#8710;(t) = ||&#8710;(t)|| takes the form &#8706; &#8706;t &#8710;(t) = -2 1 + &#947; 2 0 (y -&#8710;(t)) 2 &#8710;(t) where y = ||y||. These dynamics give the linear convergence rate of the NTK if &#947; 0 &#8594; 0 but approaches logistic dynamics of <ref type="bibr">[70]</ref> as &#947; 0 &#8594; &#8734;. Further, H(t) = h 1 (t)h 1 (t) &#8868; &#8712; R P &#215;P only grows in the yy &#8868; direction with H y (t) = 1 y 2 y &#8868; H(t)y = 1 + &#947; 2 0 (y -&#8710;(t)) 2 . At the end of training H(t) &#8594; I + 1 y 2 [ 1 + &#947; 2 0 y 2 -1]yy &#8868; , recovering the rank one spike which was recently obtained in the small initialization limit <ref type="bibr">[74]</ref>. We show this one dimensional system in figure <ref type="figure">A3</ref>. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.">Feature learning with L2 regularization</head><p>As we show in appendix J, the DMFT can be extended to networks trained with weight decay d&#952; dt = -&#947; 2 &#8711; &#952; L -&#955;&#952;. If neural network is homogenous in its parameters so that f (c&#952;) = c &#954; f (&#952;) (examples include networks with linear, ReLU, quadratic activations), then the final network predictor is a kernel regressor with the final NTK</p><p>We note that the effective regularization &#955;&#954; increases with depth L. In NTK parameterization, weight decay in infinite width homogenous networks gives a trivial fixed point K(x, x &#8242; ) &#8594; 0 and consequently a zero predictor f &#8594; 0 <ref type="bibr">[75]</ref>. However, as we show in figure <ref type="figure">3</ref>, increasing feature learning &#947; 0 can prevent convergence to the trivial fixed point, allowing a non-zero fixed point for K, f even at infinite width. The kernel and function dynamics can be predicted with DMFT. The fixed point is a nontrivial function of the hyperparameters &#955;, &#954;, L, &#947; 0 . </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Approximation schemes</head><p>We now compare our exact DMFT with approximations of prior work, providing an explanation of when these approximations give accurate predictions and when they break down.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1.">Gradient independence ansatz</head><p>We can study the accuracy of the ansatz A &#8467; = B &#8467; = 0, which is equivalent to treating the weight matrices W &#8467; (0) and W &#8467; (0) &#8868; which appear in forward and backward passes respectively as independent Gaussian matrices. This assumption was utilized in prior works on signal propagation in deep networks in the lazy regime <ref type="bibr">[76]</ref><ref type="bibr">[77]</ref><ref type="bibr">[78]</ref><ref type="bibr">[79]</ref><ref type="bibr">[80]</ref>. A consequence of this approximation is the Gaussianity and statistical independence of &#967; &#8467; and &#958; &#8467; (conditional on {&#934; &#8467; , G &#8467; }) in each layer as we show in appendix O. This ansatz works very well near &#947; 0 &#8776; 0 (the static kernel regime) since dh dr , dz du &#8764; O(&#947; 0 ) or around initialization t &#8776; 0 but begins to fail at larger values of &#947; 0 , t (figures 4 and A4).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2.">Small-feature learning perturbation theory at infinite-width</head><p>In the &#947; 0 &#8594; 0 limit, we recover static kernels, giving linear dynamics identical to the NTK limit <ref type="bibr">[6]</ref>. Corrections to this lazy limit can be extracted at small but finite &#947; 0 . This is conceptually similar to recent works which consider perturbation series for the NTK in powers of 1/N <ref type="bibr">[27,</ref><ref type="bibr">28,</ref><ref type="bibr">35]</ref> (though not identical, see <ref type="bibr">[81]</ref> for finite N effects in mean-field parameterization). We expand all observables q(&#947; 0 ) in a power series in &#947; 0 , giving q(&#947; 0 ) = q (0) + &#947; 0 q (1) + &#947; 2 0 q (2) + . . . and compute corrections up to O(&#947; 2 0 ). We show The feature kernels H &#8467; &#181;&#945; (t, s) across each of the L = 5 hidden layers for each of the theories is compared to a width 1000 neural network. Again, we plot the sample-traced dynamics &#181;&#181; H &#8467; &#181;&#181; (t, s). (d) The alignment of H &#8467; compared to the finite NN A(H &#8467; , H &#8467; NN ) averaged across &#8467; &#8712; {1, . . . , 5} for varying &#947;. The predictions of all of these theories coincide in the &#947; 0 = 0 limit but begin to deviate in the feature learning regime. Only the nonperturbative DMFT is accurate over a wide range of &#947; 0 .</p><p>that the O(&#947; 0 ) and O(&#947; 3 0 ) corrections to kernels vanish, giving leading order expansions of the form</p><p>). Further, we show that the NTK has relative change at leading order which scales linearly with depth</p><p>, which is consistent with finite width effective field theory at &#947; = O N (1) <ref type="bibr">[26]</ref><ref type="bibr">[27]</ref><ref type="bibr">[28]</ref> (appendix P.6). Further, at the leading order correction, all temporal dependencies are controlled by P (P + 1) functions v &#945; (t) = &#180;t 0 ds&#8710; 0 &#945; (s) and v &#945;&#946; (t) = &#180;t 0 ds&#8710; 0 &#945; (s) &#180;s 0 ds &#8242; &#8710; 0 &#946; (s &#8242; ), which is consistent with those derived for finite width NNs using a truncation of the neural tangent hierarchy <ref type="bibr">[27,</ref><ref type="bibr">34,</ref><ref type="bibr">35]</ref>. 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</p><p>We see that the relative change in the NTK</p><p>so that large depth L networks exhibit more significant kernel evolution, which agrees with other perturbative studies <ref type="bibr">[25,</ref><ref type="bibr">27,</ref><ref type="bibr">35]</ref> as well as the nonperturbative results in figure 2. However at large &#947; 0 and large L, this theory begins to break down as we show in figure 4.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">Feature learning dynamics is preserved across widths</head><p>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 N &#8594; RN, &#947; &#8594; &#947;/ &#8730; R, which keeps &#947; 0 fixed. To evaluate how well this idea holds in a realistic deep learning problem, we trained convolutional neural networks (CNNs) of varying channel counts N on two-class CIFAR classification <ref type="bibr">[82]</ref>. We tracked the dynamics of the loss and the last layer &#934; L kernel. The results are provided in figure <ref type="figure">5</ref>. We see that dynamics are largely independent of rescaling as predicted. Further, as expected, larger &#947; 0 leads to larger changes in kernel norm and faster alignment to the target function y, as was Self-consistent dynamical field theory of kernel evolution in wide neural networks J. Stat. Mech. (2023) 114009 also found in <ref type="bibr">[83]</ref>. Consequently, the higher &#947; 0 networks train more rapidly. The trend is consistent for width N = 250 and N = 500. More details about the experiment can be found in appendix C.2 and figure A5.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.">Discussion</head><p>We provided a unifying DMFT derivation of feature dynamics in infinite networks trained with gradient based optimization. Our theory interpolates between lazy infinitewidth behavior of a static NTK in &#947; 0 &#8594; 0 and rich feature learning. At &#947; 0 = 1, our DMFT construction agrees with the stochastic process derived previously with the TPs framework <ref type="bibr">[22]</ref>. 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 &#947; 0 . We believe our framework could be a useful perspective for future theoretical analyses of feature learning and generalization in wide networks.</p><p>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 T, P = O N (1) and may break down otherwise; other asymptotic regimes (such as P /N, T / log(N ) = O N (1), etc) may exhibit phenomena relevant to deep learning practice <ref type="bibr">[32,</ref><ref type="bibr">84]</ref>. Indeed, many experiements find that finite width effects appear to grow dynamically during learning (with T and P ) and hinder the performance of models <ref type="bibr">[45,</ref><ref type="bibr">81,</ref><ref type="bibr">85,</ref><ref type="bibr">86]</ref>. The computational requirements of our method, while smaller than the exponential time complexity for exact solution <ref type="bibr">[22]</ref>, are still significant for large P T . In table <ref type="table">1</ref>, we compare the time taken for various theories to compute the feature kernels throughout T steps of GD. For a width N network, computation of each forward pass on all P data points takes O(P N 2 ) computations. The static NTK requires computation of O(P 2 ) entries in the kernel which do not need to be recomputed. However, the DMFT requires matrix multiplications on PT &#215; PT matrices giving a O(P 3 T 3 ) time scaling. Future work could aim to improve the computational overhead of the algorithm, by considering data averaged theories <ref type="bibr">[64]</ref> or one pass SGD <ref type="bibr">[22]</ref>. Alternative projected versions of GD have also enabled much better computational scaling in the evaluation of the theoretical predictions <ref type="bibr">[46]</ref>, allowing evaluation on full CIFAR-10.</p><p>Since the first appearance of our work in conference proceedings <ref type="bibr">[87]</ref>, we have extended our DMFT technique beyond GD-based training on a loss function to study the dynamics of other, more biologically-plausible learning rules such as feedback alignment and Hebbian learning <ref type="bibr">[88]</ref>. Such rules follow updates with pseudo-gradient fields g&#8467; &#181; (t) which provide a bioplausible approximation to the true backprogagation signals. In this case, the key order parameters to consider are the feature kernels &#934; &#8467; &#181;&#957; (t, s) and the Self-consistent dynamical field theory of kernel evolution in wide neural networks </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>. Successful feature learning enhances the gradient-pseudogradient alignment measured with G. As in the present work, the kernels {&#934; &#8467; , G&#8467; } and the distribution of preactivations and pregradients are related self-consistently at infinite width.</p><p>It remains an open question how much deep learning phenomena can be captured by this infinite width feature learning limit of network dynamics. A recent empirical study analyzed the loss dynamics, individual network logits, and internal feature kernels and preactivation distributions of networks trained at different widths, finding that for simple tasks like CIFAR-10, networks across widths exhibit consistency across these observables in the mean field/&#181; parameterization <ref type="bibr">[86]</ref>. However, for harder tasks such as ImageNet or token prediction on the C4 dataset, wider networks exhibit distinct dynamics, often training faster and updating features more rapidly. The differences across widths in performance and learned representations motivates the development of theoretical methods beyond the mean-field analysis presented here, which can characterize finite size effects on learning dynamics in the feature learning regime <ref type="bibr">[28,</ref><ref type="bibr">29,</ref><ref type="bibr">81]</ref>.    We find consistent agreement of loss and prediction dynamics across widths but finite size effects become more significant when computing feature kernels of deeper layers. We note that, while higher &#947; 0 is associated with faster convergence, the final test accuracy for this model is roughly insensitive to choice of &#947; 0 .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix B. Algorithmic implementation</head><p>The alternating sample-and-solve procedure we develope and describe below for nonlinear networks is based on numerical recipes used in the dynamical mean field simulations in computational physics <ref type="bibr">[68]</ref>. The basic principle is to leverage the fact that, conditional on kernels, we can easily draw samples {u &#8467; &#181; (t), r &#8467; &#181; (t)} from their appropriate GPs. From these sampled fields, we can identify the kernel order parameters by simple estimation of the appropriate moments.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>Algorithm 1. Alternating Monte-Carlo solution to saddle point equations.</p><p>Solve equation <ref type="bibr">(13)</ref> for each sample to get</p><p>10 Solve for Jacobians on each sample &#8706;&#981;(h &#8467; n ) &#8706;r &#8467;&#8868; n , &#8706;g &#8467; n &#8706;u &#8467;&#8868; n 11 Compute new A &#8467; , B &#8467;-1 estimates: 12 &#195;&#8467; = 1 S &#8721; n&#8712;[S] &#8706;&#981;(h &#8467; n ) &#8706;r &#8467;&#8868; n , B&#8467;-1 = 1 S &#8721; n&#8712;[S] &#8706;g &#8467; n &#8706;u &#8467;&#8868; n 13 &#8467; &#8592; &#8467; + 1 14 end 15 &#8467; = 1 16 while &#8467; &lt; L + 1 do 17 Update feature kernels:</p><p>The parameter &#946; controls the recency weighting of the samples obtained at each iteration. If &#946; = 1, then the rank of the kernel estimates is limited to the number of samples S used in a single iteration, but with &#946; &lt; 1 smaller sample sizes S can be used to still obtain accurate results. We used &#946; = 0.6 in our deep network experiments. Convergence is usually achieved in around &#8764;15 steps for a depth 4 (L = 3 hidden layer) network such as the one in figures 1 and A2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix C. Experimental details</head><p>All NN training is performed with a Jax GD optimizer <ref type="bibr">[89]</ref> with a fixed learning rate.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.1. MLP experiments</head><p>For the MLP experiments, we perform full batch GD. Networks are initialized with Gaussian weights with unit standard deviation W &#8467; ij &#8764; N (0, 1). The learning rate is chosen as &#951; 0 &#947; 2 = &#951; 0 &#947; 2 0 N for a network of width N. The hidden features h &#8467; &#181; (t) &#8712; R N are stored throughout training and used to compute the kernels &#934; &#8467; &#181;&#945; (t, s)</p><p>. These experiments can be reproduced with the provided jupyter notebooks on our Github. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.2. CNN experiments on CIFAR-10</head><p>We define a depth-L CNN model with ReLU activations and stride 1, which is implemented as a pytree of parameters in JAX <ref type="bibr">[89]</ref>. We apply global average pooling in the final layer before a dense readout layer. The code to initialize and evaluate the model is provided on our Github in the file titled scratch cnn expt.ipynb.</p><p>After constructing a CNN model, we train using MSE loss with the base learning rate &#951; 0 = 2.0 &#215; 10 -4 , batch size 250. The learning rate passed to the optimizer is thus &#951; = &#951; 0 &#947; 2 = &#951; 0 &#947; 2 0 N . We optimize the loss function which is scaled appropriately as &#8467;(&#947; -1 0 f, y). Throughout training, we compute the last layer's embedding &#981;(h L ) on the test set to calculate the alignment A(&#934; L , yy &#8868; ). Training is performed on 4 NVIDIA GPUs. Training a L = 3 network of width 500 takes roughly 1 h.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix D. Derivation of self-consistent dynamical field theory</head><p>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 <ref type="bibr">[47]</ref>, of which a useful review for random recurrent networks can be found here <ref type="bibr">[54]</ref>. Similar computations can be found in recent works which consider typical behavior in high-dimensional classification on random data <ref type="bibr">[63,</ref><ref type="bibr">64]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.1. Deep network field definitions and scaling</head><p>As discussed in the main text, we consider the following wide network architecture parameterized by trainable weights &#952; = Vec{W 0 , W 1 , . . . w L }, giving network output f &#181; defined as</p><p>Using gradient flow with learning rate &#951; on cost L = &#181; &#8467;(f &#181; , y &#181; ) for loss function, we introduce functions &#8710; &#181; = -&#8706;L &#8706;f&#181; and &#951; for learning rate, and gradient flow induces the following dynamics</p><p>at initialization, it is clear that to have O &#947; (1) evolution of the network output at initialization we need &#951; = &#947; 2 . With this scaling, we have the following</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>Now, to build a valid field theory, we want to express everything in terms of features h &#8467; &#181; rather than parameters &#952; and we will define the following gradient features</p><p>which admit the recursion and base case</p><p>We define the pre-gradient field</p><p>. From these quantities, we can derive the gradients with respect to parameters</p><p>which allows us to compute the NTK in terms of these features</p><p>where K x &#181;&#945; = 1 D x &#181; &#8226; x &#945; is the input Gram matrix. We see that the NTK can be built out of the following primitive kernels</p><p>We utilize the parameter space dynamics to express W &#8467; in terms of the {g, h} fields</p><p>Using the field recurrences</p><p>we can derive the following recursive dynamics for the features</p><p>(D.9)</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>In the above, we implicitly utilize the base cases for the feature kernels &#934; 0 &#181;&#957; (t, s) = K x &#181;&#957; and G L+1 &#181;&#957; (t, s) = 1. We also introduced the following random fields &#967; &#8467; &#181; (t), &#958; &#8467; &#181; (t) which involve the random initial conditions</p><p>We observe that the dynamics of the hidden features is controlled by the factor &#947; &#8730; N . If &#947; = O N (1) then we recover static NTK in the limit as N &#8594; &#8734;. However, if &#947; = O N ( &#8730; N ) then we obtain O N (1) evolution of our features and we reach a new rich regime. We choose the scaling &#947; = &#947; 0 &#8730; N for our field theory so that &#947; 0 &gt; 0 will give a feature learning network.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.2. Warmup: DMFT for one hidden layer NN</head><p>In this section, we provide a warmup problem of a L = 1 hidden layer network which allows us to illustrate the mechanics of the MSRDJ formalism. A more detailed computation can be found in the next section. Though many of the interesting dynamical aspects of the deep network case are missing in the two layer case, our aim is to show a simple application of the ideas. The fields of interest are &#967; &#181; = 1 &#8730; D W 0 (0)x &#181; and &#958; = w 1 (0). Unlike the deeper L &#10878; 2 case, both of these fields are time invariant since x &#181; does not vary in time. These random fields provide initial conditions for the preactivation and pre-gradient fields h &#181; (t), z(t) &#8712; R N , which evolve according to</p><p>where the network predictions evolve as</p><p>. At finite N, the kernels &#934;, G will depend on the random initial conditions &#967;, &#958;, leading to a predictor f &#181; which varies over initializations. If we can establish that the kernels &#934;, G concentrate at infinite-width N &#8594; &#8734;, then &#8710; &#181; are deterministic. We now study the moment generating function for the fields</p><p>(D.12)</p><p>To perform the average over &#952; 0 = {W 0 (0), w 1 (0)}, we enforce the definition of &#967; &#181; , &#958; with delta functions</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks J. Stat. Mech. (2023) 114009</p><p>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</p><p>We now aim to enforce the definitions of the kernel order parameters with delta functions</p><p>where the fields h &#181; (t), g &#181; (t) are regarded as functions of {&#967; &#181; } &#181; , &#958; (see equation (D.11)) and the &#934;, &#284; integrals run over the imaginary axis (-i &#8734;, i &#8734;). After this step, we can write</p><p>where the DMFT action</p><p>and has the form</p><p>(D.17)</p><p>The single site moment generating function Z[j, v] arises from the factorization of the integrals over N different fields in the hidden layer and takes the form Self-consistent dynamical field theory of kernel evolution in wide neural networks</p><p>where, again, we must regard h &#181; (t), g &#181; (t) as functions of &#967;, &#958;. The variables in the above are no longer vectors in R N but rather are scalars. We can write</p><p>where H is the logarithm of the integrand above. Since the full MGF takes the form</p><p>characterization of the N &#8594; &#8734; limit requires one to identify the saddle point of S, where &#948;S = 0 for any variation of these four order parameters.</p><p>where the i th single site average &#10216;&#10217; i of an observable O(&#967;, &#967;, &#958;, &#958;) is defined as</p><p>Since &#934; = &#284; = 0 the single site MGF reveals that the initial fields are independent Gaussians {&#967; &#181; } &#8764; N (0, K x ) and &#958; &#8764; N (0, 1). At zero source j, v &#8594; 0, all single site averages &#10216;&#10217; i are equivalent and we may merely write &#934; &#181;&#945; (t, s) = &#10216;&#981;(h &#181; (t))&#981;(h &#945; (s))&#10217; , G &#181;&#945; (t, s) = &#10216;g &#181; (t)g &#945; (s)&#10217;, where &#10216;&#10217; is the average over the single site distributions for j, v &#8594; 0.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.2.1. Final L = 1 DMFT equations.</head><p>Putting all of the saddle point equations together, we arrive at the following DMFT</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>21)</head><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>We see that for L = 1 networks, it suffices to solve for the kernels on the time-time diagonal. Further in this two layer case &#967;, &#958; are independent and do not vary in time. These facts will not hold in general for L &#10878; 2 networks, which requires a more intricate analysis as we show in the next section.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.3. Path integral formulation for deep networks</head><p>As discussed in the main text, we study the distribution over fields by computing the moment generating functional for the stochastic processes {&#967; &#8467; ,</p><p>Moments of these stochastic fields can be computed through differentiation of Z near zero-source</p><p>To perform the average over the initial parameters, we enforce the definition of the fields &#967; &#8467;+1 (t) = 1</p><p>, by inserting the following terms in the definition of Z[{j, v}] so we may more easily perform the average over weights &#952; 0 . We enforce these definitions with an integral representation of the Dirac-Delta function 1 = &#180;R dx &#948;(x) = 1 2&#960; &#180;R dx &#180;R dx exp (i xx). We note that we are implicitly working in the Ito scheme, where factors of Jacobian determinants are equal to one <ref type="bibr">[54,</ref><ref type="bibr">90,</ref><ref type="bibr">91]</ref> (we note that h &#8467; &#181; (t) does not causally depend on &#967; &#8467;+1 &#181; (t) and g &#8467; &#181; (t) does not causally depend on &#958; &#8467; (t)). Applying this to fields &#967;, &#958;, we have</p><p>where {h &#8467; , g &#8467; } are understood to be stochastic processes which are causally determined by the {&#967; &#8467; , &#958; &#8467; } fields, in the sense that h &#8467; (t) only depends on &#967; &#8467; (s) for s &lt; t. We thus have an expression of the form</p><p>(D.25)</p><p>Since W &#8467; (0) are all Gaussian random variables, these averages can be performed quite easily, yielding</p><p>(D.26)</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks J. Stat. Mech. (2023) 114009</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.4. Order parameters and action definition</head><p>We define the following order parameters which we will show concentrate in the N &#8594; &#8734; limit</p><p>The NTK only depends on {&#934; &#8467; , G &#8467; } so from these order parameters, we can compute the function evolution. The parameter A &#8467; arises from the coupling of the fields across a single layer's initial weight matrix W &#8467; (0). We can again enforce these definitions with integral representations of the Dirac-delta function. For each pair of samples &#181;, &#945; and each pair of times t, s, we multiply by</p><p>for all &#8467; &#8712; {1, . . . , L} and analogously</p><p>for &#8467; &#8712; {1, . . . , L -1}. After introducing these order parameters into the definition of the partition function, we have a factorization of the integrals over each of the N sites in each hidden layer. This gives the following partition function</p><p>We thus see that the action S consists of inner-products between order parameters {&#934;, G, A} and their duals { &#934;, &#284;, B} as well as a single site MGF Z[{&#934;, &#934;, G, &#284;, A, B, j, v}], which is defined as</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p><p>(D.32)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.5. Saddle point equations</head><p>Since the integrand in the moment generating function Z takes the form e N S[{&#934;, &#934;,G, &#284;,A,B}] , the N &#8594; &#8734; limit can be obtained from saddle point integration, also known as the method of steepest descent <ref type="bibr">[92]</ref>. This consists of finding order parameters {&#934;, &#934;, G, &#284;, A, B} which render the action S locally stationary. Concretely, this leads to the following saddle point equations.</p><p>We use the notation &#10216;&#10217; to denote an average over the self-consistent distribution on fields induced by the single-site moment generating function Z at the saddle point.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>Concretely if Z = &#180;d&#967; d&#958; d &#967; d &#958; exp(-H[&#967;, &#958; , &#967;, &#958;]) then the single-site self-consistent average of observable O([&#967;, &#958; , &#967;, &#958;]) is defined as</p><p>To calculate the averages of the dual variables such as &#967;&#8467;+1 &#967;&#8467;+1 , it will be convenient to work with vector and matrix notation. We let &#967; &#8467; = Vec{&#967; &#8467; &#181; (t)} &#181;&#8712;[P ],t&#8712;R+ represent the vectorization of the stochastic process over different samples and times and define the dot product between two of these vectors as a &#8226; b = P &#181;=1 &#180;&#8734; 0 dt a &#181; (t)b &#181; (t). We also apply this procedure on the kernels so that &#934; = Mat{&#934; &#181;&#945; (t, s)} &#181;&#945;&#8712;[P ],t,s&#8712;R+ . Matrix vector products take the form [Ab] &#181;,t = &#180;&#8734; 0 ds &#945; A &#181;&#945; (t, s)b &#945; (s). We can obtain the behavior of &#10216; &#967;&#8467;+1 &#181; &#967;&#8467;+1&#8868; &#181; &#10217; in terms of primal fields {&#967;, &#958;, h, z} by insertion of a dummy source u into the effective partition function.</p><p>Similarly, we can obtain the equation for &#958;&#8467; &#958;&#8467;&#8868; by inserting a dummy source r and differentiating near zero source</p><p>As we will demonstrate in the next subsection, these correlators must vanish. Lastly, we can calculate the remaining correlators in terms of primal variables</p><p>(D.37)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.6. Single site stochastic process: Hubbard trick</head><p>To get a better sense of this distribution, we can now simplify the quadratic forms appearing in Z using the Hubbard trick <ref type="bibr">[93]</ref>, which merely relates a Gaussian function to its Fourier transform.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>since u &#8467;+1 u &#8467;+1&#8868; = &#934; &#8467; . Following an identical argument, &#284;&#8467; = 0. After this simplification, the single site MGF takes the form</p><p>The interpretation is thus that u &#8467; , r &#8467; are sampled independently from their respective Gaussian processes and the fields &#967; &#8467; and &#958; &#8467; are determined in terms of u &#8467; , r &#8467; , h &#8467; , g &#8467; . This means that we can apply Stein's Lemma (integration by parts) <ref type="bibr">[94]</ref> to simplify the last two saddle point equations</p><p>, B &#8467; = g &#8467;+1 u &#8467;+1 &#934; &#8467; -1 = &#8706;g &#8467;+1 &#8706;u &#8467;+1&#8868; . (D.43)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.7. Final DMFT equations</head><p>We can now close this stochastic process in terms of preactivations h &#8467; and pre-gradients z &#8467; . To match the formulas provided in the main text, we rescale A &#8467; &#8594; A &#8467; /&#947; 0 = O &#947; 0 (1) and B &#8467; &#8594; B &#8467; /&#947; 0 = O &#947; 0 (1), which makes it clear that the non-Gaussian corrections to the h &#8467; &#181; (t), z &#8467; &#181; (t) fields are O(&#947; 0 ). After this rescaling, we have the following complete DMFT equations.</p><p>.</p><p>(D.44)</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>The base cases in the above equations are that A 0 = B L = 0 and &#934; 0 &#181;&#945; (t, s) = K x &#181;&#945; and G L+1 &#181;&#945; (t, s) = 1. From the above self-consistent equations, one obtains the NTK dynamics and consequently the output predictions of the network with &#8706;f&#181; &#8706;t = &#945; &#8710; &#945; (t) &#8467; G &#8467;+1 &#181;&#945; (t, t)&#934; &#8467; &#181;&#945; (t, t) .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.8. Varying network widths and initialization scales</head><p>In this section, we relax the assumption of network widths being equal while taking all widths to infinity at a fixed ratio. This will allow us to analyze the influence of bottlenecks on the dynamics. We let N &#8467; = a &#8467; N represent the width of layer &#8467;. Without loss of generality, we can choose that N L = N and proceed by defining order parameters in the usual way</p><p>as desired. We extend this definition to each layer as before g &#8467; = &#8730; N &#8467; &#8706;h L+1 &#8706;h &#8467; which again satisfies the recursion</p><p>Now, we need to calculate the dynamics on weights</p><p>Using our definition of the kernels and the h, z fields</p><p>We also find the usual formula for the NTK</p><p>Now, as before, we need to consider the distribution of &#967;, &#958; fields. We assume W &#8467; ij (0) &#8764; N (0, &#963; 2 &#8467; ). This requires computing integrals like</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p><p>where</p><p>The action thus takes the form</p><p>where the zero-source MGF for layer &#8467; has the form</p><p>The saddle point equations give</p><p>where</p><p>To take the N &#8594; &#8734; limit of the field dynamics, again use <ref type="bibr">(1)</ref>. The field equations take the form</p><p>(D.54)</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>We thus find that the evolution of the scalar fields in a given layer is set by the parameter &#947; 0 / &#8730; a &#8467; , indicating that relatively wider layers evolve less and contribute less of a change to the overall NTK. This definition for A &#8467; , B &#8467; is non-ideal to extract intuition about bottlenecks since</p><p>and B &#8467; &#8764; O &#947; 0 &#8730; a &#8467;+1 . To remedy this, we redefine &#195;&#8467; =</p><p>&#947; 0 B &#8467; . With this choice, we have</p><p>where &#195;&#8467;-1 , B&#8467; do not have a leading order scaling with a &#8467;-1 or a &#8467;+1 respectively. Under this change of variables, it is now apparent that a very wide layer &#8467;, where &#947; 0 &#8730; a &#8467; &#8810; 1 is small, the fields h &#8467; , z &#8467; become well approximated by the Gaussian processes u &#8467; , r &#8467; , albeit with evolving covariances &#934; &#8467;-1 , G &#8467;+1 respectively. In a realistic CNN architecture where the number of channels increases across layers, this result would predict that more feature learning and deviations from Gaussianity to occur in the early layers and the later layers to be well approximated as Gaussian fields u &#8467; , r &#8467; with temporally evolving covariances for &#8467; &#8764; L. We leave evaluation of this prediction to future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix E. Two-layer networks</head><p>In a two-layer network, there are no A or B order parameters, so the fields &#967; 1 and &#958; 1 are always independent. Further, &#967; 1 and &#958; 1 are both constant throughout training dynamics. Thus we can obtain differential rather than integral equations for the stochastic fields h 1 , z 1 which are</p><p>where the average is taken over the random initial conditions h 1 (0) &#8764; N (0, K x ) and z 1 (0) &#8764; N (0, 11 &#8868; ). An example of the two-layer theory for a ReLU network can be found in appendix figure <ref type="figure">A1</ref>. In this two-layer setting, a drift PDE can be obtained for the joint density of preactivations and feedback fields p(h, z; t)</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p><p>which is a zero-diffusion feature space version of the PDE derived in the original twolayer mean field limit of neural networks <ref type="bibr">[21,</ref><ref type="bibr">42,</ref><ref type="bibr">43]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix F. Deep linear networks</head><p>In the deep linear case, the g &#8467; &#181; (t) fields are independent of sample index &#181;. We introduce the kernel H &#8467; &#181;&#945; (t, s) = h &#8467; &#181; (t)h &#8467; &#945; (s) . The field equations are</p><p>Or in vector notation h &#8467; = u &#8467; + &#947; 0 C &#8467; g &#8467; and g &#8467; = r &#8467; + &#947; 0 D &#8467; h &#8467; where</p><p>Using the formulas which define the fields, we have</p><p>The saddle point equations can thus be written as</p><p>We solve these equations by repeatedly updating H &#8467; , G &#8467; , using equation (F.4) and the current estimate of C &#8467; , D &#8467; . We then use the new H &#8467; , G &#8467; to recompute K NTK and &#8710;(t),</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>calculating C &#8467; , D &#8467; and then recomputing H &#8467; , G &#8467; . This procedure usually converges in approximately five to ten steps.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F.1. Two-layer linear network</head><p>As we saw in appendix E, the field dynamics simplify considerably in the two-layer case, allowing the description of all fields in terms of differential equations. In a twolayer linear network, we let h(t) &#8712; R P represent the hidden activation field and g(t) &#8712; R represent the gradient</p><p>The &#8868; and G(t) = g(t) 2 thus evolve as</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>kernels H(t) = h(t)h(t)</head><p>It is easy to verify that the network predictions on the P training points are</p><p>where the initial conditions are H(0) = I, G(0) = 1 and &#8710;(0) = y. These equations hold for any choice of data K x , y.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F.1.1. Whitened data in two-layer linear network.</head><p>For input data which is whitened where K x = I, then the dynamics can be simplified even further, recovering the sigmoidal curves very similar to those obtained under a special initialization <ref type="bibr">[69,</ref><ref type="bibr">70,</ref><ref type="bibr">72,</ref><ref type="bibr">74]</ref>. In this case we note that the error signal always evolves in the y direction, &#8710;(t) = &#8710;(t) y |y| , and that H only evolves in a rank one direction yy &#8868; direction as well. Let 1 |y| 2 y &#8868; H(t)y = H y (t). Let y = |y| represent the norm of the target vector, then the relevant scalar dynamics are</p><p>Now note that, at initialization H y (0) = G(0) = 1 and that &#8706; &#8706;t H y (t) = &#8706; &#8706;t G(t). Thus, we have an automatic balancing condition H y (t) = G(t) for all t &#8712; R + and the dynamics reduce to two variables Self-consistent dynamical field theory of kernel evolution in wide neural networks</p><p>We note that this system obeys a conservation law which constrains (H y , y -&#8710;) to a hyperbola</p><p>This conservation law implies that H y (0) 2 = 1 = lim t&#8594;&#8734; H y (t) 2 -&#947; 2 0 y 2 or that the final kernel has the form lim t&#8594;&#8734;</p><p>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 <ref type="bibr">[74]</ref> and also from a normative toy model of feature learning <ref type="bibr">[83]</ref>. We can use the conservation law above 1 = H y (t) 2&#947; 2 0 (&#8710;(t) -y) 2 to simplify the dynamics to a one-dimensional system &#8706; &#8706;t</p><p>where f = y -&#8710;. We see that increasing &#947; 0 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 f</p><p>(F.12)</p><p>The NTK limit can be obtained by taking &#947; 0 &#8594; 0 which gives</p><p>which recovers the usual convergence rate of a linear model. The right hand side of equation (F.12) has a perturbation series in &#947; 0 2 which converges in the disk &#947; 0 &lt; 1 y . The other limit of interest is the &#947; 0 &#8594; &#8734; limit where</p><p>which recovers the logistic growth observed in the initialization scheme of prior works <ref type="bibr">[69,</ref><ref type="bibr">70]</ref>. The timescale &#964; required to learn is only &#964; &#8764; 1 &#947; 0 &#8810; 1, which is much smaller than the O &#947; 0 (1) time to learn predicted from the small &#947; 0 expansion. We note that the above leading order asymptotic behavior at large &#947; 0 considers the DMFT initial condition &#8710;(0) = y as an unstable fixed point. For realistic learning curves, one would need to stipulate some alternative initial condition such as &#8710; = y -&#1013; for some small &#949; &gt; 0 in order to have nontrivial leading order dynamics.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks J. Stat. Mech. (2023) 114009</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F.2. Deep linear whitened data</head><p>In this section, we examine the role of depth when linear networks are trained on whitened data. As in the two-layer case, all hidden kernels H &#8467; (t, s) need only be tracked in the one-dimensional task relevant subspace along the vector y . We let &#8710;(t) = 1 y y &#8226; &#8710;(t) and let h y (t) = 1 y h &#8467; (t) &#8226; y. We have</p><p>(F.15)</p><p>Lastly, we have the simple evolution equation for the scalar error &#8710;(t)</p><p>(F.16)</p><p>Vectorizing we find the following equations for the time &#215; time matrix order parameters</p><p>This formulation has the advantage that it no longer has any sample-size dependence: arbitrary sample sizes can be considered with no computational cost.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix G. Convolutional networks with infinite channels</head><p>The DMFT described in this work can be extended to CNNs with infinitely many channels, much in the same way that infinite CNNs have a well defined kernel limit <ref type="bibr">[95,</ref><ref type="bibr">96]</ref>. We let W &#8467; ij,a represent the value of the filter at spatial displacement a from the center of the filter, which maps relates activity at channel j of layer &#8467; to channel i of layer &#8467; + 1. The fields h &#8467; &#181;,i,a are defined recursively as</p><p>where S &#8467; is the spatial receptive field at layer &#8467;. For example, a (2k + 1) &#215; (2k + 1) convolution will have</p><p>The output function is obtained from the last layer is defined as</p><p>). The gradient fields have the same definition as before g &#8467; &#181;,a = &#947; 0 N &#8706;f&#181; &#8706;h &#8467; &#181;,a</p><p>, which as before enjoy the following recursion from the chain rule</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>The dynamics of each set of filters {W &#8467; b } can therefore be written in terms of the features h &#8467; a , g &#8467;</p><p>The feature space description of the forward and backward pass relations is</p><p>where</p><p>). The order parameters for this network architecture are</p><p>These two order parameters per layer collectively define the NTK. Following the computation in appendix D, we obtain the following field theory in the N &#8594; &#8734; limit:</p><p>We see that this field theory essentially multiplies the number of sample indices by the number of spatial indices P &#8594; P |S|. Thus the time complexity of evaluation of this theory scales very poorly as O(P 3 |S| 3 T 3 ), rendering DMFT solutions very computationally intensive.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix H. Trainable bias parameter</head><p>If we include a bias b &#8467; (t) &#8712; R N in our trainable model, so that</p><p>then the dynamics on b &#8467; (t) induced by gradient flow is</p><p>Assuming that b &#8467; i (0) &#8764; N (0, 1), the dynamics of the DMFT becomes</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix I. Multiple output channels</head><p>We now consider network outputs on C = O N (1) classes. The prediction for a data point &#181; &#8712;</p><p>As before, we define the error signal as</p><p>. From these matrices, we can compute the evolution of the predictions in the network.</p><p>In this case, we have matrices for the backprop features g &#8467; = &#947; &#8730; N &#8706;f &#8868; &#8706;h &#8467; &#8712; R N &#215;C . These satisfy the usual recursion</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>We can now compute the NTK for samples &#181;, &#945;</p><p>where</p><p>which are defined in the usual way. The corresponding field theory has the form</p><p>From these fields, the saddle point equations define the kernels as</p><p>This allows us to study the multi-class structure of learned representations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix J. Weight decay in deep homogenous networks</head><p>If we train with weight decay, d dt &#952; = -&#947; 2 &#8711; &#952; L -&#955;&#952;, in a &#954;-degree homogenous network (f (c&#952;) = c &#954; f (&#952;)), then the prediction dynamics satisfy</p><p>This holds by the following identity &#8706; &#8706;c f (c&#952;) = &#8706; &#8706;c c &#954; f (&#952;), which when evaluated at c = 1 gives &#8706; &#8706;&#952; f (&#952;) &#8226; &#952; = &#954;f (&#952;). This identity was utilized in a prior work which studied L2 regularization in the lazy regime <ref type="bibr">[75]</ref>. For a L-hidden layer ReLU network &#981;(h) = max(0, h), the degree is &#954; = L + 1, while rectified power law nonlinearities &#981;(h) = max(0, h) q give degrees &#954; = q L+1 -1 q-1 . We note that the fixed point of the function dynamics above gives a representer theorem with the final NTK</p><p>where [k(x)] &#181; = lim t&#8594;&#8734; K(x, x &#181; , t) and K &#181;&#945; = lim t&#8594;&#8734; K(x &#181; , x &#945; , t). The prior work of Lewkowycz and Gur-Ar <ref type="bibr">[75]</ref> considered NTK parameterization &#947; 0 = 0. In this limit, the kernel (and consequently output function) decay to zero at large time, but if &#947; 0 &gt; 0, then the network converges to a nontrivial fixed point as t &#8594; &#8734;. In the DMFT limit we can determine the final kernel by solving the following field dynamics h &#8467; &#181; (t) = e -&#955;t &#967; &#8467; &#181; (t) + &#947; 0 &#710;t 0 ds e -&#955;(t-s)</p><p>We see that the contribution from initial conditions is exponentially suppressed at large time t while the second term contributes most when the system has equilibrated. provide an example of the weight decay DMFT showing its validity in a two layer ReLU network in figure <ref type="figure">3</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Appendix K. Bayesian/Langevin trained mean field networks</head><p>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 <ref type="bibr">[25,</ref><ref type="bibr">[30]</ref><ref type="bibr">[31]</ref><ref type="bibr">[32]</ref><ref type="bibr">97]</ref>. 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 <ref type="bibr">[3,</ref><ref type="bibr">4,</ref><ref type="bibr">97]</ref>. The relevant Langevin equation for our mean field gradient flow is</p><p>where &#955; is a ridge penalty which controls the scale of parameters, and d&#1013;(t) is a Brownian motion term which has covariance structure d&#1013;(t)d&#1013;(t &#8242; ) &#8868; = &#948;(t -t &#8242; )I. The parameter &#946;, known as the inverse temperature controls the scale of the random Gaussian noise injected into this stochastic process. The dynamical early-time treatment of the &#946; &#8594; &#8734; limit will coincide with our usual DMFT while the &#946; &#8810; &#8734; 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.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>K.1. Dynamical analysis</head><p>In this section we analyze the DMFT for these Langevin dynamics. First we note that the effect of regularization can be handled with a simple integrating factor</p><p>-1 e &#955;t &#946; d&#1013; &#8467; (t) . (K.2) where d&#1013;(t) &#8712; R N &#215;N is the Gaussian noise for layer &#8467; at time t. It is straightforward to verify by Ito's lemma that, under mean field parameterization, the fluctuations in f &#8242; s Self-consistent dynamical field theory of kernel evolution in wide neural networks J. Stat. Mech. (2023) 114009 dynamics due to Brownian motion are &#8706;f &#8706;&#952; &#8226; d&#1013;(t) &#8764; O(N -1/2</p><p>) and are thus negligible in the N &#8594; &#8734; limit. Thus the evolution of the network function takes the form</p><p>We can express both of these parameter contractions in feature space provided we introduce the new features r &#8467; i,&#181; (t) =</p><p>which are necessary to compute Hessian terms like 2 in each layer. This gives the following evolution</p><p>As before, we compute the next layer field h &#8467;+1 in terms of &#967; &#8467;+1 and z &#8467; in terms of &#958; &#8467; h &#8467;+1 &#181; (t) = e -&#955; &#946; t &#967; &#8467;+1 &#181; (t)</p><p>The dependence on the initial condition through &#967;, &#958; is suppressed at long times due the regularization factor e -&#955; &#946; t , while the Brownian motion and gradient updates will survive in the t &#8594; &#8734; limit. In addition to the usual {&#967; &#8467; , &#958; &#8467; } fields which arise from the initial condition, we see that h &#8467; (t), z &#8467; (t) also depend on the following fields which arise from the integrated Brownian motion</p><p>where we introduced the order parameter i A &#1013;,&#8467; &#181;&#945; (t, t &#8242; ) = 1 N &#981;(h &#8467; &#181; (t)) &#8226; &#958;&#1013;,&#8467; &#945; (s). We will use the shorthand for the temporal prefactor in the above C &#955;,&#946; (t, t &#8242; ) =</p><p>1 &#955; exp&#955; &#946; (t + t &#8242; ) e 2 &#955; &#946; min{t,t &#8242; } -1 &#8764; t,t &#8242; &#8594;&#8734; 1 &#955; exp&#955; &#946; |t -t &#8242; | . We insert a Lagrange multiplier B &#1013;,&#8467; to enforce the definition of A &#1013;,&#8467; . After Z &#8733; &#710;d&#934; &#8467; &#181;&#945; (t, s) d &#934;&#8467; &#181;&#945; (t, s) dG &#8467; &#181;&#945; (t, s) d &#284;&#8467; &#181;&#945; (t, s) dA &#8467; &#181;&#945; (t, s) dB &#8467; &#181;&#945; (t, s) dA &#1013;&#8467; &#181;&#945; (t, s) dB &#1013;&#8467; &#181;&#945; (t, s) &#215; exp N S &#934;, &#934;, G, &#284;, A, B, A &#1013; , B &#1013; . (K.8) The order parameters can be determined by the saddle point equations. These equations for &#934;, &#934;, G, &#284;, A, B are the same as before. The new equations are &#948;S &#948;A &#1013;,&#8467; &#181;&#945; (t, s) = -B &#1013;,&#8467; &#181;&#945; (t, s) -i C &#955;,&#946; (t, s) &#967;&#1013;,&#8467;+1 &#181; (t) g &#8467;+1 &#945; (s) = 0 &#948;S &#948;B &#1013;,&#8467; &#181;&#945; (t, s) = -A &#1013;,&#8467; &#181;&#945; (t, s) -i C &#955;,&#946; (t, s) &#981; h &#8467; &#181; (t) &#958;&#1013;,&#8467; &#945; (s) = 0. (K.9) Self-consistent dynamical field theory of kernel evolution in wide neural networks J. Stat. Mech. (2023) 114009 K.2. Weak feature learning, long time limit</p><p>In the weak feature learning &#947; 0 &#8594; 0 and long time t &#8594; &#8734; limit, the preactivation fields equilibrate to Gaussian processes h &#8467; &#181; (t) &#8764; u &#1013;,&#8467; &#181; (t), z &#8467; &#181; (t) &#8764; r &#1013;,&#8467; &#945; (t), which have respective covariances</p><p>&#181;&#945; (t, s). In this long time limit, the feature kernels will be time translation invariant, e.g. &#934; &#8467; &#181;&#945; (t, s) = &#934; &#8467; &#181;&#945; (|t -s|). Letting &#964; = |t -s| and C &#955;,&#946; (&#964; ) = 1 &#955; exp&#955; &#946; &#964; , we have the following recurrence for</p><p>Similarly, we can obtain Z &#8467; and G &#8467; in a backward pass recursion</p><p>On the temporal diagonal &#964; = 0, these equations give the usual recursions used to compute the NNGP kernels at initialization <ref type="bibr">[4]</ref>, though with initialization variance C &#955;,&#946; (0) = &#955; -1 , set by the weight decay term in the Langevin dynamics. This indicates that the long time Langevin dynamics at &#947; 0 &#8594; 0 simply rescales the Gaussian weight variance based on &#955;. It would be interesting to explore fluctuation dissipation relationships at finite &#947; 0 within this framework which we leave to future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>K.3. Equilibrium analysis</head><p>The Langevin dynamics at finite N converges (possibly in a time extensive in N ) to an equilibrium distribution with several interesting properties, as was recently studied by Yang et al <ref type="bibr">[97]</ref> and implicitly by Seroussi and Ringel <ref type="bibr">[31]</ref> in a large sample size limit. This setting differs from the previous section where first N &#8594; &#8734; limit is taken, followed by a t &#8594; &#8734; limit in the DMFT. This section, on the other hand, studies for any N, the t &#8594; &#8734; limiting equilibrium distribution. This equilibrated distribution is then analyzed in the N &#8594; &#8734; limit. The relationship between these two orders of limits remains an open problem. The equilibrium distribution over parameters p(&#952;|D) &#8733; exp -&#946;&#947; 2 L(&#952;) -&#955; 2 |&#952;| 2 can be viewed as a Bayes posterior with log-likelihood -&#946;&#947; 2 L(&#952;) and a Gaussian prior with scale &#955; -1/2 . In the mean field limit with &#947; = &#8730; N &#947; 0 , we can express the density over pre-activations h &#8467; and the output predictions f. This gives</p><p>Thus the predictions f &#181; become nonrandom in this N &#8594; &#8734; limit and can be determined from the saddle point equations as in <ref type="bibr">[97]</ref>. Again, letting &#8710; &#181; = -&#8706; &#8706;f&#181; &#8467;(f &#181; , y &#181; ), we find</p><p>which implies that f &#181; at the fixed point satisfies the following equations</p><p>The last layer's dual kernel has the form &#934;L &#181;&#945; = -&#947; 2 0 &#946; 2 2&#955; &#8710; &#181; &#8710; &#945; , which we see vanishes as feature learning strength is taken to zero &#947; 0 &#8594; 0, while for non-negligible &#947; 0 , 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</p><p>We treat f &#181; (t) as a potentially random variable and insert</p><p>Noting that w L (0) is involved in the definition of both f &#181; (t) and &#958; L &#181; (t), we see that the average over w L (0) now takes the form</p><p>Self-consistent dynamical field theory of kernel evolution wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>We extend our definition as before</p><p>Proceeding with the calculation as usual, we find that</p><p>The saddle point equations can now be analyzed. In addition to the usual order parameters, we note that f, f also generate saddle point equations</p><p>We also obtain saddle point equations for the new A L , B L order parameters.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8706;S &#8706;A</head><p>&#945; (s) . This gives the following DMFT</p><p>&#945; (s) .</p><p>(M.8)</p><p>Self-consistent dynamical field theory of kernel evolution wide neural networks J. Stat. Mech. (2023) 114009</p><p>Since we are assuming under the inductive hypothesis that &#934; &#8467; = O N (1), we identify the constraint 2a &#8467; + b &#8467; = 1. Again we see that (a &#8467; = 1 2 , b &#8467; = 0) works, but this is not the only possible scaling. Alternatively standard parameterization (a &#8467; = 0, b &#8467; = 1) will also preserve the O N (1) scale of the features. To characterize prediction and feature dynamics, we next need to analyze the scale of the feature gradients &#8706;h L+1 &#8706;h &#8467; . We start with the last layer and define</p><p>which has O N (1) entries by construction. We similarly extend this definition to earlier layers g &#8467; = N a L +b L /2 &#8706;h L+1 &#8706;h &#8467; to see whether g &#8467; remains O N (1) under its backward-pass recursion</p><p>Now, letting z &#8467; = N -a &#8467; W &#8467; (0) &#8868; g &#8467;+1 as in the main text, we have </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>N.2. Predictions evolve in O N (1) time</head><p>As before we define the NTK be the matrix which characterizes network prediction dynamics &#8706; t f &#181; = &#951; 0 &#945; K NTK &#181;&#945; &#8710; &#945; . We demand that this matrix be K NTK &#8764; O N (1) so that the network prediction evolution &#8706; t f &#181; &#8764; O N (1)</p><p>where we used the usual definition of the kernels &#934; &#8467; = 1 N &#981;(h &#8467; ) &#8226; &#981;(h &#8467; ) and G &#8467; = 1 N g &#8467; &#8226; g &#8467; which are O N (1) under the assumptions of the previous section. We thus find the following constraints Self-consistent dynamical field theory of kernel evolution wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J. Stat. Mech. (2023) 114009</head><p>Table <ref type="table">N1</ref>. Dictionary relating the notation of the tensor programs (TP) framework <ref type="bibr">[22]</ref> and this work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>N.5. O N (1) raw learning rate</head><p>We are also interested in a parameterization for which we can have learning rate</p><p>Under this constraint, a &#8467; = 0 and b &#8467; = 1 for &#8467; &#8712; {1, . . . , L} and a 0 = -1 2 and b 0 = 1, which corresponds to a modification of standard parameterization, with first and last layer altered with width. In a computational algorithm, the learning rate would be &#951;</p><p>. This is equivalent to the &#181;P parameterization stated in the main text of Yang and Hu <ref type="bibr">[22]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>N.6. Equivalence of DMFT at &#947; 0 = 1 and TP-derived stochastic process</head><p>Now that we have established that the parameterization we consider here (modified NTK parameterization) is equivalent to &#181;P , (modified standard parameterization), we will now demonstrate that the stochastic process which we obtained through a stationary action principle applied to our DMFT action S is equivalent to the stochastic process derived from the TP framework of Yang <ref type="bibr">[22,</ref><ref type="bibr">96]</ref>. Using the notation from appendix H of Yang and Hu <ref type="bibr">[22]</ref>, they give the following evolution equations for the preactivations in a hidden layer in one pass SGD</p><p>10) where &#7824;Wxt is a mean zero Gaussian variable with covariance E[Z xt Z xs ] and &#7824;W &#8868; dht is a mean zero Gaussian with covariance E[Z dht Z dhs ]. We can switch to the notation of this work by making the substitutions Z ht &#8594; h(t), &#7824;Wxt &#8594; u(t), &#967; s &#8594; -&#8710;(s), &#379;Wx &#8594; s &#8710;(s)A(t, s) and E[Z xs Z xt ] &#8594; &#934;(t, s), and so on. A summary of the full set of notational substitutions between this work and TP are summarized in table <ref type="table">N1</ref>. After these substitutions are made, we see that the equations above match the onepass SGD version of the DMFT equations in appendix M. A similar identification can be made for the backward pass. This shows that both TPs and DMFT, though alternative derivations, give identical descriptions of the stochastic processes induced by random initializations + GD in infinite neural networks.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Stat. Mech. (2023) 114009</head><p>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 <ref type="bibr">[27,</ref><ref type="bibr">28,</ref><ref type="bibr">35]</ref>. 4 0 ). (P.2) Note that [C 0 g] &#181;t = &#180;t 0 dt &#8242; &#946; H 0 &#181;&#946; (t, t &#8242; )&#8710; &#946; (t &#8242; )g(t &#8242; ) = &#946; K x &#181;&#946; &#180;t 0 dt &#8242; &#8710; &#946; (t &#8242; )g(t &#8242; ) and note that [Dh] t = &#180;t 0 dt &#8242; G 0 (t, t &#8242; ) &#945; &#8710; &#945; (t &#8242; )h &#945; (t &#8242; ) = &#945; &#180;t 0 dt &#8242; &#8710; &#945; (t &#8242; )h &#945; (t &#8242; ). H &#8467; &#181;&#957; (t, s) = K x &#181;&#957; + &#8467;&#947; 2 0 &#945;&#946; K x &#181;&#945; K x &#957;&#946; &#710;t 0 dt &#8242; &#8710; &#945; (t &#8242; ) &#710;t&#8242; 0 dt &#8242; &#8242; &#8710; &#946; (t &#8242; &#8242; ) + ((&#181;, t) &#8596; (&#957;, s)) + &#8467;&#947; 2 0 &#945;&#946; K x &#181;&#945; K x &#957;&#946; &#710;t 0 dt &#8242; &#8710; &#945; (t &#8242; ) &#710;s 0 ds &#8242; &#8710; &#946; (s &#8242; ) G &#8467; (t, s) = 1 + &#947; 2 0 (L + 1 -&#8467;) &#945;&#946; K x &#945;&#946; &#710;t 0 dt &#8242; &#8710; &#945; (t &#8242; ) &#710;t&#8242; 0 dt &#8242; &#8242; &#8710; &#946; (t &#8242; &#8242; ) + (t &#8596; s) + &#947; 2 0 (L + 1 -&#8467;) &#945;&#946; K x &#181;&#945; &#710;t 0 dt &#8242; &#8710; &#945; (t &#8242; ) &#710;s 0 ds &#8242; &#8710; &#945; (s &#8242; ) . (P.3) Self-consistent dynamical field theory of kernel evolution in wide neural networks Stat. Mech. (2023) 114009 We can simplify the notation by introducing functions v &#945; (t) = &#180;t 0 &#8710; &#945; (t &#8242; ) and v &#945;&#946; (t) = &#180;t 0 dt &#8242; &#8710; &#945; (t &#8242; ) &#180;t&#8242; 0 dt &#8242; &#8242; &#8710; &#946; &#8242; &#8242; ). H &#8467; &#181;&#957; (t, s) = K x &#181;&#957; + &#8467;&#947; 2 0 &#945;&#946; K x &#181;&#945; K x &#957;&#946; [v &#945;&#946; (t) + v &#946;&#945; (s)] + &#8467;&#947; 2 0 &#945;&#946; K x &#181;&#945; K x &#957;&#946; v &#945; (t) v &#946; (s) G &#8467; (t, s) = 1 + &#947; 2 0 (L + 1 -&#8467;) &#945;&#946; K x &#945;&#946; [v &#945;&#946; (t) + v &#946;&#945; (s) + v &#945; (t) v &#946; (s)] . (P.4) Using the fact that K NTK &#181;&#945; (t, s) = L &#8467;=0 G &#8467;+1 (t, s) H &#8467; &#181;&#945; (t, s) &#8764; (L + 1) K x &#181;&#945; + &#947; 2 0 L &#8467;=1 H &#8467;,2 &#181;&#945; (t, s) + &#947; 2 0 L &#8467;=1 G &#8467;,2 (t, s) K x &#181;&#945; + O &#947; 4 0 (P.5)</p><p>and utilizing the identity L &#8467;=1 &#8467; = 1 2 L(L + 1), we recover the result provided in the main text.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>P.2. Nonlinear perturbation theory</head><p>In this section, we explore perturbation theory in nonlinear networks. We start with the formula which implicitly defines h &#8467; , z &#8467; treated as vectors over samples and time h &#8467; = u &#8467; + &#947; 0 C &#8467; &#966; h &#8467; &#8857; z &#8467; , z &#8467; = r &#8467; + &#947; 0 D &#8467; &#981; h &#8467; .</p><p>(P.6)</p><p>We proceed under the assumption of a power series in &#947; 0 h &#8467;u &#8467; = &#947; 0 h &#8467;,1 + &#947; 2 0 h &#8467;,2 + . . . z &#8467;r &#8467; = &#947; 0 z &#8467;,1 + &#947; 2 0 z &#8467;,2 + . . . &#934; &#8467; -&#934; &#8467;,0 = &#947; 0 &#934; &#8467;,1 + &#947; 2 0 &#934; &#8467;,2 + . . . G &#8467; -G &#8467;,0 = &#947; 0 G &#8467;,1 + &#947; 2 0 G &#8467;,2 + . . . C &#8467; -C &#8467;,0 = &#947; 0 C &#8467;,1 + &#947; 2 0 C &#8467;,2 + . . . D &#8467; -D &#8467;,0 = &#947; 0 D &#8467;,1 + &#947; 2 0 D &#8467;,2 + . . . . (P.7)</p><p>As before, the leading terms for C &#8467;,0 , D &#8467;,1 only depend on time through the functions {v &#945; (t)} and {v &#945;&#946; (t)}. Expanding both sides of the implicit equation for z &#8467; we have</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural J. Stat. Mech. (2023) 114009 &#947; 0 z &#8467;,1 + &#947; 2 0 z &#8467;,2 + . . . = &#947; 0 D &#8467;,0 &#981; u &#8467; + &#947; 2 0 D &#8467;,0 &#966; (u) &#8857; h &#8467;,1 + D &#8467;,1 &#981; (u) + &#947; 3 0 D &#8467;,0 &#966; &#8857; h &#8467;,2 + D &#8467;,0 &#966; (u) &#8857; h &#8467;,1 2 + D &#8467;,1 &#966; (u) &#8857; h &#8467;,1 + D &#8467;,2 &#981; (u) + O &#947; 4 0 .</p><p>(P.8)</p><p>Performing a similar exercise for h &#8467; , we get the following first three leading terms for z &#8467; , h &#8467; , and we find z &#8467;,1 = D &#8467;,0 &#981; (u) z &#8467;,2 = D &#8467;,0 &#966; (u) &#8857; h &#8467;,1 + D &#8467;,1 &#981; (u) z &#8467;,3 = D &#8467;,0 1 2 &#966; (u) &#8857; h &#8467;,1 2 + &#966; (u) &#8857; h &#8467;,2 + D &#8467;,1 &#966; (u) &#8857; h &#8467;,1 + D &#8467;,2 &#981; (u)</p><p>= C &#8467;,0 &#966; (u) z &#8467;,1 + &#966; (u) h &#8467;,1 r + C &#8467;,1 &#966; (u) z &#8467;,2 + &#966; (u) h &#8467;,1 z &#8467;,1 + 1 2</p><p>... &#981; (u) h &#8467;,1 2 r + &#966; (u) h &#8467;,2 r h &#8467;,3 = C &#8467;,0 g &#8467;,2 + C &#8467;,1 g &#8467;,1 + C &#8467;,2 g &#8467;,0</p><p>= C &#8467;,0 &#966; (u) z &#8467;,2 + &#966; (u) h &#8467;,1 z &#8467;,1 + &#966; (u) h &#8467;,2 r + 1 2</p><p>... &#981; (u) h &#8467;,1 2 r + C &#8467;,1 &#966; (u) z &#8467;,1 + &#966; (u) h &#8467;,1 r + C &#8467;,2 &#966; (u) r . (P.9)</p><p>As will become apparent soon, it is crucially important to identify the dependence of each of these terms on r . We note that z &#8467;,1 does not depend on r and h &#8467;,1 is linear in r.</p><p>In the next section, we use this fact to show that &#934; &#8467;,1 = 0 and G &#8467;,1 = 0. These conditions imply that C &#8467;,0 and D &#8467;,1 = 0. As a consequence, z &#8467;,2 is linear in r and h &#8467;,2 only contains even powers of r. Lastly, this implies that z &#8467;,3 only contains even powers of r and h &#8467;,3 contains only odd powers of r.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks The analogous argument for G L now can be provided. First note that r L is independent of u L and of &#947; 0 . Thus we can that G L has no linear-in-&#947; 0 term in its expansion since</p><p>each term contains only odd powers of r L and odd moments of Gaussian variables vanish. After much more work, one can verify that G L,3 also must vanish since all terms contain odd powers of r .</p><p>G L,3 = g L,3 g L,0&#8868; + g L,0 g L,3&#8868; + g L,2 g L,1&#8868; + g L,1 g L,2&#8868; (P.17)</p><p>First, note that g L,0 is linear in r . Next, note that g L,1 only depends on even powers of r since g L,1 = &#966;(u)z L,1 + &#966;(u)h L,1 r. Next, we have g L,2 = &#966; (u) z L,2 + &#966; (u) h L,2 r + h L,1 z L,1 + 1 2</p><p>... &#981; (u) h L,1 2 . (P.18) which only depends on odd powers of r . Lastly, we have g L,3</p><p>g L,3 = &#966; (u) z L,3 + &#966; (u) h L,3 r + h L,2 z L,1 + h L,1 z L,2 + 1 2</p><p>... &#981; (u) 2h L,1 h L,2 r + h L,1 2 z L,1 + 1 6 &#981; (4) (u) h L,1 3 r (P. <ref type="bibr">19)</ref> which we see only contains even powers of r . Thus g L,3 g L,0 will be odd in r . Looking at the expansion for G L,3 , we see that all terms are odd in r and so the averages vanish under the Gaussian integrals.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>P.5. Backward pass recursion for G &#8467;</head><p>We can derive a similar recursion on the backward pass for G &#8467; 's leading order corrections. Using the same idea from the previous section, we find the following expressions This time, we see that G &#8467; accumulates corrections from succeeding layers through the backward pass recursion.</p><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks Stat. Mech. (2023) 114009</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>P.6. Form of the leading corrections</head><p>We can expand the h &#8467; and z &#8467; fields around u &#8467;,0 , r &#8467;,0 to find the leading order corrections to each feature kernel</p><p>| &#947; 0 =0 h &#8467; (u 0 , r 0 , &#947; 0 ) &#981; h &#8467; (u 0 , r 0 , &#947; 0 ) where we used the fact that C &#8467;,1 = 0 which follows from the fact that &#934; &#8467;-1,1 = 0, and &#8710; &#8467;,1 = 0. Now, expanding out term by term We see that the corrections for the &#934; &#8467; kernels accumulate on the forward pass through the final term so &#934; &#8467;,2 &#8764; O(&#8467;). Now we will perform the same analysis for G &#8467; . (P. <ref type="bibr">23)</ref> </p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>https://doi.org/10.1088/1742-5468/ad01b0</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_1"><p>J. Stat. Mech. (2023) 114009</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_2"><p>Self-consistent dynamical field theory of kernel evolution in wide neural networks</p></note>
		</body>
		</text>
</TEI>
