Self-Consistent Dynamical Field Theory of Kernel Evolution in Wide Neural Networks
Abstract
We analyze feature learning in inﬁnite-width neural networks trained with gradient ﬂow through a self-consistent dynamical ﬁeld 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 deﬁne the hidden layer activation distribution, the evolution of the neural tangent kernel, and consequently output predictions.
We show that the ﬁeld theory derivation recovers the recursive stochastic process of inﬁnite-width feature learning networks obtained from Yang & Hu with Tensor Programs [1].
For deep linear networks, these kernels satisfy a set of algebraic matrix equations.
For nonlinear networks, we provide an alternating sampling procedure to selfconsistently 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 CNNs at ﬁxed feature learning strength is preserved across different widths on a CIFAR classiﬁcation task.
Introduction
Deep learning has emerged as a successful paradigm for solving challenging machine learning and computational problems across a variety of domains [2, 3].
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, efﬁciently computable, capable of predicting network performance and internal features that the network learns and interpretable through a reduced description involving desirably initialization-independent quantities.
Several recent theoretical advances have fruitfully considered the idealization of wide neural networks , where the number of hidden units in each layer is taken to be large.
Under certain parameterization,
Bayesian neural networks and gradient descent trained networks converge to gaussian processes (NNGPs) [4–6] and neural tangent kernel (NTK) machines [7–9] in their respective inﬁnite-width limits.
These limits provide both analytic tractability as well as detailed training and generalization analysis [10–17].
However, in this limit, with these parameterizations, data representations are ﬁxed and do not adapt to data, termed the lazy regime of NN training, to contrast it from the rich regime where NNs signiﬁcantly alter their internal features while ﬁtting the data [18, 19].
The fact that the representation of data is ﬁxed renders these kernel-based theories incapable of explaining feature learning, an ingredient which is crucial to the success of deep learning in practice [20, 21].
Thus, alternative theories capable of modeling feature learning dynamics are needed.
Recently developed alternative parameterizations such as the mean ﬁeld [22] and the µP [1] parameterizations allow feature learning in inﬁnite-width NNs trained with gradient descent.
Using the
Tensor Programs framework, Yang & Hu identiﬁed a stochastic process that describes the evolution of preactivation features in inﬁnite-width µP NNs [1].
In this work, we study an equivalent parameterization to µP with self-consistent dynamical mean ﬁeld theory (DMFT) and recover the stochastic process description of inﬁnite NNs using this alternative technique.
In the same large width scaling, we include a scalar parameter γ 0 that allows smooth interpolation between lazy and rich behavior [18].
We provide a new computational procedure to sample this stochastic process and demonstrate its predictive power for wide NNs.
Our novel contributions in this paper are the following:
We develop a path integral formulation of gradient ﬂow dynamics in inﬁnite-width networks in the feature learning regime.
Our parameterization includes a scalar parameter γ 0 to allow interpolation between rich and lazy regimes and comparison to perturbative methods. 2.
Using a stationary action argument, we identify a set of saddle point equations that the kernels satisfy at inﬁnite-width, relating the stochastic processes that deﬁne hidden activation evolution to the kernels and vice versa.
We show that our saddle point equations recover at γ 0 = 1 , from an alternative method, the same stochastic process obtained previously with Tensor Programs [1].
We develop a polynomial-time numerical procedure to solve the saddle point equations for deep networks.
In numerical experiments, we demonstrate that solutions to these self-consistency equations are predictive of network training at a variety of feature learning strengths, widths and depths.
We provide comparisons of our theory to various approximate methods, such as perturbation theory.
1.1 Related Works
A natural extension to the lazy NTK/NNGP limit that allows the study of feature learning is to calculate ﬁnite width corrections to the inﬁnite-width limit.
Finite width corrections to Bayesian inference in wide networks have been obtained with various perturbative [23–29] and self-consistent techniques [30–33].
In the gradient descent based setting, leading order corrections to the NTK dynamics have been analyzed to study ﬁnite width effects [34–36, 27].
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 [37, 38].
Another approach to study feature learning is to alter NN parameterization in gradient-based learning to allow signiﬁcant feature evolution even at inﬁnite-width, the mean ﬁeld limit [22, 39].
Works on mean ﬁeld NNs have yielded formal loss convergence results [40, 41] and shown equivalences of gradient ﬂow dynamics to a partial differential equation (PDE) [42–44].
Our results are most closely related to a set of recent works which studied inﬁnite-width NNs trained with gradient descent (GD) using the Tensor Programs (TP) framework [1].
We show that our discrete time ﬁeld theory at unit feature learning strength γ
= 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 [45].
Computing the exact inﬁnite-width limit of GD has exponential time requirements [1], which we show can be circumvented with an alternating sampling procedure.
A projected variant of GD training has provided an inﬁnite-width theory that could be scaled to realistic datasets like CIFAR-10 [46].
Inspired by Chizat and Bach’s work on mechanisms of lazy and rich training [18], our theory interpolates between lazy and rich behavior in the mean ﬁeld limit for varying γ 0 and allows comparison of DMFT to perturbative analysis near small γ 0 .
Further, our derivation of a DMFT action allows the possibility of pursuing ﬁnite width effects.
Our theory is inspired by self-consistent dynamical mean ﬁeld theory (DMFT) from statistical physics [47–53].
This framework has been utilized in the theory of random recurrent networks [54–59], tensor PCA [60, 61], phase retrieval [62], and high-dimensional linear classiﬁers [63–66], 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 inﬁnite-width limit.
Problem Setup and Deﬁnitions
Our theory applies to inﬁnite-width networks, both fully-connected and convolutional.
For notational ease we will relegate convolutional results to later sections.
For input x µ ∈ R D , we deﬁne the hidden pre-activation vectors h (cid:96) ∈
R N for layers (cid:96) ∈ { 1 , ..., L } as
[Equation]
where θ =
Vec { W 0 , ..., w L } are the trainable parameters of the network and φ is a twice differentiable activation function.
Inspired by previous works on the mechanisms of lazy gradient based training, the parameter γ will control the laziness or richness of the training dynamics [18, 19, 1, 42].
Each of the trainable parameters are initialized as Gaussian random variables with unit variance W (cid:96)ij ∼
N (0 , 1) .
They evolve under gradient ﬂow ddt θ = − γ 2 ∇ θ L .
The choice of learning rate γ 2 causes ddt L| t =0 to be independent of γ .
To characterize the evolution of weights, we introduce backpropagation variables g (cid:96)µ
[Equation]
(cid:96)µ ) (cid:12)
[Equation]
(cid:96)µ , where z (cid:96)µ = 1 √ N W (cid:96) (cid:62) g (cid:96) +1 µ is the pre-gradient signal.
The relevant dynamical objects to characterize feature learning are feature and gradient kernels for each hidden layer (cid:96) ∈ { 1 , ..., L } , deﬁned as
[Equation]
From the kernels { Φ (cid:96) , G (cid:96) } L(cid:96)
=1 , we can compute the Neural Tangent Kernel K NTKµα ( t, s )
= ∇ θ f µ ( t ) · ∇ θ f α ( s ) =
(cid:80) L(cid:96)
=
G (cid:96) +1 µα ( t, s )Φ (cid:96)µα ( t, s ) , [7] and the dynamics of the network function f µ
[Equation]
where we deﬁne base cases G L +1 µα ( t, s )
= 1 , Φ 0 µα ( t, s ) =
K xµα =
1 D x µ · x α .
We note that the above formula holds for any data point µ 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 µ ( t ) .
Following prior works on inﬁnite-width networks [22, 1, 40, 19], we study the mean ﬁeld limit
[Equation]
As we demonstrate in the Appendix D and N, this is the only N -scaling which allows feature learning as N → ∞ .
The γ 0 = 0 limit recovers the static NTK limit [7].
We discuss other scalings and parameterizations in Appendix N, relating our work to the µP -parameterization and TP analysis of [1], showing they have identical feature dynamics in the inﬁnite-width limit.
We also analyze the effect of different hidden layer widths and initialization variances in the Appendix D.8.
We focus on reduce complexity.
Self-consistent DMFT
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 inﬁnite-width enjoys several analytical properties:
• The kernel order parameters Φ (cid:96) , G (cid:96) concentrate over random initializations but are dynamical, allowing ﬂexible adaptation of features to the task structure.
• In each layer (cid:96) , each neuron’s preactivation h (cid:96)i and pregradient z (cid:96)i become i.i
d. draws from a distribution characterized by a set of order parameters { Φ (cid:96) , G (cid:96) , A (cid:96) , B (cid:96) } .
• The kernels are deﬁned as self-consistent averages (denoted by (cid:104)(cid:105) ) over this distribution of neurons in each layer
Φ (cid:96)µα ( t, s ) =
(cid:10) φ ( h (cid:96)µ ( t ))
φ ( h (cid:96)α ( s )) (cid:11) and G (cid:96)µα ( t, s ) =
(cid:10) g (cid:96)µ ( t ) g (cid:96)α ( s ) (cid:11) .
The next section derives these facts from a path-integral formulation of gradient ﬂow dynamics.
3.1 Path Integral Construction
Gradient ﬂow after a random initialization of weights deﬁnes 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 simpliﬁed derivation of the DMFT for the two-layer ( L = 1 ) case, see D.2.
Generally, we separate the contribution on each forward/backward pass between the initial condition and gradient updates to weight matrix W (cid:96) , deﬁning new stochastic variables χ (cid:96) , ξ (cid:96)
∈
R N as
[Equation]
We let Z represent the moment generating functional (MGF) for these stochastic ﬁelds
[Equation]
which requires, by construction the normalization condition Z [ { 0 , 0 } ]
= 1 .
We enforce our deﬁnition of χ , ξ using an integral representation of the delta-function.
Thus for each sample µ ∈ [ P ] and each time t ∈ R + , we multiply Z by
[Equation]
for χ and the respective expression for ξ .
After making such substitutions
[Equation]
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 { Φ (cid:96) , ˆΦ (cid:96) , G
[Equation]
, ˆ G
[Equation]
, A
[Equation]
, B (cid:96) }
[Equation]
(8) where S is the DMFT action and Z is a single-site MGF, which deﬁnes the distribution of ﬁelds { χ (cid:96) , ξ (cid:96) } over the neural population in each layer.
The kernels A and B are related to the correlations between feedforward and feedback signals in the network.
We provide a detailed formula for Z in the Appendix D.4 and show that it factorizes over different layers
Z = (cid:81) L(cid:96)
=1 Z (cid:96) .
3.2 Deriving the DMFT Equations from the Path Integral Saddle Point
As N → ∞ , the moment-generating function Z is exponentially dominated by the saddle point of S .
The equations that deﬁne this saddle point also deﬁne our DMFT.
We thus identify the kernels that render S locally stationary ( δS = 0 ).
The most important equations are those which deﬁne { Φ (cid:96) , G (cid:96) }
[Equation]
[Equation]
where (cid:104)(cid:105) denotes an average over the stochastic process induced by Z , which is deﬁned below
[Equation] [Equation]
[Equation] [Equation]
where we deﬁne base cases Φ 0 µα ( t, s )
=
K xµα and G L +1 µα ( t, s )
= 1 ,
A
= B L = 0 .
We see that the ﬁelds { h (cid:96) , z (cid:96) } , which represent the single site preactivations and pre-gradients, are implicit functionals of the mean-zero Gaussian processes { u (cid:96) , r (cid:96) } which have covariances (cid:10) u (cid:96)µ ( t ) u (cid:96)α ( s ) (cid:11) =
Φ (cid:96) − 1 µα ( t, s ) and (cid:10) r (cid:96)µ ( t ) r (cid:96)α ( s ) (cid:11) =
G (cid:96) +1 µα ( t, s ) .
The other saddle point equations give
A
[Equation] [Equation]
s ) (cid:29) which arise due to coupling between the feedforward and feedback signals.
We note that, in the lazy limit γ 0 → 0 , the ﬁelds approach
Gaussian processes h (cid:96) → u (cid:96) , z (cid:96) → r (cid:96) .
Lastly, the ﬁnal saddle point equations δSδ Φ (cid:96) = 0 , δSδG (cid:96)
=imply that ˆΦ (cid:96) =
ˆ G (cid:96) = 0 .
The full set of equations that deﬁne the DMFT are given in D.7.
This theory is easily extended to more general architectures such as networks with varying widths by layer (App. D.8), trainable bias parameter (App. H), multiple (but O N (1) ) output channels (App.
I), convolutional architectures (App. G), networks trained with weight decay (App. J),
Langevin sampling (App. K) and momentum (App. L), discrete time training (App. M).
In Appendix N, we discuss parameterizations which give equivalent feature and predictor dynamics and show our derived stochastic process is equivalent to the µP scheme of Yang & Hu [1].
Solving the Self-Consistent DMFT
The saddle point equations obtained from the ﬁeld 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 (cid:96) , z (cid:96) } , and given the distribution of { h (cid:96) , z (cid:96) } , we can compute the kernels [67, 64].
In the Appendix B, we provide Algorithm 1, a numerical procedure based on this idea to efﬁciently solve for the kernels with an alternating Monte-Carlo strategy.
The output of the algorithm are the dynamical kernels Φ (cid:96)µα ( t, s ) , G (cid:96)µα ( t, s ) ,
A (cid:96)µα ( t, s ) , B (cid:96)µα ( 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 ﬁnite NN in Figure 1.
We plot Φ (cid:96) , G (cid:96) at the end of training and the sample-trace of these kernels through time.
Additionally, we compare the kernels of ﬁnite width N network to the DMFT predicted kernels using a cosine-similarity alignment metric
A ( Φ DMFT , Φ NN ) =
Tr Φ DMFT Φ NN | Φ DMFT
||
Φ NN | .
Additional examples are in Appendix Figures 6 and Figure 7.
4.1 Deep Linear Networks: Closed Form Self-Consistent Equations
Deep linear networks ( φ ( h ) = h ) are of theoretical interest since they are simpler to analyze than nonlinear networks but preserve non-trivial training dynamics and feature learning [68–72, 25, 32, 23].
In a deep linear network, we can simplify our saddle point equations to algebraic formulas that close in terms of the kernels H (cid:96)µα ( t, s ) =
(cid:10) h (cid:96)µ ( t ) h (cid:96)α ( s ) (cid:11) , G (cid:96) ( t, s ) =
(cid:10) g (cid:96) ( t ) g (cid:96) ( s ) (cid:11) [1].
This is a signiﬁcant simpliﬁcation since it allows solution of the saddle point equations without a sampling procedure.
To describe the result, we ﬁrst introduce a vectorization notation h (cid:96) =
Vec { h (cid:96)µ ( t ) } µ ∈ [ P ] ,t ∈ R + .
Likewise we convert kernels H (cid:96) =
Mat { H (cid:96) µα ( t, s ) } µ,α ∈
[ P ] ,t,s ∈ R + into matrices.
The inner product under this vectorization is deﬁned as a · b = (cid:82) ∞
dt (cid:80) Pµ
=1 a µ ( t ) b µ ( t ) .
In a practical computational implementation, the theory would be evaluated on a grid of T time points with discrete time gradient descent, so these kernels H (cid:96) ∈
R PT × PT would indeed be matrices of the appropriate size.
The ﬁelds h (cid:96) , g (cid:96) are linear functionals of independent Gaussian processes u (cid:96) , r (cid:96) , giving ( I − γ 20 C (cid:96) D
[Equation]
) h
[Equation]
=
[Equation]
+
[Equation] [Equation]
−
[Equation]
20 D
[Equation]
C
[Equation] [Equation]
=
[Equation]
+
[Equation]
0 D
[Equation]
u (cid:96) .
The matrices C (cid:96) and D (cid:96) are causal integral operators which depend on { A (cid:96)
[Equation]
1 , H (cid:96) − 1 } and { B (cid:96) , G (cid:96) +1 } respectively which we deﬁne in
Appendix F.
The saddle point equations which deﬁne the kernels are
[Equation]
Examples of the predictions obtained by solving these systems of equations are provided in Figure 2.
We see that these DMFT equations describe kernel evolution for networks of a variety of depths and that the change in each layer’s kernel increases with the depth of the network.
Unlike many prior results [68–71], our DMFT does not require any restrictions on the structure of the input data but hold for any K x , y .
However, for whitened data K x
= I we show in
100 t 0.
t
NN 0 =
NN 0 =1.0 DMFT
6 h 0.
I n i t i a l
D e n s i t y =1=2= (
Density      6 h 0.
F i n a l
D e n s i t y =1=2=
E x p t =
T h
e o r y
= =
E x p t ( t , s ) =
D M F T ( t , s ) =
= (e) Φ (cid:96) Dynamics γ 0 = 1 .101010 3 N 0.
A ( D M F T ,
NN )
=1=2= (f
Φ (cid:96) Convergence to
E x p t G =
T h
e o r y
G = =
E x p t G ( t , s ) =
D M F T G ( t , s ) =
= (h) G (cid:96) Dynamics γ 0 = 1 .101010 3 N 0.
A ( G D M F T , G NN )
=1=2=
Around N ∼ 500 DMFT begins to show near perfect agreement with the for
Whereas width effects larger at layers since accumulates on
Appendix F.1.1, F.2 that our DMFT learning curves interpolate between NTK dynamics and the sigmoidal trajectories of prior works [68, 69] as γ 0 is increased.
For example, in the two layer ( L = 1 ) linear network with K x =
I , the dynamics of the error norm ∆( t ) =
|| ∆ ( t ) || takes the form ∂∂t ∆( t ) =
− 2 (cid:112) 1 + γ 20 ( y − ∆( t ))
2 ∆( t ) where
y =
||
y || .
These dynamics give the linear convergence rate of the NTK if γ 0 → 0 but approaches logistic dynamics of [69] as γ 0 → ∞ .
Further,
H ( t ) =
(cid:10) h 1 ( t ) h 1 ( t ) (cid:62) (cid:11)
∈ R P × P only grows in the yy (cid:62) direction with H y ( t ) = 1 y 2 y
(cid:62) H ( t )
y =
(cid:112)
+ γ
( y − ∆( t )) 2 .
At the end of training H ( t ) → I + 1 y 2 [ (cid:112) 1 + γ 20 y 2 − 1] yy (cid:62) , recovering the rank one spike which was recently obtained in the small initialization limit [73].
We show this one dimensional system in Figure 8.
4.2 Feature Learning with L2 Regularization
As we show in Appendix J, the DMFT can be extended to networks trained with weight decay d θ dt = − γ 2 ∇ θ L − λ θ .
If neural network is homogenous in its parameters so that f ( c θ ) =
c κ f ( θ ) (examples include networks with linear, ReLU, quadratic activations), then the ﬁnal network predictor
100 t 0.
t
L =2 L =3 L =
L =5 DMFT (
[Figure]
Dynamics
E x p t .
H
T h
e o r y
H
H H
H
[Figure]
(cid:96) Kernels
[Figure] [Figure]
[Figure] [Figure]
[Figure] [Figure]
( H
[Figure] [Figure]
[Figure]
NNDMFT
[Figure]
is a kernel regressor with the ﬁnal NTK lim t →∞ f ( x , t ) =
k ( x ) (cid:62) [ K + λκ I ] − 1 y where K ( x , x (cid:48) ) is the ﬁnal -NTK, [ k ( x )] µ = K ( x , x µ ) and
[ K ] µα = K ( x µ , x α ) .
We note that the effective regularization λκ increases with depth L .
In NTK parameterization, weight decay in inﬁnite width homogenous networks gives a trivial ﬁxed point K ( x , x (cid:48) )
→ 0 and consequently a zero predictor f → 0 [74].
However, as we show in Figure 3, increasing feature learning γ 0 can prevent convergence to the trivial ﬁxed point, allowing a non-zero ﬁxed point for K, f even at inﬁnite width.
The kernel and function dynamics can be predicted with DMFT.
The ﬁxed point is a nontrivial function of the hyperparameters λ, κ, L, γ 0 .
[Figure]
Approximation Schemes
We now compare our exact DMFT with approximations of prior works, providing an explanation of when these approximations give accurate predictions and when they break down.
5.1 Gradient Independence Ansatz
We can study the accuracy of the ansatz A (cid:96) =
B (cid:96) = 0 , which is equivalent to treating the weight matrices W (cid:96) (0) and W (cid:96) (0) (cid:62) 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 [75–79].
A consequence of this approximation is the Gaussianity and statistical independence of χ (cid:96) and ξ (cid:96) (conditional on { Φ (cid:96) , G (cid:96) } ) in each layer as we show in Appendix
O. This ansatz works very well near γ
≈
(the static kernel regime) since d h d r , d z d u ∼ O
( γ 0 ) or around initialization t
≈
but begins to fail at larger values of γ 0 , t (Figure 4).
5.2 Perturbation theory in γ 0 at inﬁnite-width
In the γ 0 → 0 limit, we recover static kernels, giving linear dynamics identical to the NTK limit [7].
Corrections to this lazy limit can be extracted at small but ﬁnite γ 0 .
This is conceptually similar to recent works which consider perturbation series for the NTK in powers of 1 /N [35, 27, 28] (though not identical, see Appendix P.7 for ﬁnite N effects).
We expand all observables q ( γ 0 ) in a power series in γ 0 , giving q ( γ 0 ) =
q (0) + γ 0 q (1) + γ 20 q (2) + ... and compute corrections up to
O ( γ 20 ) .
We show that the O ( γ 0 ) and O ( γ 30 ) corrections to kernels vanish, giving leading order expansions of the form Φ =
Φ 0 + γ 20 Φ 2 + O ( γ 40 ) and G =
G 0 + γ 20 G 2 + O ( γ 40 ) (see Appendix
P.2).
Further, we show that the NTK has relative change at leading order which scales linearly with depth | ∆ K NTK | / | K NTK, 0 | ∼ O γ 0 ,L ( Lγ 20 ) =
O N,γ,L ( γ 2 LN ) , which is consistent with ﬁnite width effective ﬁeld theory at γ =
O N (1) [26–28] (Appendix P.6).
Further, at the leading order correction, all temporal dependencies are controlled by P ( P + 1) functions v α ( t ) =
(cid:82) t 0 ds ∆
α ( s ) and v αβ ( t ) = (cid:82) t
[Equation]
( s ) (cid:82)
[Equation]
ds (cid:48) ∆
[Equation]
( s (cid:48) ) , which is consistent with those derived for ﬁnite width NNs using a truncation of the Neural Tangent Hierarchy [34, 35, 27].
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 ﬁnd that the leading order correction to the kernels in inﬁnite-width deep linear network have the form
[Equation]
We see that the relative change in the NTK | K
[Equation]
=
O ( γ 2 L/N ) , so that large depth L networks exhibit more signiﬁcant kernel evolution, which agrees with other perturbative studies [35, 27, 25] as well as the non-perturbative results in Figure 2.
However at large γ 0 and large L , this theory begins to break down as we show in Figure 4.
The DMFT formalism can also be used to extract leading corrections to observables at large but ﬁnite width N as we explore in P.7. When deviating from inﬁnite width, the kernels are no longer deterministic over network initializations. The key observation is that the DMFT action S deﬁnes a Gibbs measure over the space of kernel order parameters k
= Vec { Φ (cid:96) , G (cid:96) , A (cid:96) , B (cid:96) } with probability density 1 Z exp ( NS [ k ]) where Z is a normalization constant. Near inﬁnite width, any observable average (cid:104) O ( k ) (cid:105) =
1 Z (cid:82) d k exp ( NS [ k ]) O
( k ) is dominated by order parameters within a 1 √ N neighborhood of k ∗ . As a consequence, a perturbative series for (cid:104) O ( k ) (cid:105) can be obtained from simple averages over Gaussian ﬂuctuations in the kernels k ∼ N ( k ∗ , − 1 N [ ∇ 2 S [ k ∗ ]] − 1 ) [29].
The components for ∇ 2 S [ k ∗ ] include four point correlations of ﬁelds computed over the DMFT distribution.
[Figure]
E x p t .
H
D M F T
N T K
P e r t .
G r .
I n d .
H H
H H
[Figure]
N
[Figure]
K
P e r t .
G r .
I n d .
[Figure]
The predictions of all of these theories coincide in the γ 0 = 0 limit but begin to deviate in the feature learning regime.
Only the non-perturbative DMFT is accurate over a wide range of γ 0 .
Feature Learning Dynamics is Preserved at Fixed γ
Our DMFT suggests that for networks sufﬁciently wide for their kernels to concentrate, the dynamics of loss and kernels should be invariant under the rescaling N → RN, γ → γ/ √ R , which keeps γﬁxed. To evaluate how well this idea holds in a realistic deep learning problem, we trained CNNs of varying channel counts N on two-class CIFAR classiﬁcation [80]. We tracked the dynamics of the loss and the last layer Φ L kernel.
The results are provided in Figure 5.
We see that dynamics are largely independent of rescaling as predicted.
Further, as expected, larger γ 0 leads to larger changes in kernel norm and faster alignment to the target function y , as was also found in [81].
Consequently, the higher γ 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.
Discussion
We provided a unifying DMFT derivation of feature dynamics in inﬁnite networks trained with gradient based optimization.
Our theory interpolates between lazy inﬁnite-width behavior of a static
NTK in γ
→ 0 and rich feature learning.
At γ 0 = 1 , our DMFT construction agrees with the stochastic process derived previously with the Tensor Programs framework [1].
Our saddle point equations give self-consistency conditions which relate the stochastic ﬁelds to the kernels.
These equations are exactly solveable in deep linear networks and can be efﬁciently 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 γ 0 .
We believe our framework could be a useful perspective for future theoretical analyses of feature learning and generalization in wide networks. {+100 t 0. T e s t L o ss N =250, 0 =1 N =500, 0 =1 
+}
{+= 
+}
= (a) Test MSE     100 t 0. T e s t A cc u r a c y (b) Classiﬁcation Error     100 t 0. [Figure]
A li g n m e n
[Figure]
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 [32, 82].
The computational requirements of our method, while smaller than the exponential time complexity for exact solution [1], are still signiﬁcant for large PT .
In Table 1, we compare the time taken for various theories to compute the feature kernels throughout T steps of gradient descent.
For a width N network, computation of each forward pass on all P data points takes O ( PN 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 × 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 [64] or one pass SGD [1].
[-N =250, 0 =1 N =500, 0 =1 
-]
[-= 
-]
Alternative projected versions of gradient descent have also enabled much better computational scaling in evaluation of the theoretical predictions [46], allowing evaluation on full CIFAR-10.
Requirements
Width- N NN
Static NTK
Perturbative
Full DMFT
Memory for Kernels
O ( N 2 )
O ( P 2 )
O ( P 4 T )
O ( P 2 T 2 )
Time for Kernels
O ( PN 2 T )
O ( P 2 )
O ( P 4 T )
O ( P 3 T 3 )
Time for Final Outputs
O ( PN 2 T )
O ( P 3 )
O ( P 4 )
O ( P 3 T 3 )
Acknowledgments and Disclosure of Funding
This work was supported by NSF grant DMS-2134157 and an award from the Harvard Data Science
Initiative Competitive Research Fund.
BB acknowledges additional support from the NSF-Simons
Center for Mathematical and Statistical Analysis of Biology at Harvard (award #1764269) and the
Harvard Q-Bio Initiative.
BB thanks Jacob Zavatone-Veth, Alex Atanasov, Abdulkadir Canatar
A Additional Figures
[Figure]
We plot the preactivation h distribution for neurons in the hidden layer of the trained NN against the theoretical densities deﬁned by Z [Φ , G ] .
For small γ 0 , the ﬁnal distribution is approximately
Gaussian, but becomes non-Gaussian, asymmetric and heavy tailed for large γ 0 .
The estimate of the distribution is noisy due to ﬁnite sampling error
The gradient distribution p ( z ) in the trained network has larger ﬁnal variance large γ ﬁnal Φ
G are accurately predicted by structure that increases with γ 0 due to feature learning.
[Figure]
h e o r y
E x p t
[Figure]
h
[Figure]
o r y
E x p t
[Figure] [Figure]
[Figure]
t ) error dynamics from F.1.1 allows one to solve for H ( t ) by solving a one dimensional ODE at each value of γ 0 .
The learning curves interpolate between exponential convergence at small γ
and logistic sigmoidal trajectories at large γ 0 .
(b) The projection of the kernel H ( t ) along the task relevant subspace y ∈ R P .
[Figure]
E x p t .
H
G r a d .
I n d e p .
H H
H H
[Figure] [Figure]
B Algorithmic Implementation
The alternating sample-and-solve procedure we developed and describe below for nonlinear networks is based on numerical recipes used in the dynamical mean ﬁeld simulations in computational physics [67].
The basic principle is to leverage the fact that, conditional on kernels, we can easily draw samples { u (cid:96)µ ( t ) , r (cid:96)µ ( t ) } from their appropriate GPs.
From these sampled ﬁelds, we can identify the kernel order parameters by simple estimation of the appropriate moments.
Data: K x , y , Initial Guesses { Φ (cid:96) , G (cid:96) } L(cid:96)
=1 , { A (cid:96) , B (cid:96) } L − 1 (cid:96) =1 , Sample count S , Update Speed β
Result: Final Kernels { Φ (cid:96) , G (cid:96) } L(cid:96)
=1 , { A (cid:96) , B (cid:96) } L − 1 (cid:96) =1 , Network predictions through training f µ ( t )
Φ 0 = K x ⊗ 11 (cid:62) , G L +1 = 11 (cid:62) ; 2 while Kernels Not Converged do
From { Φ (cid:96) , G (cid:96) } compute K NTK ( t, t ) and solve ddt f µ ( t ) =
(cid:80)
α ∆ α ( t ) K NTKµα ( t, t ) ; (cid:96) = 1 ; while (cid:96) <
L + 1 do
Draw S samples { u (cid:96)µ,n ( t ) } S n =1 ∼ GP (0 , Φ (cid:96) − 1 ) , { r (cid:96)µ,n ( t ) } S n =1 ∼ GP (0 , G (cid:96) +1 ) ;
Solve equation (10) for each sample to get { h (cid:96)µ,n ( t ) , z (cid:96)µ,n ( t ) } S n =1 ;
Compute new Φ (cid:96) , G (cid:96) estimates: ˜Φ (cid:96)µα ( t, s ) = 1 S (cid:80) n ∈
[ S ] φ ( h (cid:96)µ,n ( t )) φ ( h (cid:96)α,n ( s )) , ˜ G (cid:96)µα ( t, s ) = 1 S (cid:80) n ∈
[ S ] g (cid:96)µ,n ( t ) g (cid:96)α,n ( s ) ;
Solve for Jacobians on each sample ∂φ ( h (cid:96)n )
∂ r (cid:96) (cid:62) n , ∂ g (cid:96)n ∂ u (cid:96) (cid:62) n ;
Compute new A (cid:96) , B (cid:96) − 1 estimates:
˜ A (cid:96) = 1 S (cid:80) n ∈
[ S ] ∂φ ( h (cid:96)n )
∂ r (cid:96) (cid:62) n , ˜ B (cid:96) − 1 = 1 S (cid:80) n ∈
[ S ] ∂ g (cid:96)n ∂ u (cid:96) (cid:62) n ; (cid:96) ← (cid:96)
; end (cid:96)
; while
<
1 do
Update feature kernels:
(cid:96) + β
Φ (cid:96) , G (cid:96)
(1 −
) G (cid:96) + β ˜ G
; if then
Update A (cid:96) ←
− β ) A (cid:96) β
˜ A (cid:96) , B (cid:96) ← (1 − β ) B (cid:96) + β ˜ B (cid:96) end (cid:96) ← (cid:96) + end 23 end 24 return { Φ (cid:96) , G (cid:96) } L(cid:96)
=1 , { A (cid:96) , B (cid:96) } L − 1 (cid:96) =1 , { f µ ( t ) } Pµ =
The parameter β controls recency weighting of the samples obtained at each iteration.
If β = 1 , then the rank of the kernel estimates is limited to the number of samples S used in a single iteration, but with β < 1 smaller sample sizes S can be used to still obtain accurate results.
We used β = 0 .
6 in our deep network experiments.
Convergence is usually achieved in around ∼ 15 steps for a depth( L = 3 hidden layer) network such as the one in Figure 1 and 7.
C Experimental Details
All NN training was performed with Jax gradient descent optimizer [83] with ﬁxed learning rate.
C.1 MLP Experiments
For the MLP experiments, we performed full batch gradient descent.
Networks were initialized with
Gaussian weights with unit standard deviation W (cid:96)ij ∼ N (0 , 1) .
The learning rate was chosen as η 0 γ 2 =
η 0 γ 20 N for a network of width N .
The hidden features h (cid:96)µ ( t ) ∈
R N were stored throughout training and used to compute the kernels Φ (cid:96)µα ( t, s )
=
1 N φ ( h (cid:96)µ ( t )) · φ ( h (cid:96)α ( s )) .
These experiments can be reproduced with provided jupyter notebooks.
C.2 CNN Experiments on CIFAR-
We deﬁne a depth L CNN model with ReLU activations and stride 1 , which is implemented as a pytree of parameters in JAX [83].
We apply global average pooling in the ﬁnal layer before a dense readout layer.
The code to initialize and evaluate the model is provided below.
w = params[-1] f = 1/N * phi @ w # Mean -field parameterization return f
After constructing a CNN model, we train using MSE loss with base learning rate η 0 = 2 .
× 10 − 4 , batch size 250 .
The learning rate passed to the optimizer is thus η = η 0 γ 2 =
η 0 γ 20 N .
We optimize the loss function which is scaled appropriately as (cid:96) ( γ − 1 0 f, y ) .
Throughout training, we compute the last layer’s embedding φ ( h L ) on the test set to calculate the alignment A ( Φ L , yy (cid:62) ) .
Training was performed on 4 NVIDIA GPUs.
Training a L = 3 network of width 500 takes roughly 1 hour.
D Derivation of Self-Consistent Dynamical Field Theory
In this section, we introduce the dynamical ﬁeld theory setup and saddle point equations.
The path integral theory we develop is based on the Martin-Siggia-Rose-De Dominicis-Janssen (MSRDJ) framework [47], of which a useful review for random recurent networks can be found here [54].
Similar computations can be found in recent works which consider typical behavior in high dimensional classiﬁcation on random data [63, 64].
D.1 Deep Network Field Deﬁnitions and Scaling
As discussed in the main text, we consider the following wide network architecture parameterzied by trainable weights θ =
Vec { W 0 , W 1 , ... w L } , giving network output f µ deﬁned as
[Equation]
Using gradient ﬂow with learning rate η on cost L = (cid:80) µ (cid:96) ( f µ , y µ ) for loss function, we introduce functions ∆ µ = − ∂
L ∂f µ and η for learning rate, gradient ﬂow induces the following dynamics
[Equation]
Since K NTK is O γ (1) at initialization, it is clear that to have O γ (1) evolution of the network output at initialization we need η = γ 2 .
With this scaling, we have the following
[Equation]
Now, to build a valid ﬁeld theory, we want to express everything in terms of features h (cid:96)µ rather than parameters θ
and we will deﬁne the following gradient features g (cid:96)µ = √ N ∂h L +1 µ ∂ h (cid:96)µ which admit the recursion and base case
[Equation]
We deﬁne the pre-gradient ﬁeld z (cid:96)µ =
[Equation]
so that g (cid:96)µ = ˙ φ ( h (cid:96)µ ) (cid:12) z (cid:96)µ ( t ) .
From these quantities, we can derive the gradients with respect to parameters
[Equation] [Equation]
which allows us to compute the NTK in terms of these features
[Equation]
where K xµα = x µ · x α D is the input Grammian.
We see that the NTK can be built out of the following primitive kernels
[Equation]
We utilize the parameter space dynamics to express W (cid:96) in terms of the { g , h } ﬁelds
[Equation]
Using the ﬁeld recurrences h (cid:96) +1 µ ( t ) = 1 √ N W (cid:96) ( t ) φ ( h (cid:96)µ ( t ))
we can derive the following recursive dynamics for the features
[Equation]
where we introduced the following random ﬁelds χ (cid:96)µ ( t ) , ξ (cid:96)µ ( t ) which involve the random initial conditions
[Equation]
We observe that the dynamics of the hidden features is controlled by the factor γ √ N .
If γ = O N (1) then we recover static NTK in the limit as N → ∞ .
However, if γ = O N ( √ N ) then we obtain
O N (1) evolution of our features and we reach a new rich regime.
We choose the scaling γ = γ 0 √ N for our ﬁeld theory so that γ 0 > 0 will give a feature learning network.
D.2 Warmup: DMFT for One Hidden Layer NN
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 ﬁelds of interest are χ µ = 1 √ D W 0 (0) x µ and ξ = w 1 (0) .
Unlike the deeper L ≥ 2 case, both of these ﬁelds are time invariant since x µ does not vary in time.
These random ﬁelds provide initial conditions for the preactivation and pre-gradient ﬁelds h µ ( t ) , z ( t )
∈
R N , which evolve according to
[Equation]
23) where the network predictions evolve as ∂∂t f µ ( t )
=
(cid:80) α
[Φ µα ( t, t )
+ G µα ( t, t ) K xµα ]∆ α ( t ) for kernels
Φ µα ( t, t ) =
1 N φ ( h µ ( t )) · φ ( h α ( t )) and G µα ( t, t ) =
1 N g µ ( t ) · g α ( t ) .
At ﬁnite N , the kernels Φ , G will depend on the random initial conditions χ , ξ , leading to a predictor f µ which varies over initializations.
If we can establish that the kernels Φ , G concentrate at inﬁnite-width N → ∞ , then ∆ µ are deterministic.
We now study the moment generating function for the ﬁelds
[Equation]
To perform the average over θ 0 = { W 0 (0) , w 1 (0) }
[Equation]
we enforce the deﬁnition of χ µ , ξ with delta functions
[Equation]
Though this step may seem redundant in this example
[Equation]
it will be very helpful in the deep network case
[Equation]
so we pursue it for illustration.
After mulitplying by these factors of unity and performing the
Gaussian integrals
[Equation]
we obtain
[Equation]
We now aim enforce the deﬁnitions of the kernel order parameters with delta functions
[Equation]
where the ﬁelds h µ ( t ) , g µ ( t ) are regarded as functions of { χ µ } µ , ξ (see Equation (23)) and the ˆΦ
[Equation]
ˆ G integrals run over the imaginary axis ( − i ∞ , i ∞ ) .
After this step
[Equation]
we can write
[Equation]
where the DMFT action S [Φ , ˆΦ , G, ˆ G ] is O N (1) and has the form
[Equation]
The single site moment generating function Z [ j, v ] arises from the factorization of the integrals over
N different ﬁelds in the hidden layer and takes the form
[Equation]
where, again we must regard h µ ( t ) , g µ ( t ) as functions of χ, ξ .
The variables in the above are no longer vectors in R N but rather are scalars.
We can write Z [ j, v ] = (cid:82) (cid:81) µ dχ
[Equation]
ˆ
[Equation]
exp (cid:16) −H [ { χ µ , ˆ χ µ } , ξ, ˆ ξ, j, v ] (cid:17) where H is the logarithm of the integrand above.
Since the full MGF takes the form Z ∝ (cid:82) d Φ d ˆΦ dGd ˆ G exp (cid:16) NS [Φ , ˆΦ , G, ˆ G ] (cid:17) , characterization of the N → ∞ limit requires one to identify the saddle point of S , where δS = 0 for any variation of these 4 order parameters.
[Equation]
where the i -th single site average (cid:104)(cid:105) i of an observable O ( χ, ˆ χ, ξ, ˆ ξ ) is deﬁned as
[Equation]
Since ˆΦ =
ˆ G =
the single site MGF reveals that the initial ﬁelds are independent Gaussians { χ µ } ∼ N (0 , K x ) and ξ ∼ N (0 , 1) .
At zero source j , v → 0 , all single site averages (cid:104)(cid:105) i are equivalent and we may merely write Φ µα ( t, s )
= (cid:104) φ ( h µ ( t ))
φ ( h α ( s ))
(cid:105) , G µα ( t, s ) = (cid:104) g µ ( t ) g
α
( s ) (cid:105) , where (cid:104)(cid:105) is the average over the single site distributions for j , v → 0 .
D.2.1 Final L = 1 DMFT equations
Putting all of the saddle point equations together, we arrive at the following DMFT
[Equation]
We see that for L = 1 networks, it sufﬁces to solve for the kernels on the time-time diagonal.
Further in this two layer case χ, ξ are independent and do not vary in time.
These facts will not hold in general for L ≥ 2 networks, which requires a more intricate analysis as we show in the next section.
D.3 Path Integral Formulation for Deep Networks
As discussed in the main text
[Equation]
we study the distribution over ﬁelds by computing the moment generating functional for the stochastic processes { χ (cid:96) , ξ
[Equation]
} L(cid:96)
=
Z
[Equation]
Moments of these stochastic ﬁelds can be computed through differentiation of Z near zero-source
[Equation]
To perform the average over the initial parameters
[Equation]
we enforce the deﬁnition of the ﬁelds χ (cid:96) +1 ( t ) =√ N
[Equation]
[Equation] [Equation]
=
[Equation]
t ) , by inserting the following terms in the definition of Z [ { j , v } ] so we may more easily perform the average over weights θ 0 .
We enforce these deﬁnitions with an integral representation of the Dirac-Delta function 1 = (cid:82) R dx δ ( x ) = 12 π (cid:82) R dx (cid:82)
R d ˆ x exp ( ix ˆ x ) .
We note that we are implicitly working in the Ito scheme, where factors of Jacobian determinants are equal to one [54, 84, 85] (we note that h (cid:96)µ ( t ) does not causally depend on χ (cid:96) +1 µ ( t ) and g (cid:96)µ ( t ) does not causally depend on ξ (cid:96) ( t ) ).
Applying this to ﬁelds χ , ξ , we have
[Equation]
36) where { h (cid:96) , g (cid:96) } are understood to be stochastic processes which are causally determined by the { χ (cid:96) , ξ (cid:96) } ﬁelds, in the sense that h (cid:96) ( t ) only depends on χ (cid:96) ( s ) for s < t .
We thus have an expression of the form
[Equation]
N
[Equation] [Equation]
Since W (cid:96) (0) are all Gaussian random variables, these averages can be performed quite easily yielding
[Table]
[Equation]
× exp
[Equation]
D.4 Order Parameters and Action Deﬁnition
We deﬁne the following order parameters which we will show concentrate in the N → ∞ limit Φ (cid:96)µ,α ( t, s )
=
1 N φ ( h (cid:96)µ ( t )) · φ
[Equation]
( s )) , G (cid:96)µα (
[Equation]
=
[Equation]
) · ˆ ξ (cid:96)α ( s ) .
The NTK only depends on { Φ (cid:96) , G (cid:96) } so from these order parameters, we can compute the function evolution.
The parameter A (cid:96) arises from the coupling of the ﬁelds across a single layer’s initial weight matrix W (cid:96) (0) .
We can again enforce these deﬁnitions with integral representations of the
Dirac-delta function.
For each pair of samples µ, α and each pair of times t, s , we multiply by 1 = (cid:90) (cid:90)
d Φ (cid:96)µα ( t, s ) d ˆΦ (cid:96)µα ( t, s ) 2 πiN −
[Equation]
After introducing these order parameters into the deﬁnition of the partition function
[Equation]
we have a factorization of the integrals over each of the N sites in each hidden layer.
This gives the following partition function
[Equation]
[Equation]
We thus see that the action S consists of inner-products between order parameters { Φ , G, A } and their duals { ˆΦ , ˆ G, B } as well as a single site MGF Z [ { Φ , ˆΦ , G, ˆ G, A, B, j, v } ] , which is deﬁned as
[Table]
s
[Equation]
[Table]
[Equation]
s
[Equation]
[Table]
× exp (cid:32) −
L (cid:88) (cid:96) =
[Table]
(cid:88)
µα
[Equation]
dt
[Equation]
ds
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
× exp (cid:32)
[Equation]
i
L
[Table]
µα
[Table]
[Equation]
[Table]
[Equation] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
D.5 Saddle Point Equations
Since the integrand in the moment generating function Z takes the form e NS [ { Φ , ˆΦ ,G, ˆ G,A,B } ] , the
N → ∞ limit can be obtained from saddle point integration, also known as the method of steepest descent [86].
This consists in ﬁnding order parameters { Φ , ˆΦ , G, ˆ G, A, B } which render the action S locally stationary.
Concretely, this leads to the following saddle point equations.
[Equation]
[Table]
[Equation]
We use the notation (cid:104)(cid:105) to denote an average over the self-consistent distribution on ﬁelds induced by the single-site moment generating function Z at the saddle point.
Concretely if
Z = (cid:82) dχdξd ˆ χd ˆ ξ exp (cid:16) −H [ χ, ξ, ˆ χ, ˆ ξ ] (cid:17) then the single-site self-consistent average of observable
O ([ χ, ξ, ˆ χ, ˆ ξ ]) is deﬁned as
[Equation]
To calculate the averages of the dual variables such as (cid:10) ˆ χ (cid:96) +1 ˆ χ (cid:96) +1 (cid:11) , it will be convenient to work with vector and matrix notation.
We let χ (cid:96) =
Vec { χ (cid:96)µ ( t ) } µ ∈ [ P ] ,t ∈ R + represent the vectorization of the stochastic process over different samples and times and deﬁne the dot product between two of these vectors as a · b = (cid:80) Pµ =1 (cid:82) ∞
dt a µ ( t ) b µ ( t ) .
We also apply this procedure on the kernels so that Φ =
Mat { Φ µα ( t, s ) } µα ∈
[ P ] ,t,s ∈ R + .
Matrix vector products take the form [ Ab ] µ,t = (cid:82) ∞ 0 ds (cid:80)
α A µα ( t, s ) b α ( s ) .
We can obtain the behavior of (cid:10) ˆ χ (cid:96) +1 µ ˆ χ (cid:96) +1 (cid:62) µ (cid:11) in terms of primal ﬁelds { χ, ξ, h, z } by insertion of a dummy source u into the effective partition function.
[Equation]
Similarly, we can obtain the equation for (cid:68) ˆ ξ
[Equation]
ˆ ξ
[Equation]
(cid:62) (cid:69) by inserting a dummy source r and differentiating near zero source
[Equation]
As we will demonstrate in the next subsection
[Equation]
these correlators must vanish.
Lastly
[Equation]
we can calculate the remaining correlators in terms of primal variables
[Equation]
D.6 Single Site Stochastic Process: Hubbard Trick
To get a better sense of this distribution
[Equation]
we can now simplify the quadratic forms appearing in Z using the Hubbard trick [87]
[Equation]
which merely relates a Gaussian function to its Fourier transform.
[Equation] [Equation]
Applying this to the quadratic forms in the single-site MGF Z
[Equation]
we get
[Equation]
Next
[Equation]
we integrate over all ˆ χ (cid:96) , ˆ ξ (cid:96) variables which yield Dirac-delta functions
[Equation]
[Equation]
To remedy the notational asymmetry, we redeﬁne B (cid:96) as its transpose B (cid:96) → B (cid:96) (cid:62) .
The presence of these delta-functions in the MGF Z indicate the constraints u (cid:96) =
χ (cid:96) − A (cid:96) − 1 g (cid:96) and r (cid:96) =
ξ (cid:96) − B
[Equation]
φ
[Equation]
h
[Equation]
We can thus return to the ˆΦ and ˆ G saddle point equations and verify that these order parameters vanish
[Equation]
(51) since (cid:10) u (cid:96) +1 u
(cid:96) +1 (cid:62) (cid:11) =
Φ (cid:96) .
Following an identical argument, ˆ G (cid:96) = 0 .
After this simpliﬁcation, the single site MGF takes the form
[Equation] [Equation]
The interpretation is thus that u (cid:96) , r (cid:96) are sampled independently from their respective Gaussian processes and the ﬁelds χ (cid:96) and ξ (cid:96) are determined in terms of u (cid:96) , r (cid:96) , h (cid:96) , g (cid:96) .
This means that we can apply Stein’s Lemma (integration by parts) [88] to simplify the last two saddle point equations
[Equation]
D.7 Final DMFT Equations
We can now close this stochastic process in terms of preactivations h (cid:96) and pre-gradients z (cid:96) .
To match the formulas provided in the main text, we rescale A (cid:96) →
A (cid:96) /γ
= O γ 0 (1) and B (cid:96) → B (cid:96) /γ
=
O γ 0 (1) , which makes it clear that the non-Gaussian corrections to the h (cid:96)µ ( t ) , z (cid:96)µ ( t ) ﬁelds are O ( γ 0 ) .
After this rescaling, we have the following complete DMFT equations.
[Equation]
[Table]
[Equation]
The base cases in the above equations are that A 0 = B L = 0 and Φ 0 µα ( t, s ) =
K xµα and G L +1 µα ( t, s )
= 1 .
From the above self-consistent equations, one obtains the NTK dynamics and consequently the output predictions of the network with ∂f µ ∂t = (cid:80) α ∆ α ( t ) (cid:2)(cid:80) (cid:96) G (cid:96) +1 µα ( t, t )Φ (cid:96)µα ( t, t ) (cid:3) .
D.8 Varying Network Widths and Initialization Scales
In this section, we relax the assumption of network widths being equal while taking all widths to inﬁnity at a ﬁxed ratio.
This will allow us to analyze the inﬂuence of bottlenecks on the dynamics.
We let N (cid:96) =
a (cid:96) N represent the width of layer (cid:96) .
Without loss of generality, we can choose that
N L = N and proceed by deﬁning order parameters in the usual way
[Equation]
[Equation]
Since N L = N , the variable g L = √ N L ∂h
[Equation]
+1 ∂ h L = w L (cid:12) ˙
φ ( h L ) =
O N,γ (1) as desired.
We extend this deﬁnition to each layer as before g (cid:96) =
√ N (cid:96) ∂h L +1 ∂ h (cid:96) which again satisﬁes the recursion
[Equation]
Now, we need to calculate the dynamics on weights W
[Equation]
Using our deﬁnition of the kernels and the h , z ﬁelds
[Equation]
We also ﬁnd the usual formula for the NTK
[Equation]
Now, as before
[Equation]
we need to consider the distribution of χ , ξ ﬁelds.
We assume W (cid:96)ij (0) ∼ N (0 , σ 2 (cid:96) ) .
This requires computing integrals like (cid:42) exp
[Equation]
× exp
[Equation]
60) where A (cid:96)µα ( t, s ) = − iN
[Equation]
φ ( h (cid:96)µ ( t )) · ˆ ξ (cid:96)α ( s ) .
The action thus takes the form
[Equation]
(61) where the zero-source MGF for layer (cid:96) has the form
Z
[Equation]
= (cid:90) (cid:89) µt
[Equation]
The saddle point equations give
[Equation]
where u (cid:96) ∼ GP (0 , σ 2 (cid:96) − 1 Φ (cid:96) − 1 ) , r (cid:96) ∼ GP (0 , σ 2 (cid:96) G (cid:96) +1 )
We redeﬁne B (cid:96) → 1 σ 2 (cid:96) (cid:113) a (cid:96) a (cid:96) +1 B (cid:96) .
To take the N → ∞ limit of the ﬁeld dynamics, again use γ 0 = γ/ √ N = O N (1) .
The ﬁeld equations take the form
[Equation]
We thus ﬁnd that the evolution of the scalar ﬁelds in a given layer is set by the parameter γ 0 / √ a (cid:96) , indicating that relatively wider layers evolve less and contribute less of a change to the overall
NTK.
This deﬁnition for A (cid:96) , B (cid:96) is non-ideal to extract intuition about bottlenecks since A (cid:96) − 1 ∼
O (cid:16) γ 0 √ a (cid:96) − 1 (cid:17) and B (cid:96) ∼ O (cid:16) γ 0 √ a (cid:96) +1 (cid:17) .
To remedy this, we redeﬁne ˜ A (cid:96) =
√ a (cid:96) γ
A (cid:96) , ˜ B (cid:96) =
√ a (cid:96) +1 γ 0 B (cid:96) .
With this choice, we have
[Equation]
(65) where ˜ A (cid:96) − 1 , ˜ B (cid:96) do not have a leading order scaling with a (cid:96) − 1 or a (cid:96) +1 respectively.
Under this change of variables, it is now apparent that a very wide layer (cid:96) , where γ 0 √ a
[Equation]
(cid:28) 1 is small, the ﬁelds h (cid:96) , z (cid:96) become well approximated by the Gaussian processes u (cid:96) , r (cid:96) , albeit with evolving covariances Φ (cid:96) − 1 , G (cid:96) +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 ﬁelds u (cid:96) , r (cid:96) with temporally evolving covariances for (cid:96) ∼ L .
We leave evaluation of this prediction to future work.
E Two Layer Networks
In a two layer network, there are no A or B order parameters, so the ﬁelds χ 1 and ξ 1 are always independent.
Further, χ 1 and ξ 1 are both constant throughout training dynamics.
Thus we can obtain differential rather than integral equations for the stochastic ﬁelds h 1 , z 1 which are
[Equation]
(66) where the average is taken over the random initial conditions h 1 (0) ∼ N (0 , K x ) and z 1 (0) ∼
N (0 , 11 (cid:62) ) .
An example of the two layer theory for a ReLU network can be found in Appendix and feedback ﬁelds
[Equation]
which is a zero-diffusion feature space version of the PDE derived in the original two layer mean ﬁeld limit of neural networks [22, 42, 43].
F Deep Linear Networks
In the deep linear case
[Equation]
the g (cid:96) µ ( t ) ﬁelds are independent of sample index µ .
We introduce the kernel
H (cid:96)µα ( t, s ) =
[Equation]
h
[Equation]
t ) h (cid:96)α ( s ) (cid:11) .
The ﬁeld equations are
[Equation]
Or in vector notation h (cid:96) =
u
[Equation]
+ γ 0 C
[Equation]
g
[Equation]
and g
[Equation]
= r
[Equation]
+ γ 0 D
[Equation]
h (cid:96) where
[Equation]
Using the formulas which deﬁne the ﬁelds
[Equation]
we have
[Equation] [Equation]
The saddle point equations can thus be written as
[Equation]
[Equation]
We solve these equations by repeatedly updating H (cid:96) , G (cid:96) , using Equation (71) and the current estimate of C (cid:96) , D (cid:96) .
We then use the new H (cid:96) , G (cid:96) to recompute K NTK and ∆ ( t ) , calculating C (cid:96) , D (cid:96) and then recomputing H (cid:96) , G (cid:96) .
This procedure usually converges in ∼ 5 − 10 steps
[Equation]
F.1 Two Layer Linear Network
As we saw in Appendix E, the ﬁeld dynamics simplify considerably in the two layer case, allowing description of all ﬁelds in terms of differential equations.
In a two layer linear network, we let h ( t ) ∈
R P represent the hidden activation ﬁeld and g ( t ) ∈
R represent the gradient
[Equation]
The kernels H ( t ) =
(cid:10) h ( t ) h ( t ) (cid:62) (cid:11) and G ( t ) =
(cid:10) g ( t ) 2 (cid:11) thus evolve as
[Equation]
It is easy to verify that the network predictions on the P training points are f ( t ) =
y − ∆ ( t ) =γ 0 (cid:104) g ( t ) h ( t ) (cid:105) ∈ R P .
Thus the dynamics of H ( t ) , G ( t ) and ∆ ( t ) close
[Equation]
74) where the initial conditions are H (0)
=
I , G (0) = 1 and ∆ (0) =
y .
These equations hold for any choice of data K x , y .
F.1.1 Whitened Data in Two Layer Linear
For input data which is whitened where K x = I , then the dynamics can be simpliﬁed even further, recovering the sigmoidal curves very similar to those obtained under a special initialization [68, 69, 71, 73].
In this case we note that the error signal always evolves in the y direction, ∆ ( t ) =
∆( t ) y | y | , and that H only evolves in a rank one direction yy (cid:62) direction as well.
Let 1 | y | 2 y (cid:62) H ( t ) y
= H y ( t ) .
Let y =
| y | represent the norm of the target vector, then the relevant scalar dynamics are
[Equation]
Now note that, at initialization H y (0) =
G (0)
= 1 and that ∂∂t H y ( t ) =
∂∂t G ( t ) .
Thus, we have an automatic balancing condition H y ( t ) =
G ( t ) for all t ∈ R + and the dynamics reduce to two variables
[Equation]
We note that this system obeys a conservation law which constrains ( H y , y − ∆) to a hyperbola
[Equation]
This conservation law implies that H y (0)
= 1 = lim t →∞ H y ( t ) 2 − γ 20 y 2 or that the ﬁnal kernel has the form lim t →∞ H ( t )
= 1 y 2 [ (cid:112) 1 + γ 2
y 2 − 1]
yy (cid:62) + I .
The result that the ﬁnal kernel becomes a rank one spike in the direction of the target function was also obtained in ﬁnite width networks in the limit of small initialization [73] and also from a normative toy model of feature learning [81].
We can use the conservation law above 1 = H y ( t ) 2 − γ 20 (∆( t ) − y ) 2 to simplify the dynamics to a one dimensional system
[Equation]
where f = y − ∆
We see that increasing γ 0 provides strict acceleration in the learning dynamics, illustrating the training beneﬁts of feature evolution.
Since this system is separable
[Equation]
we can solve for the time it takes for the network output norm to reach output level f
[Equation]
The NTK limit can be obtained by taking γ 0 → 0 which gives
[Equation]
which recovers the usual convergence rate of a linear model.
The right hand side of Equation (79) has a perturbation series in γ 20 which converges in the disk γ 0 < 1 y .
The other limit of interest is the γ 0 → ∞ limit where
[Equation]
which recovers the logistic growth observed in the initialization scheme of prior works [68, 69]
The timescale τ required to learn is only τ ∼ 1 γ 0 (cid:28) 1 , which is much smaller than the O γ 0 (1) time to learn predicted from the small γ 0 expansion.
We note that the above leading order asymptotic behavior at large γ 0 considers the DMFT initial condition ∆(0) =
y as an unstable ﬁxed point.
For realistic learning curves, one would need to stipulate some alternative initial condition such as ∆ =
y − (cid:15) for some small (cid:15) > 0 in order to have nontrivial leading order dynamics.
F.2 Deep Linear Whitened Data
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 (cid:96) ( t, s ) need only be tracked in the one dimensional task relevant subspace along the vector y .
We let ∆( t ) = 1 y y · ∆ ( t ) and let h y ( t ) = 1 y h (cid:96) ( t ) · y .
We have
[Equation]
g
[Equation]
Lastly we have the simple evolution equation for the scalar error ∆( t )
[Equation]
Vectorizing we ﬁnd the following equations for the time × time matrix order parameters h (cid:96) =
u (cid:96) + γ 0 C (cid:96) g (cid:96) , g (cid:96) =
r (cid:96) + γ 0 D (cid:96) h (cid:96) , we can solve for the response functions
A (cid:96) = (cid:0) I − γ 20 C (cid:96) D (cid:96) (cid:1) − 1 C (cid:96) and B (cid:96) =
(cid:0) I − γ 20 D (cid:96) C (cid:96) (cid:1) − 1 D (cid:96) .
This formulation has the advantage that it no longer has any sample-size dependence: arbitrary sample sizes can be considered with no computational cost.
G Convolutional Networks with Inﬁnite Channels
The DMFT described in this work can be extended to CNNs with inﬁnitely many channels, much in the same way that inﬁnite CNNs have a well deﬁned kernel limit [89, 90].
We let W (cid:96)ij, a represent the value of the ﬁlter at spatial displacement a from the center of the ﬁlter, which maps relates activity at channel j of layer (cid:96) to channel i of layer (cid:96) + 1 .
The ﬁelds h (cid:96)µ,i, a are deﬁned recursively as
[Equation]
where S (cid:96) is the spatial receptive ﬁeld at layer (cid:96) .
For example, a (2 k + 1) × (2 k + 1) convolution will have S (cid:96) =
{ ( i, j ) ∈
Z 2 : − k ≤ i ≤ k, − k ≤ j ≤ k } .
The output function is obtained from the last layer is deﬁned as f µ = 1 γ 0 N (cid:80) Ni
=1 w Li, a φ ( h Lµ,i, a ) .
The gradient ﬁelds have the same deﬁnition as before g (cid:96) µ, a = γ
N ∂f µ ∂ h (cid:96)µ, a , which as before enjoy the following recursion from the chain rule
[Equation]
The dynamics of each set of ﬁlters { W (cid:96) b } can therefore be written in terms of the features h (cid:96) a , g
[Equation]
a
[Equation]
[Equation]
The feature space description of the forward and backward pass relations is
[Equation]
[Equation]
where χ (cid:96) +1 µ, a ( t )
= 1 √ N W (cid:96) (0) φ ( h (cid:96)µ a ( t )) .
The order parameters for this network architecture are
[Equation]
These two order parameters per layer collectively deﬁne the neural tangent kernel.
Following the computation in D, we obtain the following ﬁeld theory in the N → ∞ limit:
[Equation]
[Table]
[Equation]
We see that this ﬁeld theory essentially multiples the number of sample indices by the number of spatial indices P
→ 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.
H Trainable Bias Parameter
If we include a bias b (cid:96) ( t ) ∈ R N in our trainable model
[Equation]
so that
[Equation]
then the dynamics on b (cid:96) ( t ) induced by gradient ﬂow is
[Equation]
Assuming that b (cid:96)i (0) ∼ N (0 , 1)
[Equation]
the dynamics of the DMFT becomes
[Equation]
I Multiple Output Channels
We now consider network outputs on C
=
O N (1) classes.
The prediction for a data point µ ∈ [ P ] at time t ∈ R + is f µ ( t ) ∈ R C .
As before, we deﬁne the error signal as ∆ µ = − ∂∂ f µ (cid:96) ( f µ , y µ ) ∈
R C .
For any pair of data points µ, α the NTK is a C × C matrix K NTKµα ∈ R C × C with entries K NTKµα,cc (cid:48) = ∂f c ( x µ ) ∂ θ · ∂f c (cid:48) ( x α ) ∂ θ .
From these matrices, we can compute the evolution of the predictions in the network.
[Equation]
In this case, we have matrices for the backprop features g (cid:96) =
[Equation]
∂ h
[Equation]
∈ R N × C .
These satisfy the usual recursion
[Equation]
We can now compute the NTK for samples µ, α
[Equation]
where G (cid:96)µα = 1 N g (cid:96) (cid:62) µ g (cid:96)α ∈ R C × C and Φ (cid:96)µα = 1 N φ ( h (cid:96)µ ) · φ ( h (cid:96)α ) ∈ R .
Next we introduce kernels
A [Equation] ( t, s ) ∈ R C and B (cid:96)µα ( t, s ) ∈ R C which are deﬁned in the usual way.
The corresponding ﬁeld theory has the form
[Equation]
z
[Equation]
From these ﬁelds
[Equation]
the saddle point equations deﬁne the kernels as
[Equation]
This allows studying the multi-class structure of learned representations.
J Weight Decay in Deep Homogenous Networks
If we train with weight decay, ddt θ = − γ 2 ∇ θ L − λ θ , in a κ -degree homogenous network ( f ( c θ ) =
c κ f ( θ ) ), then the prediction dynamics satisfy
[Equation]
This holds by the following identity ∂∂c f ( c θ ) =
∂∂c c κ f ( θ ) , which when evaluated at c = 1 gives ∂∂ θ f ( θ ) · θ = κf ( θ ) .
This identity was utilized in a prior work which studied L2 regularization in the lazy regime [74].
For a L -hidden layer ReLU network φ ( h ) = max(0 , h ) , the degree is κ =
L + 1 , while rectiﬁed power law nonlinearities φ ( h ) = max(0 , h ) q give degrees κ = q L +1 − 1 q − 1 .
We note that the ﬁxed point of the function dynamics above gives a representer theorem with the ﬁnal NTK
[Equation]
98) where [ k ( x )] µ = lim t →∞ K ( x , x µ , t ) and K µα =
lim t →∞ K ( x µ , x α , t ) .
The prior work of
Lewkowycz et al [74] considered NTK parameterization γ
= 0 .
In this limit, the kernel (and consequently output function) decay to zero at large time, but if γ 0 > 0 , then the network converges to a nontrivial ﬁxed point as t → ∞ .
In the DMFT limit we can determine the ﬁnal kernel by solving the following ﬁeld dynamics
[Equation]
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.
We provide an example of the weight decay DMFT showing its validity in a two layer ReLU network in Figure 3.
K Bayesian/Langevin Trained Mean Field Networks
Rather than studying exact gradient ﬂow, many works have considered Langevin dynamics (gradient ﬂow with white noise process on the weights) of neural network training [25, 32, 91, 30, 31].
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 [4, 5, 91].
The relevant Langevin equation for our mean ﬁeld gradient ﬂow is
[Equation]
[Equation]
where λ is a ridge penalty which controls the scale of parameters, and d (cid:15) ( t ) is a Brownian motion term which has covariance structure (cid:10) d (cid:15) ( t ) d (cid:15) ( t (cid:48) ) (cid:62) (cid:11)
=
δ ( t − t (cid:48) )
I .
The parameter β , known as the inverse temperature controls the scale of the random Gaussian noise injected into this stochastic process.
The dynamical treatment of the β → ∞ limit will coincide with our usual DMFT while the β (cid:28) ∞ 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.
K.1 Dynamical Analysis
In this section we analyze the dynamical mean ﬁeld theory for these Langevin dynamics.
First we note that the effect of regularization can be handled with a simple integrating factor
[Equation]
(101) where d (cid:15) ( t ) ∈ R N × N is the Gaussian noise for layer (cid:96) at time t .
It is straightforward to verify by Ito’s lemma that, under mean ﬁeld parameterization, the ﬂuctuations in f (cid:48) s dynamics due to Brownian motion are ∂f∂ θ · d (cid:15) ( t ) ∼ O ( N − 1 / 2 ) and are thus negligible in the N → ∞ limit.
Thus the evolution of the network function takes the form
[Equation]
We can express both of these parameter contractions in feature space provided we introduce the new features r (cid:96)i,µ ( t )
= ∂g (cid:96)i,µ ∂h (cid:96)i,µ which are necessary to compute Hessian terms like
[Equation]
N
[Equation]
φ ( h [Equation]
= N − 2 r i φ ( h (cid:96) j ) 2 in each layer.
This gives the following evolution ∂f
[Equation]
As before, we compute the next layer ﬁeld h (cid:96) +1 in terms of χ (cid:96) +1 and z (cid:96) in terms of ξ (cid:96)
[Equation]
The dependence on the initial condition through χ , ξ is suppressed at long times due the regularization factor e − λβ t , while the Brownian motion and gradient updates will survive in the t → ∞ limit.
In addition to the usual { χ (cid:96) , ξ (cid:96) } ﬁelds which arise from the initial condition, we see that h (cid:96) ( t ) , z (cid:96) ( t ) also depend on the following ﬁelds which arise from the integrated Brownian motion
[Equation]
Our aim is now to compute the moment generating function for the { χ , ξ , χ (cid:15) , ξ (cid:15) } ﬁelds which causally determine { h , z } .
This MGF has the form
[Equation]
We insert Dirac-delta functions in the usual way to enforce the deﬁnitions of χ , ξ , χ (cid:15) , ξ (cid:15) and then average over θ 0 , (cid:15) ( t ) .
These averages can be performed separately with the θ 0 average giving the identical terms as derived in previous sections.
We focus on the average over Brownian disorder ln
[Equation]
[Table]
[Equation]
105) where we introduced the order parameter iA (cid:15)
[Equation]
(cid:96)µα ( t, t (cid:48) )
=
[Equation]
N φ ( h (cid:96)µ ( t )) · ˆ ξ (cid:15),(cid:96)α ( s ) .
We will use the shorthand for the temporal prefactor in the above C λ,β ( t, t (cid:48) ) =
[Equation]
1 (cid:105) ∼ t,t (cid:48) →∞ 1 λ exp (cid:16) − λβ | t − t (cid:48) | (cid:17) .
We insert a Lagrange multiplier B (cid:15),(cid:96) to enforce the deﬁnition of A (cid:15),(cid:96) .
After
Z
[Equation]
×
[Equation]
The order parameters can be determined by the saddle point equations.
These equations for Φ , ˆΦ , G, ˆ G, A, B are the same as before.
The new equations are
[Equation]
Using the fact that Φ (cid:96) , G (cid:96) concentrate [Equation] we can use the Hubbard trick to linearize the quadratic terms in ˆ χ (cid:15) and ˆ ξ (cid:15) .
[Equation]
Using the vectorization notation
[Equation]
we ﬁnd the interpretation that χ (cid:15),(cid:96) and ξ (cid:15),(cid:96) decouple as
[Equation]
As before
[Equation]
we make the substitutions B
→ γ − 1 0 B[-(cid:62) and A → γ − 1 
-]
[Equation]
and A → γ − 1 0 A and arrive at the ﬁnal DMFT equations
[Equation]
where the kernels are deﬁned in the usual way.
As expected, the contributions from the initial conditions χ (cid:96) , ξ (cid:96) are exponentially suppressed at late time whereas the contributions from the
Brownian disorder χ (cid:15),(cid:96) , ξ (cid:15),(cid:96) persist at late time.
K.2 Weak Feature Learning, Long Time Limit
In the weak feature learning γ
→ 0 and long time t → ∞ limit, the preactivation ﬁelds equilibrate to
Gaussian processes h (cid:96)µ ( t ) ∼ u (cid:15),(cid:96)µ ( t ) , z (cid:96)µ ( t ) ∼ r (cid:15),(cid:96)α ( t ) , which have respective covariances H (cid:96)µα ( t, s ) =
(cid:10) h (cid:96)µ ( t ) h (cid:96)α ( s ) (cid:11) =
C λ,β ( t, s )Φ (cid:96) − 1 µα ( t, s ) , Z (cid:96)µα ( t, s ) =
(cid:10) z (cid:96)µ ( t )
z
(cid:96)α ( s ) (cid:11)
=
C λ,β ( t, s ) G (cid:96) +1 µα ( t, s ) .
In this long time limit, the feature kernels will be time translation invariant eg Φ (cid:96)µα ( t, s ) =
Φ (cid:96)µα ( | t − s | ) .
Letting τ = | t − s | and C λ,β ( τ ) = 1 λ exp (cid:16) − λβ τ (cid:17)
[Equation]
we have the following recurrence for H (cid:96) , Φ (cid:96)
[Equation]
λ,β
[Equation]
[-(cid:105) h,h (cid:48) ∼N (0 , H (cid:96) +1 ) , H (cid:96) +
 = (cid:20) H (cid:96) +1 µµ (0)-]Similarly
[Equation]
we can obtain Z (cid:96) and G (cid:96) in a backward pass recursion [Equation]
[Equation]
On the temporal diagonal τ = 0 , these equations give the usual recursions used to compute the
NNGP kernels at initialization [5], though with initialization variance C λ,β (0) =
λ − 1 , set by the weight decay term in the Langevin dynamics.
This indicates that the long time Langevin dynamics at γ 0 → 0 simply rescales the Gaussian weight variance based on λ .
It would be interesting to explore ﬂuctuation dissipation relationships at ﬁnite γ 0 within this framework which we leave to future work.
K.3 Equilibrium Analysis
The Langevin dynamics at ﬁnite N converges (possibly in a time extensive in N ) to an equilibrium distribution with several interesting properties, as was recently studied by Aitchison et al [91] and implicitly by Seroussi et al [31] in a large sample size limit.
This setting differs from the previous section where ﬁrst N → ∞ limit is taken, followed by a t → ∞ limit in the DMFT.
This, section, on the other hand studies for any N , the t → ∞ limiting equilibrium distribution.
This equilibrated distribution is then analyzed in the N → ∞ limit.
The relationship between these two orders of limits remains an open problem.
The equilibrium distribution over parameters p ( θ |D )
∝ exp (cid:0) − βγ 2 L ( θ ) − λ 2 | θ | 2 (cid:1) can be viewed as a Bayes posterior with log-likelihood − βγ 2 L ( θ ) and a
Gaussian prior with scale λ − 1 / 2 .
In the mean ﬁeld limit with γ = √ Nγ 0 , we can express the density over pre-activations h (cid:96) and the output predictions f .
This gives
[Equation]
|D
[Equation]
∝
[Equation]
+ i (cid:88) µ
[Equation]
µ (cid:33) (115)
We see that p ( f |D ) ∝ (cid:82) d Φ d ˆΦ exp (cid:16) NS [Φ , ˆ Φ] (cid:17) where
[Equation]
Thus the predictions f µ become non-random in this N → ∞ limit and can be determined from the saddle point equations as in [91].
Again, letting ∆ µ = − ∂∂f µ (cid:96) ( f µ , y µ ) , we ﬁnd ∂S
[Equation]
∂S
[Equation]
which implies that f µ at the ﬁxed point satisﬁes the following equations
[Equation]
The last layer’s dual kernel has the form ˆΦ Lµα = − γ
[Equation]
λ ∆ µ ∆ α , which we see vanishes as feature learning strength is taken to zero γ 0 → 0 , while for non-negligible γ 0 , we see that the last layer features are non-Gaussian.
We thus see that the moment generating function for the last layer ﬁeld has the form
[Equation]
In the γ 0 → 0 limit, the non-Gaussian component of this density vanishes.
Now that we have this form, we can compute Φ L conditional on Φ L − 1 .
Next, we calculate ˆΦ L − 1 µα = (cid:68)
ˆ h
Lµ ˆ h Lα (cid:69) , giving
[Equation]
Again, we note that in the γ 0 → 0 limit, since (cid:10) h L h L (cid:11) ∼ λ − 1 Φ L − 1 , so that ˆ Φ L − 1 = 0 , implying that the h L − 1 ﬁelds are also Gaussian in this γ 0 → 0 limit.
For arbitrary γ 0 , this recursive argument can be completed going backwards using
[Equation]
For deep linear networks, the distributions are all Gaussian, allowing one to close algebraically, the saddle point equations for Φ , ˆΦ [91].
L Momentum Dynamics
Standard gradient descent often converges slowly and requires careful tuning of learning rate.
Momentum, in contrast can, be stable under a wider range of learning rates and can beneﬁt from acceleration on certain problems [92–95].
In this section we show that our ﬁeld theory is still valid when training with momentum; simply altering the ﬁeld deﬁnitions appropriately gives the inﬁnite-width feature learning behavior.
Momentum uses a low-pass ﬁltered version of the gradients to update the weights.
A continuous limt of momentum dynamics on the trainable parameters { W (cid:96) } would give the following differential equations.
[Equation]
We write the expression this way so that the small time constant τ → 0 limit corresponds to classic gradient descent.
Integrating out the Q (cid:96) ( t ) variable, this gives the following weight dynamics
[Equation]
which implies the following ﬁeld evolution
[Equation]
We see that in the τ → 0 limit, the t (cid:48)(cid:48) integral is dominated by the contribution at t
[Equation]
∼ t
[Equation]
recovering usual gradient descent dynamics.
For τ (cid:29) 0 , we see that the integral accumulates additional contributions from the past values of ﬁelds and kernels.
M Discrete Time
Our model can also be accommodated in discrete time, though we lose the NTK as a key player in the theory (note that ddt f µ = df µ dθ · dθdt =
(cid:80)
α ∆ α K NTKµα requires a continuous time limit of the gradient descent dynamics).
For a discrete time analysis we let t ∈ N and deﬁne our network function as f
[Equation]
We treat f µ ( t ) as a potentially random variable and insert
[Equation]
Noting that w L (0) is involved in the deﬁnition of both f µ ( t ) and ξ Lµ ( t )
[Equation]
we see that the average over w L (0) now takes the form
[Equation]
We extend our deﬁnition as before iA
Lµα ( t, s ) =
1 Nγ 0 φ ( h Lµ ( t )) · ξ Lα ( s ) .
Proceeding with the calculation as usual
[Equation]
we ﬁnd that
[Equation]
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
[Equation]
We also obtain saddle point equations for the new A L , B L order parameters.
[Equation]
which implies B Lµα ( t, s )
=
and A L = γ − 1 0 (cid:28) φ ( h Lµ ( t ))
∂r Lα ( s ) (cid:29) .
This gives the following DMFT
[Equation]
We leave it to future work to verify that a continuous time limit of the above DMFT recovers function evolution governed by the NTK
[Equation]
N Equivalent Parameterizations
In this section, we show the equivalence of our parameterization scheme with many alternatives including the µP parameterization of Yang [1].
We also compare the derived stochastic processes obtained with DMFT and Tensor Programs in Appendix Section N.6.
Following Yang we use a modiﬁed variant of abc parameterization (we assume one which deﬁnes the features h (cid:96) +
=
N − a (cid:96) W (cid:96) φ ( h (cid:96) ) with W (cid:96)ij ∼ N (0 , N − b (cid:96) ) and η = γ 2 N − c ).
Lastly, we will take γ = γ 0 N d and ﬁnd that only d = 12 will allow feature learning
[Equation]
We will now derive constraints on ( a, b, c, d ) which give desired large width behavior.
We will identify a one-dimensional family of parameterizations which satisfy three desiderata of network training 1.
ﬁnite preactivations, 2.
learning in ﬁnite time, 3.
feature learning.
N.1 Predictions Evolve in O N (1) time
As before we let the NTK be the matrix which deﬁnes network prediction dynamics
∂ t f µ = (cid:80) α K NTKµα ∆ α .
We demand that this matrix be O N (1) so that the network predictions have O N (1) evolution
[Equation]
where we used the usual deﬁnition of the kernels Φ (cid:96) =
1 N φ ( h (cid:96) ) ·
φ ( h (cid:96) ) which are O N (1) provided each neuron’s preactivation h (cid:96)i =
O N (1) .
We see that the choice a (cid:96) =
12 recovers the parameterization discussed in Appendix D. Further to have O N (1) evolution of the output predictions f µ we need
K NTK =
O N (1) .
Now, to enforce the O N (1) evolution of predictions we demand
[Equation]
If, on the other hand, we take D ∼ O N ( N ) , then this simply demands the constraint that c = 2 a (cid:96) −for all (cid:96) ∈ { 0 , ..., L } .
N.2 Fields Are O N (1)
Having ﬁelds which are O N (1) can be ensured at initialization provided that
[Equation] [Equation]
which implies that 2 a (cid:96) + b (cid:96) = 1 .
Again we see that a (cid:96) =
12 , b (cid:96) =
0 works, but this is not the only possible scaling.
Alternatively standard parameterization a (cid:96) = 0 , b (cid:96) = 1 will also preserve the O N (1) scale of the features.
We next need to analyze the scale of the feature gradients ∂h L
+1 ∂ h (cid:96) .
We start with the last layer
[Equation]
Since we already demanded that 2 a L + b L = 1 , this inner product will be O N (1) .
Now we will see whether it remains O N (1) under its recursion
[Equation] [Equation]
Now, letting g (cid:96) =
√ N ∂h L +1 ∂ h (cid:96) and z (cid:96) =
N − a (cid:96) W (cid:96) (0) (cid:62) g (cid:96) +
we have
[Equation] [Equation]
which is indeed O N (1) as desired provided that 2 a + b = 1 .
N.3 O N (1) Feature Evolution
Now, we desire that the ﬁelds h
i , z i all evolve by an O N (1) amount during network training, which is equivalent to stable feature learning.
The update equation for W (cid:96) and h (cid:96) give
[Equation]
where we used γ = γ 0 N d .
This equation implies that d − c − 2 a (cid:96) + 12 = 0 is necessary and sufﬁcient for O N (1) feature evolution.
N.4 Putting Constraints Together
We now let γ = γ 0 N d .
We see that the set of parameterizations which yield O (1) feature evolution are those for which
Features h,
z are O N (1) =
⇒ 2 a (cid:96) + b (cid:96) =2.
Outputs predictions evolve in O N (1) time =
⇒ c
+ 2 a (cid:96) =3.
Features h, z have O N (1) evolution =
⇒ d = c + 2 a (cid:96) − 12 = 12 .
We see that the parameterization discussed in Appendix D satisﬁes these with d = 12 , a (cid:96) =
12 , b (cid:96) =
0 , c = 0 .
The quite general requirement for feature learning that d = 12 indicates that γ = γ 0 √ N for any choice of a (cid:96) , b (cid:96) , c .
The set of parameterizations which meet these three requirements is one dimensional with d = 12 , and
( a (cid:96) , b (cid:96) , c (cid:96) ) ∈ { ( a (cid:96) , 1 − 2 a (cid:96) , 1 − 2 a (cid:96) ) : a (cid:96) ∈ R } .
However, in the next section, we show that if one demands O N (1) learning rate, then the parameterization is unique and is the µP parameterization of Yang and Hu [1].
N.5 O N (1) Learning Rate
We are also interested in a parameterization for which we can have O (1) learning rate which are those for which γ 2 N − c
= O N ( N 2 d − c ) =
O N (1) = ⇒ c
= 2 d = 1 .
Under this constraint, a (cid:96) =
and b (cid:96) = 1 , which corresponds to standard parameterization, modiﬁed by γ = γ 0 √ N in the last layer.
In a computational algorithm, the learning rate would be η = γ 2 N − c = γ 20 .
This is equivalent to the µP parameterization of Yang and Hu [1].
N.6 Equivalence of DMFT at γ 0 = 1 and Tensor Programs derived Stochastic Process
Now that we have established that the parameterization we consider here (modiﬁed NTK parameterization) is equivalent to µP , (modiﬁed 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 Tensor Programs framework of Yang [90, 1].
Using the notation from Appendix H of Yang and Hu [1], they give the following evolution equations for the preactivations in a hidden layer in one pass SGD
[Equation]
where ˆ Z Wx t is mean zero Gaussian variable with covariance E
[ Z x t Z x s ] and ˆ Z W (cid:62) dh t is mean zero Gaussian with covariance E
[ Z dh t Z dh s ] .
We can switch to the notation of this work by making the substitutions Z h t → h ( t ) , ˆ Z Wx t → u ( t ) , χ s → − ∆( s ) , ˙ Z Wx → (cid:80) s ∆( s ) A ( t, s ) and E [ Z x s Z x t ] → Φ( t, s ) , and so on.
A summary of the full set of notational substitutions between this work and TP are summarized in Table 2.
After these substitutions are made, we see that the equations above match the one-pass SGD version
DMFT h ( t ) χ
( t ) g ( t ) ξ ( t ) Φ (cid:96) ( t, s )
G (cid:96) ( t, s )
A (cid:96) ( t, s ) , B (cid:96) ( t, s ) ∆( t )
TP
Z h t
Z Wx t
Z dx t
Z W (cid:62) dh t
E [ Z x t Z x s ]
E [ Z dh t Z dh s ] θ ts − χ t that both Tensor Programs and DMFT, though alternative derivations, give identical descriptions processes by initializations
GD networks.
O Gradient Independence
The gradient independence approximation treats the random initial weight matrix W (cid:96) (0) as a independently sampled Gaussian matrix when used in the backward pass.
We let this second matrix be ˜ W (cid:96) (0) .
As before, we have χ (cid:96) +1 = 1 √ N W (cid:96) (0) φ ( h (cid:96) ) , however we now deﬁne ξ (cid:96) =
[Table]
˜ W (cid:96) (0) (cid:62) g (cid:96) +1 .
Now, when computing the moment generating function Z , the integrals over
W (cid:96) (0) and ˜ W (cid:96) (0) factorize (cid:42) exp (cid:32)
i
[Table]
N
[Equation]
[Table]
[Equation]
We see that in this ﬁeld theory, the ﬁelds χ, ξ are all independent Gaussian processes { χ (cid:96) +1 µ ( t ) } ∼
GP (0 , Φ (cid:96) ) and { ξ (cid:96)µ ( t ) } ∼ GP (0 , G (cid:96) +1 ) .
This corresponds to making the assumption that A (cid:96) =
B (cid:96) =
so that χ = u and ξ = r within the full DMFT.
P Perturbation Theory P.1 Small γ 0 Expansion
In this section we analyze the leading corrections in a small γ 0 expansion of our DMFT theory.
All ﬁelds are expanded in power series in γ 0 .
[Equation]
Our goal is to calculate all corrections to the kernels up to O ( γ 30 ) to show that the leading correction is O ( γ 20 ) and the subleading correction is O ( γ 40 ) .
It will again be convenient to utilize the vector notation deﬁned
in
D.
We note that unlike other works on perturbation theory in wide networks, we do not attempt to characterize ﬂuctuation effects in the kernels due to ﬁnite width, but rather operate in a regime where the kernels are concentrating and their variance is negligible.
For a more thorough discussion of perturbative ﬁeld theory in ﬁnite width networks, see [27, 28, 35].
P.1.1 Linear Network
The kernels in deep linear networks can be expanded in powers of γ 20 giving a leading order correction of size O ( γ 20 ) and can be computed explicitly from the closed saddle point equations.
We use the symmetrizer { X , Y } sym = XY + Y (cid:62) X (cid:62) as shorthand.
The leading order behavior of
[Equation]
is independent of layer index
so we ﬁnd the following leading order corrections
[Equation]
Note that [ C 0 g ] µt = (cid:82)
[Equation]
dt (cid:48) (cid:80)
[Equation]
H
[Equation]
t
[Equation]
t (cid:48)
[Equation]
∆
[Equation]
( t (cid:48)
[Equation]
g ( t (cid:48) ) =
(cid:80)
[Equation]
K xµβ (cid:82) t
[Equation]
dt (cid:48)
∆ β ( t (cid:48)
[Equation]
g ( t (cid:48) ) and note that [ Dh
[Equation]
=
[Equation]
dt
[Equation]
We can simplify the notation by introducing functions v α ( t ) =
(cid:82) t
∆ α ( t (cid:48) ) and v αβ ( t ) = (cid:82) t 0 dt (cid:48)
∆ α ( t (cid:48) )
(cid:82) t (cid:48)
dt (cid:48)(cid:48)
∆ β ( t (cid:48)(cid:48) ) .
[Equation]
Using the fact that
[Equation]
(147) and utilizing the identity (cid:80) L(cid:96)
=
1 (cid:96) =
12 L ( L + 1) , we recover the result provided in the main text.
P.2 Nonlinear Perturbation Theory
We start with the formula which implicitly deﬁnes h , z
[Equation]
We proceed under the assumption of a power series in γ
[Equation]
Expanding both sides of the implicit equation for z (cid:96) we have
[Equation]
Performing a similar exercise for h (cid:96) , we get the following ﬁrst three leading terms for z (cid:96) , h (cid:96) , we ﬁnd
[Equation]
As will become apparent soon, it is crucially important to identify the dependence of each of these terms on r .
We note that z (cid:96), 1 does not depend on r and h (cid:96), 1 is linear in r .
In the next section, we use this fact to show that Φ (cid:96), 1 = 0 and G (cid:96), 1 = 0 .
These conditions imply that C (cid:96), 0 and D (cid:96), 1 = 0 .
As a consequence, z (cid:96), 2 is linear in r and h (cid:96), 2 only contains even powers of r .
Lastly, this implies that z (cid:96),only contains even powers of r and h (cid:96), 3 contains only odd powers of r .
P.2.1 Leading Corrections to Φ 1 Kernel is O ( γ 20 )
We start in the ﬁrst layer where u 1 ∼ GP (0 , K x ⊗ 11 (cid:62) )
(note that this is O γ 0 (1) ) and compute the expansion of Φ 1 in γ
[Equation]
where powers and multiplications of vectors are taken elementwise.
Now, note that, as promised, the terms linear in γ 0 vanish since h 1 , 1 is linear the Gaussian random variable r 1 , which is a mean zero and independent of u 1 so an average like (cid:10) r 1 F ( u 1 ) (cid:11) =
(cid:10) r
[Equation] [Equation]
(cid:10) F ( u 1 ) (cid:11) = 0 must vanish for any function F .
Thus we see that Φ (cid:96) ’s leading correction is O ( γ 20 ) .
We also obtain, by a similar argument, that the cubic O ( γ 30 ) term vanishes.
To see this, note that h 1 , 3 only contains odd powers of r 1 .
Next, h 1 , 1 h 1 , 2 contains only odd powers of r , and ( h 1 , 1 ) 3 is cubic in r .
Since all odd moments of a mean-zero Gaussian vanish, all averages of these terms over r annihilate, causing the γ 30 terms to vanish.
Thus Φ 1 = Φ 1 , 0 + γ 20 Φ 1 , 2 + O ( γ 40 ) .
P.3 Forward Pass Induction for Φ (cid:96)
We now assume the inductive hypothesis that for some (cid:96) ∈ { 1 , ..., L − 1 } that
[Equation]
(153) and we will show that this will imply that the next layer must have a similar expansion Φ (cid:96) +1 =
Φ (cid:96) +1 , 0 + γ 20 Φ (cid:96) +1 , 2 + O ( γ 40 ) .
First, we note that u (cid:96) +1 ∼ GP (0 , Φ (cid:96),
+ γ 20 Φ (cid:96), 2 + ... ) .
As before, we compute the leading terms in the expansion of Φ (cid:96) + Φ
[Equation]
(154) where, as before the γ 0 and γ 30 terms vanish by the fact that odd moments of r (cid:96) +1 vanish.
Now, note that all averages are performed over u (cid:96) +1 ∼ GP (0 , Φ (cid:96),
+ γ 20 Φ (cid:96), 2 + ... ) , which depends on the perturbed kernel of the previous layer.
How can we calculate the contribution of the correction which is due to the previous layer’s kernel movement?
This can be obtained easily from the following identity.
Let F ( u , r ) be an arbitrary observable which depends on Gaussian ﬁelds u and r which have covariances Φ (cid:96),
+ γ 20 Φ (cid:96), 2 + O ( γ 40 ) and G (cid:96)
+
[Equation]
+ γ 20 G (cid:96) +2 , 2 + O ( γ 30 ) (note this only requires that the linear in γ 0 terms of G vanish which is easy to verify).
Then
[Equation]
where u 0 ∼ GP (0 , Φ (cid:96), 0 ) , r 0 ∼ N (0 , G (cid:96) +2 , 0 ) .
Thus, the leading order behavior of Φ (cid:96) +1 can easily be obtained in terms of averages over the original unperturbed covariances
[Equation]
where the trace is taken against the Hessian indices and the indices on Φ (cid:96), 2 .
This gives us the desired result by induction that for all (cid:96) ∈ { 1 , ..., L } , we have Φ (cid:96) =
Φ (cid:96), 0 + γ 20 Φ (cid:96), 2 + O ( γ 40 ) .
We see that Φ (cid:96) accumulates corrections from the previous layers’ corrections through the forward pass recursion.
P.4 Leading Corrections to G L Kernel is O ( γ 20 )
The analogous argument for G L now can be provided.
First note that r L is independent of u L and of γ 0 .
Thus we can ﬁnd that G L has no linear-in- γ 0 term in its expansion since
G
[Equation]
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 .
[Equation]
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 = ˙
φ ( u ) z L, 1 + ¨ φ ( u ) h L, 1 r .
Next, we have
[Equation]
which only depends on odd powers of r .
Lastly, we have g L,
[Equation]
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.5 Backward Pass Recursion for G (cid:96)
We can derive a similar recursion on the backward pass for G (cid:96) ’s leading order corrections.
Using the same idea from the previous section, we ﬁnd the following expressions
[Equation]
u
[Equation]
This time, we see that G (cid:96) accumulates corrections from succeeding layers through the backward pass recursion.
P.6 Form of the Leading Corrections
We can expand the h (cid:96) and z (cid:96) ﬁelds around u (cid:96), 0 , r (cid:96), 0 to ﬁnd the leading order corrections to each feature kernel
[Equation]
The ﬁrst term requires additional expansion to extract the corrections in γ
[Equation]
where we used the fact that C (cid:96), 1 = 0 which follows from the fact that Φ (cid:96) − 1 , 1 = 0 , and ∆ (cid:96), 1 = 0 .
Now, expanding out term by term
[Equation]
=
Φ (cid:96), 0 + γ 20 (cid:68) [ ˙ φ ( u ) (cid:12) ( C (cid:96), 0 g (cid:96), 0 )][ ˙ φ ( u ) (cid:12) ( C (cid:96), 0 g (cid:96), 0 )] (cid:62) (cid:69) + γ 20 (cid:68)(cid:104) ˙
φ ( u ) (cid:12) ( C (cid:96),
[¨ φ ( u ) (cid:12) [ C (cid:96), 0 g (cid:96), 0 ] (cid:12) r ]) (cid:105) φ ( u ) (cid:62) (cid:69) + transpose + γ 20 (cid:68)(cid:104) ˙
φ ( u ) (cid:12) ( C (cid:96), 0 [ ˙ φ ( u ) (cid:12) [ D (cid:96),
φ ( u )]]) (cid:105) φ ( u ) (cid:62) (cid:69) + transpose + γ (cid:68)(cid:104) ¨ φ ( u ) (cid:12) [ C (cid:96), 0 g (cid:96), 0 ] 2 (cid:105) φ ( u ) (cid:62) (cid:69) + transpose + γ2 Tr (cid:34) Φ (cid:96) − 1 , 2 (cid:28) ∂∂ u ∂ u (cid:62) (cid:2) φ ( u ) φ ( u ) (cid:62) (cid:3)(cid:29)
u ∼GP (0 , Φ (cid:96) − 1 , 0 ) (cid:35) + O ( γ 40 ) (163)
We see that the corrections for the Φ (cid:96) kernels accumulate on the forward pass through the ﬁnal term so Φ (cid:96), 2 ∼ O ( (cid:96) ) .
Now we will perform the same analysis for G (cid:96) .
G (cid:96) =
(cid:10)
[Equation]
We see that, through the second term, the G (cid:96) kernels accumulate on the backward pass so that
G (cid:96), 2 ∼ O ( L + 1 − (cid:96) ) .
As before the difﬁcult term is the ﬁrst expression which requires a full expansion of g (cid:96) to second order
[Equation]
From these terms we ﬁnd
[Equation]
Now the correction to the NTK has the form
[Equation]
Since each Φ (cid:96), 2 , G L +1 − (cid:96), 2 ∼ O ( (cid:96) ) , each of the two sums from (cid:96) ∈ { 1 , ..., L − 1 } gives a depth scaling of the form ∼ (cid:80) L − 1 (cid:96)
=1 (cid:96) =
L ( L − 1).
Since the original NTK has scale K NTK, 0 ∼ O ( L ) , the relative change in the kernel is | K 2 | | K 0 |
= O ( γ 20 L ) .
In a ﬁnite width N , network, our deﬁnition γ = γ 0 √ N would indicate that a width N network would have corrections of scale γ 20 L = γ 2 LN in the
NTK regime where γ = O N (1) provided the network is sufﬁciently wide to disregard initialization dependent ﬂuctuations in the kernels.
P.7 Perturbation Theory in Width N (Finite Size Corrections)
Finite size corrections to the DMFT can also be obtained within our ﬁeld theoretic framework.
Let k
= Vec { Φ (cid:96) , ˆ Φ (cid:96) , G (cid:96) , ˆ G (cid:96) , A (cid:96) , B (cid:96) } denote the collection of kernel order parameters of the DMFT.
To simplify the subsequent discussion, we redeﬁne the DMFT action to be its negation S → − S . The DMFT action S [ k ] deﬁnes a Gibbs measure over order parameters k , where observables O ( k ) have averages which can be computed as
[Equation]
The inﬁnite-width DMFT is characterized by the set of saddle point equations which are ∇ k S
[ k ] | k
= k ∗ = 0 .
Let the saddle point be k ∗ .
To identify corrections to the observable average (cid:104) O ( k ) (cid:105) due to ﬁnite size, we now Taylor expand S around k ∗ [Equation]
[Equation]
The linear component vanishes at the saddle point since ∇ k S [ k ] | k
= k ∗ = 0 .
Our observable average is thus [Equation] where we made the change of variables δ = √ N ( k − k ∗ ) . The function U ( δ ) contains all higher order terms (cubic and higher) in the Taylor expansion of NS [ k ] .
Since the leading power in U is cubic in ( k − k ∗ ) = N − 1 / 2 δ , the leading behavior of this remainder is U =
O ( N − 1 / 2 ) so it can be regarded as a perturbation to the Gibbs distribution.
Taylor expanding the exponential exp (cid:0) − 12 δ ∇ 2 S
[ k ∗ ] δ − U ( δ ) (cid:1) = exp (cid:0) −
[Equation]
∇ 2 S [ k ∗ ] δ (cid:1) [1 − U + 12 U 2 + ... ] in both numerator and denominator, we eliminate the presence of the higher order terms in the Gibbs measure.
Lastly, we let (cid:104)·(cid:105) 0 represent an average over the unperturbed Gaussian potential δ ∼ N (0 , [ ∇ 2 S [ k ∗ ]] − 1 ) .
For notational simplicity, we let (cid:15) =
N − 1 / 2 and obtain
[Equation]
where (cid:104)(cid:105) c 0 represents a connected cumulant [96]. The ﬁrst two connected correlations have the form [Equation] If one is interested only in the leading order correction to the observable (cid:104) O ( k ) (cid:105)
[Equation]
this can be obtained with the following correction
[Equation] [Equation] Since U = O ( N − 1 / 2 ) both corrections are of order 1 /N . This analysis shows that the leading order correction of the kernel distributions is O ( N − 1 ) and can be approximated by performing averages over a Gaussian distribution for k determined by the saddle point solution k ∗ and covariance given by 1 N (cid:2) ∇ 2 k S [ k ] | k = k ∗ (cid:3) − 1 .
We derive expressions for the components of this Hessian in P.7.1.
These ﬂuctuations have standard deviation O ( N − 1 / 2 ) .
This technique is a common approach to identifying ﬁnite size effects [56] and was recently employed in Bayesian inference setting for networks in the lazy regime [29].
Before computing the Hessian terms, we can compare ﬁnite size effects under NTK scaling γ =
O N (1) , and the mean ﬁeld scaling γ = O ( √ N ) .
Concretely, we are interested in the feature learning component of the kernel change which is O ( γ 2 N ) .
Let (cid:104) ∆ k (cid:105) represent the change in the kernel through training, which we showed in P.2 is of size O ( γ 20 )
=
O (cid:16) γ 2 N (cid:17) .
We will now deﬁne the signal to noise ratio of feature learning as
[Equation]
For NTK regime, this is vanishing as N → ∞ , while for the DMFT regime, this is goes as O ( √ N ) since kernel evolution is always O (1) but variance is O ( N − 1 ) .
P.7.1 DMFT Action Hessian
We now compute the various blocks of the Hessian of the DMFT action −∇ 2 k S [ k ∗ ] .
The various necessary derivatives are given below.
We will utilize the the factorization of the single site MGF [Table] (cid:96) ln Z (cid:96) to simplify many of the expressions.
Below we provide exhaustive expressions for each of the relevant terms.
These expressions are included for completeness but we did not yet attempt computing all of them as we did the saddle point equations which deﬁne k ∗ .
First, we list the collection of Hessian terms which do not involve A, B below.
[Equation] [Table] [Equation] [Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation] [Table] [Equation] [Table]
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
Now for the terms involving A (cid:96) , B (cid:96) , we ﬁnd the following expressions.
[Equation]
[Table]
From these block matrices which comprise the Hessian
[Table]
we can obtain the ﬁnite width covariance structure in our order parameters k
= Vec { Φ (cid:96) , G (cid:96) , A (cid:96) , B (cid:96) } by computing the inverse
C = (cid:0) −∇ 2 k S [ k ∗ ] (cid:1) − 1 .
In this approximation scheme
[Table]
we have k ∼ N ( k ∗ , 1 N (cid:0) −∇ 2 k S
[ k ∗ ] (cid:1) − 1 ) .
Many questions about this expansion remain including: can it be proven that these O ( N − 1 / 2 ) ﬂuctuations always lead to higher expected test loss?