T HE I NFLUENCE OF L EARNING R ULE ON R EPRESENTATION D YNAMICS IN W IDE N EURAL N ETWORKS
A BSTRACT
It is unclear how changing the learning rule of a deep neural network alters its learning dynamics and representations.
To gain insight into the relationship between learned features, function approximation, and the learning rule, we analyze infinite-width deep networks trained with gradient descent (GD) and biologicallyplausible alternatives including feedback alignment (FA), direct feedback alignment (DFA), and error modulated Hebbian learning (Hebb), as well as gated linear networks (GLN).
We show that, for each of these learning rules, the evolution of the output function at infinite width is governed by a time varying effective neural tangent kernel (eNTK).
In the lazy training limit, this eNTK is static and does not evolve, while in the rich mean-field regime this kernel’s evolution can be determined self-consistently with dynamical mean field theory (DMFT).
This DMFT enables comparisons of the feature and prediction dynamics induced by each of these learning rules.
In the lazy limit, we find that DFA and Hebb can only learn using the last layer features, while full FA can utilize earlier layers with a scale determined by the initial correlation between feedforward and feedback weight matrices.
In the rich regime, DFA and FA utilize a temporally evolving and depthdependent NTK.
Counterintuitively, we find that FA networks trained in the rich regime exhibit more feature learning if initialized with smaller correlation between the forward and backward pass weights.
GLNs admit a very simple formula for their lazy limit kernel and preserve conditional Gaussianity of their preactivations under gating functions.
Error modulated Hebb rules show very small task-relevant alignment of their kernels and perform most task relevant learning in the last layer.
I NTRODUCTION
Deep neural networks have now attained state of the art performance across a variety of domains including computer vision and natural language processing (Goodfellow et al., 2016; LeCun et al., 2015).
Central to the power and transferability of neural networks is their ability to flexibly adapt their layer-wise internal representations to the structure of the data distribution during learning.
In this paper, we explore how the learning rule that is used to train a deep network affects its learning dynamics and representations.
Our primary motivation for studying different rules is that exact gradient descent (GD) training with the back-propagation algorithm is thought to be biologically implausible (Crick, 1989).
While many alternatives to standard GD training were proposed (Whittington & Bogacz, 2019), it is unclear how modifying the learning rule changes the functional inductive bias and the learned representations of the network.
Further, understanding the learned representations could potentially offer more insight into which learning rules account for representational changes observed in the brain (Poort et al., 2015; Kriegeskorte & Wei, 2021; Schumacher et al., 2022).
Our current study is a step towards these directions.
The alternative learning rules we study are error modulated Hebbian learning (Hebb), Feedback alignment (FA) (Lillicrap et al., 2016) and direct feedback alignment (DFA) (Nøkland, 2016).
These rules circumvent one of the biologically implausible features of GD: the weights used in the backward pass computation of error signals must be dynamically identical to the weights used on the forward pass, known as the weight transport problem.
Instead, FA and DFA algorithms compute an approximate backward pass with independent weights that are frozen through training.
Hebb rule only uses a global error signal.
While these learning rules do not perform exact GD, they are still able to evolve their internal representations and eventually fit the training data.
Further, experiments have shown that FA and DFA can scale to certain problems such as view-synthesis, recommendation systems, and small scale image problems (Launay et al., 2020), but they do not perform as well in convolutional architectures with more complex image datasets (Bartunov et al., 2018).
However, significant improvements to FA can be achieved if the feedback-weights have partial correlation with the feedforward weights (Xiao et al., 2018; Moskovitz et al., 2018; Boopathy & Fiete, 2022).
We also study gated linear networks (GLNs), which use frozen gating functions for nonlinearity (Fiat et al., 2019).
Variants of these networks have bio-plausible interpretations in terms of dendritic gates (Sezener et al., 2021).
Fixed gating can mitigate catastrophic forgetting (Veness et al., 2021;
Budden et al., 2020) and enable efficient transfer and multi-task learning Saxe et al. (2022).
Here, we explore how the choice of learning rule modifies the representations, functional biases and dynamics of deep networks at the infinite width limit, which allows a precise analytical description of the network dynamics in terms of a collection of evolving kernels.
At infinite width, the network can operate in the lazy regime, where the feature embeddings at each layer are constant through time, or the rich/feature-learning regime (Chizat et al., 2019; Yang & Hu, 2021; Bordelon & Pehlevan, 2022).
The richness is controlled by a scalar parameter related to the initial scale of the output function.
In summary, our novel contributions are the following:
We identify a class of learning rules for which function evolution is described by a dynamical effective Neural Tangent Kernel (eNTK).
We provide a dynamical mean field theory (DMFT) for these learning rules which can be used to compute this eNTK.
We show both theoretically and empirically that convergence to this DMFT occurs at large width N with error O
( N − 1 / 2 ) .
We characterize precisely the inductive biases of infinite width networks in the lazy limit by computing their eNTKs at initialization.
We generalize FA to allow partial correlation between the feedback weights and initial feedforward weights and show how this alters the eNTK.
We then study the rich regime so that the features are allowed to adapt during training.
In this regime, the eNTK is dynamical and we give a DMFT to compute it.
For deep linear networks, the DMFT equations close algebraically, while for nonlinear networks we provide a numerical procedure to solve them.
We compare the learned features and dynamics among these rules, analyzing the effect of richness, initial feedback correlation, and depth.
We find that rich training enhances gradientpseudogradient alignment for both FA and DFA.
Counterintuitively, smaller initial feedback correlation generates more dramatic feature evolution for FA.
The GLN networks have dynamics comparable to GD, while Hebb networks, as expected, do not exhibit task relevant adaptation of feature kernels, but rather evolve according to the input statistics.
1. R ELATED W ORKS
GLNs were introduced by Fiat et al.
as a simplified model of ReLU networks, allowing the analysis of convergence and generalization in the lazy kernel limit.
Veness et al.
(2021) provided a simplified and biologically-plausible learning rule for deep GLNs which was extended by Budden et al.
and provided an interpretation in terms of dendritic gating Sezener et al.
These works demonstrated benefits to continual learning due to the fixed gating.
Saxe et al.
(2022) derived exact dynamical equations for a GLN with gates operating at each node and each edge of the network graph.
Krishnamurthy et al.
(2022) provided a theory of gating in recurrent networks.
Lillicrap et al.
(2016) showed that, in a two layer linear network the forward weights will evolve to align to the frozen feedback weights under the FA dynamics, allowing convergence of the network to a loss minimizer.
This result was extended to deep networks by Frenkel et al.
(2019), who also introduced a variant of FA where only the direction of the target is used.
Refinetti et al.
(2021) studied DFA in a two-layer student-teacher online learning setup, showing that the network first undergoes an alignment phase before converging to one the degenerate global minima of the loss.
They argued that FA’s worse performance in CNNs is due to the inability of the forward pass gradients to align under the block-Toeplitz connectivity strucuture that arises from enforced weight sharing (d’Ascoli et al., 2019).
Garg & Vempala (2022) analyzed matrix factorization with FA, proving that, when overparameterized, it converges to a minimizer under standard conditions, albeit more slowly than GD.
Cao et al.
(2020) analyzed the kernel and loss dynamics of linear networks trained with learning rules from a space that includes GD, contrastive Hebbian, and predictive coding rules, showing strong dependence of hierarchical representations on learning rule.
Recent works have utilized DMFT techniques to analyze typical performance of algorithms trained on high-dimensional random data (Agoritsas et al., 2018; Mignacco et al., 2020; Celentano et al., 2021; Gerbelot et al., 2022).
In the present work, we do not average over random datasets, but rather over initial random weights and treat data as an input to the theory.
Wide NNs have been analyzed at infinite width in both lazy regimes with the NTK (Jacot et al., 2018; Lee et al., 2019) and rich feature learning regimes (Mei et al., 2018).
In the feature learning limit, the evolution of kernel order parameters have been obtained with both Tensor Programs framework (Yang & Hu, 2021) and with
DMFT (Bordelon & Pehlevan, 2022).
Song et al.
(2021) recently analyzed the lazy infinite width limit of two layer networks trained with FA and weight decay, finding that only one layer effectively contributes to the two-layer NTK.
Boopathy & Fiete (2022) proposed alignment based learning rules for networks at large width in the lazy regime, which performs comparably to GD and outperform standard FA.
Their Align-Ada rule corresponds to our ρ -FA with ρ = 1 in lazy large width networks.
E FFECTIVE N EURAL T ANGENT K ERNEL FOR A L EARNING R ULE
We denote the output of a neural network for input x µ ∈ R D as f µ .
For concreteness, in the main text we will focus on scalar targets f µ ∈ R and MLP architectures.
Other architectures such as multiclass outputs and CNN architectures with infinite channel count can also be analyzed as we show in the Appendix C. For the moment, we let the function be computed recursively from a collection of weight matrices θ =
Vec { W 0 , W 1 , ..., w L } in terms of preactivation vectors h ℓµ ∈ R N where,
[Equation]
where nonlinearity ϕ is applied element-wise.
The scalar parameter γ 0 controls how rich the network training is: small γ 0 corresponds to lazy learning while large γ 0 generates large changes to the features (Chizat et al., 2019).
For gated linear networks, we follow Fiat et al.
and modify the forward pass equations by replacing ϕ ( h ℓµ ) with a multiplicative gating function ˙ ϕ
( m ℓµ ) h ℓµ where gating variables m ℓµ = 1 √ D M ℓ x µ are fixed through training with M ij ∼ N (0 , 1) .
To minimize loss L = (cid:80) µ ℓ ( f µ , y µ ) , we consider learning rules to the parameters θ of the form
[Equation]
where the error signal is ∆ µ ( t ) =
− ∂
L ∂f µ | f µ ( t ) .
The last layer weights w L are always updated with their true gradient.
This corresponds to the biologically-plausible and local delta-rule, which merely correlates the error signals ∆ µ and the last layer features ϕ ( h Lµ )
(Widrow & Hoff, 1960).
In intermediate layers, the pseudo-gradient vectors ˜
g ℓµ are determined by the choice of the learning rule.
For concreteness, we provide below the recursive definitions of ˜ g ℓ for our five learning rules of interest.
[Equation]
DFA
[Equation]
GLN
[Equation]
Hebb
[Equation]
[Equation]
While GD uses the instantaneous feedforward weights on the backward pass, ρ -FA uses the weight matrices which do not evolve throughout training.
These weights have correlation ρ with the initial forward pass weights W ℓ (0) .
This choice is motivated by the observation that partial correlation between forward and backward pass weights at initialization can improve training (Liao et al., 2016;
Xiao et al., 2018; Moskovitz et al., 2018), though the cost is partial weight transport at initialization.
However, we consider partial correlation at initialization more biologically plausible than the demanding weight transport at each step of training, like in GD.
For DFA, the weight vectors ˜ z ℓ are sampled randomly at initialization and do not evolve in time.
For GLN, the gating variables m ℓµ are frozen through time but the exact feedforward weights are used in the backward pass.
Lastly, we modify the classic Hebb rule (Hebb, 1949) to get ∆ W ℓ ∝ (cid:80) µ ∆ µ ( t ) 2 ϕ ( h ℓ +1 µ ) ϕ
( h ℓµ ) ⊤ , which weighs each example by its current error.
Unlike standard Hebbian updates, this learning rule gives stable dynamics without regularization (App. G).
For all rules, the evolution of the function is determined by a time-dependent eNTK K µν which is defined as
[Equation]
where the base cases ˜
G L +1 µν ( t, s )
= 1 and Φ
µν ( t, s )
= 1 D x µ · x ν are time-invariant.
The kernel ˜ G ℓ computes an inner product between the true gradient signals g ℓ µ = γ 0 N ∂f µ ∂ h ℓ µ and the pseudo-gradient ˜ g ℓν which is set by the chosen learning rule.
We see that because ˜ G ℓ is not necessarily symmetric, K is also not necessarily symmetric.
The matrix ˜ G ℓ quantifies pseudo-gradient / gradient alignment
. D YNAMICAL M EAN F IELD T HEORY FOR V ARIOUS L EARNING R ULES
For each of these learning rules considered, the infinite width N → ∞ limit of network learning can be described by a dynamical mean field theory (DMFT)
(Bordelon & Pehlevan, 2022).
At infinite width, the dynamics of the kernels Φ ℓ and ˜ G ℓ become deterministic over random Gaussian initialization of parameters θ .
The activity of neurons in each layer become i.i
[Equation]
d. random variables drawn from a distribution defined by these kernels, which themselves are averages over these singlesite distributions.
Below, we provide DMFT formulas which are valid for all of our learning rules
[Equation]
The definitions of ˜ g ℓµ ( t ) depend on the learning rule and are described in Table 1.
The z ℓµ ( t ) is the pre-gradient field defined so that g ℓµ ( t ) = ˙ ϕ
( h ℓµ ( t ))
z ℓµ ( t ) .
The dependence of these DMFT equations on data comes from the base case Φ 0 µν ( t, s )
= 1 D x µ · x ν and error signal ∆ µ = − ∂
L ∂f µ .
Rule
[Equation]
Hebb
[Equation]
[Table] [Table]
The ˜ ζ field is an independent Gaussian with correlation ˜ ζ ℓµ ( t )˜ ζ ℓν ( s ) (cid:69) =
(cid:10) ˜
g ℓ +1 µ ( t )˜
g ℓ +1 ν ( s ) (cid:11) =
˜˜ G ℓ +1 µν ( t, s ) . For DFA, the ˜ z ℓ field is static ˜
z
ℓ ∼ N (0 , 1) . For GLN, we use { m ℓµ } ∼ N (0 , K x ) as a gating variable.
C ℓ = 0 except for ρ -FA with ρ > 0 .
We see that, for { GD, ρ -FA, DFA, Hebb } the distribution of h ℓµ ( t ) , z ℓµ ( t ) are Gaussian throughout training only in the lazy γ 0 → 0 limit for general nonlinear activation functions ϕ ( h ) .
However, conditional on { m ℓµ } , the { h ℓ , z ℓ } fields are all Gaussian for GLNs.
For all algorithms except ρ -FA,
C ℓ
= 0 .
For ρ -FA we have C ℓµα
[Figure]
[Figure]
Though FA starts with the lowest alignment, its final NTK task alignment exceeds that of GD
The dynamics the gradient-pseudogradient kernel ˜ G also reveals increasing correlation g with
FA[-starts with ˜ G = 
 but ˜ G increases to non-zero value. The distribution of hidden layer preactivations after training reveals non-Gaussian statistics for both GD and FA, but approximately Gaussian statistics for GLN kernels-]
As described in prior results on the GD case (Bordelon & Pehlevan, 2022), the above equations can be solved self-consistently in polynomial (in train-set size P and training steps T ) time.
With an estimate of the dynamical kernels { Φ ℓµν ( t, s ) , ˜ G ℓµν ( t, s ) , G ℓµν ( t, s ) } , one computes the eNTK
K µν ( t ) and error dynamics ∆ µ ( t ) .
From these objects, we can sample the stochastic processes { h ℓ , z ℓ , ˜ z ℓ } which can then be used to derive new refined estimates of the kernels.
This procedure is repeated until convergence.
This algorithm can be found in App. A.
An example of such a solution is provided in Figure 1 for two layer ReLU networks trained with GD, FA, GLN, and Hebb.
We show that our self-consistent DMFT accurately predicts training and kernel dynamics, as well as the density of preactivations { h µ ( t ) } and final kernels { Φ µν , ˜ G µν } for each learning rule.
We observe substantial differences in the learned representations (Figure 1e), all predicted by our DMFT.
3. L AZY OR E ARLY T IME S TATIC -K ERNEL L IMITS
When γ 0 → 0 , we see that the fields h ℓµ ( t ) and z ℓµ ( t ) are equal to the Gaussian variables u ℓµ (0) and r ℓ µ (0) .
In this limit, the eNTK K µν remains static and has the form summarized in Table 2 in terms of the initial feature kernels Φ ℓ and gradient kernels G ℓ .
We derive these kernels in Appendix D.
The feature P × P matrices Φ ℓ , G ℓ in Table 2 are computed recursively as
[Equation]
[Figure]
Rule
[Equation]
Φ Lµν with base cases Φ 0 = K x and G L +1 = 11 ⊤ . We provide interpretations of this result below.
• Backpropagation (GD) and ρ = 1 FA recover the usual depth L NTK, with contributions from every layer K µν = (cid:80) ℓ G ℓ +1 µν Φ ℓµν at initialization.
This kernel governs both training dynamics and test predictions in the lazy limit γ
→ 0 (Jacot et al., 2018; Lou et al., 2022).
• ρ = 0 FA, DFA and Hebb are equivalent to using the NNGP kernel K µν ∼ Φ Lµν , giving the Bayes posterior mean (Matthews et al., 2018; Lee et al., 2018;
Hron et al., 2020).
In the γ 0 , ρ → 0 limit, only the dynamics of the readout weights w L contribute to the evolution of f µ since error signals cannot successfully propagate backward and gradients cannot align with pseudo-gradients (App D).
The standard ρ =
FA will be indistinguishable from merely training w L with the delta-rule unless the network is trained in the rich feature learning regime γ 0 > 0 , where ˜ G ℓ can evolve.
This effect was also noted in two layer networks by Song et al.
• ρ -FA weighs each layer ℓ with scale ρ L − ℓ , since each layer’s pseudo-gradient is only partially correlated with the true gradient, giving recursion ˜ G ℓ = ρ ˜ G ℓ +1 with base case
˜ G L +1 =
G L +1 .
• GLN’s kernel in lazy limit is determined by the Gaussian gating variables { m ℓµ } ∼ N (0 , K x ) .
We visualize these kernels for deep ReLU networks and ReLU GLNs for normalized inputs | x | 2 = | x ′ | 2 = D , by plotting the kernel as a function of the angle θ separating two inputs cos( θ ) =
1 D x ⊤ x ′ .
We find that the kernels develop a sharp discontinuity at the origin θ = 0 , which becomes more exaggerated as ρ and L increase.
We further show that the square difference of width N kenels and infinite width kernels go as O ( N − 1 ) .
We derive this scaling with a perturbative argument in
App. H, which enables analytical prediction of leading order finite size effects (Figure 7).
In the lazy γ 0 → 0 limit, these kernels define the eNTK and the network prediction dynamics.
3. F EATURE L EARNING E NABLES G RADIENT /P SEUDO - GRADIENT A LIGNMENT AND K ERNEL /T ASK A LIGNMENT
In the last section, we saw that, in the γ 0 → 0 limit, all algorithms have frozen preactivations and pregradient features { h ℓµ ( t ) , z ℓµ ( t ) } .
A consequence of this fact is that FA and DFA cannot increase their gradient-pseudogradient alignment throughout training in the lazy limit γ 0 = 0 .
However, if we increase γ 0 , then the gradient features g ℓµ ( t ) and pseudo-gradients ˜
g ℓµ ( t ) evolve in time and can increase their alignment.
In Figure 3, we show the effect of increasing γ 0 on alignment dynamics in a depth 4 tanh network trained with DFA.
In (b), we see that larger γ 0 is associated with high taskalignment of the last layer feature kernel Φ L , which becomes essentially rank one and aligned to yy ⊤ .
The asympotic cosine similarity between gradients and pseudogradients also increase with γ 0 .
The eNTK also becomes aligned with the task relevant directions (shown in Figure 3 c), like has been observed in GD training (Baratin et al., 2021; Shan & Bordelon, 2021; Geiger et al., 2021; Atanasov et al., 2022).
We see that width N networks have a dynamical eNTK K N ( t ) which deviates from the
DMFT eNTK K ∞ ( t ) by O (1 /N ) in square loss.
DMFT is more predictive for larger γ 0 networks, suggesting a reduction in finite size variability due to task-relevant feature evolution
[Figure]
[Equation]
3. D EEP L INEAR N ETWORK K ERNEL D YNAMICS
When γ 0 > 0 the kernels and features in the network evolve according to the DMFT equations.
For deep linear networks we can analyze the equations for the kernels in closed form without sampling since the correlation functions close algebraically (App. E).
In Figure 4, we utilize our algebraic DMFT equations to explore ρ -FA dynamics in a depth 4 linear network.
Networks with larger ρ train faster, which can be intuited by noting that the initial function time derivative
[Equation]
[Figure] [Equation] [Figure] [Equation]
[Figure]
[Equation] [Figure] [Equation] [Figure]
is an increasing function of ρ .
We observe higher final gradient pseudogradient alignment in each layer with larger ρ , which is also intuitive from the initial condition ˜ G ℓ (0) =
ρ L − ℓ .
However, surprisingly, for large initial correlation ρ , the NTK achieves lower task alignment, despite having larger ˜ G ℓ ( t ) .
We show that this is caused by smaller overlap of each layer’s feature kernel H ℓ ( t ) with yy ⊤ .
Though this phenomenon is counterintuitive, we gain more insight in the next section by studying an even simpler two layer model.
[Figure]
[Figure]
3.3. E XACTLY S OLVEABLE D YNAMICS IN T WO L AYER L INEAR N ETWORK
We can provide exact solutions to the infinite width GD and ρ -FA dynamics in the setting of Saxe et al.
(2013), specifically a two layer linear network trained with whitened data K xµν =
δ µν .
Unlike
Saxe et al.
(2013)’s result, however, we do not demand small initialization scale (or equivalently large γ 0 ), but rather provide the exact solution for all positive γ 0 .
We will establish that large initial correlation ρ results in higher gradient/pseudogradient alignment but lower alignment of the hidden feature kernel H ( t ) with the task relevant subspace yy ⊤ .
We first note that when K x = I , the GD or FA hidden feature kernel H ( t ) only evolves in the rank-one yy ⊤ subspace.
It thus suffices to track the projection of H ( t ) on this rank one subspace, which we call H y ( t ) .
In the App.
F we derive dynamics for H y for GD and ρ -FA
[Equation]
We illustrate these dynamics in Figure 5.
The fixed points are H y =
(cid:112)
+ γ 20 y 2 for GD and for ρ -FA, H y
= 1 + a 2 where a is the smallest positive root of 12 a 3 + (1 + ρ ) a = γ
y .
For both GD and FA, we see that increasing γ 0 results in larger asymptotic values for H y and ˜ G .
For ρ -FA the fixed point of a ’s dynamics is a strictly decreasing function of ρ since da dρ < 0 , showing that the final value of H y is smaller for larger ρ .
On the contrary, we have that the final ˜ G
= ρ + 12 a 2 is a strictly increasing function of ρ since ddρ ˜ G = 1 − a 2 32 a
+(1+ ρ ) > 13 > 0 .
Thus, this simple model replicates the phenomenon of increasing ˜ G and decreasing H y as ρ increases.
For the Hebb rule with K x =
I , the story is different.
Instead of aligning H along the rank-one task relevant subpace, the dynamics instead decouple over samples, giving the following P separate equations
[Equation]
From this perspective
[Figure] we see that the hidden feature kernel does not align to the task [Figure] but rather increases its entries in overall scale as is illustrated in Figure 5 (b)
[Figure]
1 | y | 2 y ⊤ Hy /
Tr H ( t )
D ISCUSSION
We provided an analysis of the training dynamics of a wide range of learning rules at infinite width.
This set of rules includes (but is not limited to) GD, ρ -FA, DFA, GLN and Hebb as well as many others.
We showed that each of these learning rules has an dynamical effective NTK which concentrates over initializations at infinite width.
In the lazy γ 0 → 0 regime, it suffices to compute the the initial NTK, while in the rich regime, we provide a dynamical mean field theory to compute the NTK’s dynamics.
We showed that, in the rich regime, FA learning rules do indeed align the network’s gradient vectors to their pseudo-gradients and that this alignment improves with γ 0 .
We show that initial correlation ρ between forward and backward pass weights alters the inductive bias of FA in both lazy and rich regimes.
In the rich regime, larger ρ networks have smaller eNTK evolution.
Overall, our study is a step towards understanding learned representations in neural networks, and the quest to reverse-engineer learning rules from observations of evolving neural representations during learning in the brain.
Many open problems remain unresolved with the present work.
We currently have only implemented our theory in MLPs.
An implementation in CNNs could explain some of the observed advantages of partial initial alignment in ρ -FA (Xiao et al., 2018; Moskovitz et al., 2018; Bartunov et al., 2018;
Refinetti et al., 2021).
In addition, our framework is sufficiently flexible to propose and test new learning rules by providing new ˜ g
ℓµ ( t ) formulas.
Our DMFT gives a recipe to compute their initial kernels, function dynamics and analyze their learned representations.
The generalization performance of these learning rules at varying γ 0 is yet to be explored.
Lastly, our DMFT is numerically expensive for large datasets and training intervals, making it difficult to scale up to realistic datsets.
Future work could provide theoretical convergence guarantees for our DMFT solver.
A PPENDIX A A LGORITHM TO S OLVE N ONLINEAR DMFT E QUATIONS
Data: K x , y , Initial Guesses { Φ ℓ , G ℓ , ˜ G ℓ , ˜˜ G ℓ } Lℓ =1 , { A ℓ , B ℓ , C ℓ , D ℓ } L − 1 ℓ =1 , Sample count S ,
Update Speed β
Result: Network predictions through training f µ ( t ) , correlation functions { Φ ℓ , G ℓ , ˜ G ℓ , ˜˜ G ℓ } Lℓ =1 , response functions { A ℓ , B ℓ , C ℓ , D ℓ } L − 1 ℓ =1 , 1 Φ
=
K x ⊗ 11 ⊤ , G L +1 = 11 ⊤ ; 2 while Kernels Not Converged do
From { Φ ℓ , G ℓ } compute K NTK ( t, t ) and solve ddt f µ ( t ) =
(cid:80)
α ∆ α ( t ) K NTKµα ( t, t ) ; ℓ = 1 ; while ℓ < L + 1 do
Draw S samples { u ℓµ,n ( t ) } S n =1 ∼ GP (0 , Φ ℓ − 1 ) , { r ℓµ,n ( t ) , v ℓµ,n ( t ) } S n =1 ∼ GP (cid:32) 0 , (cid:34) G ℓ + ˜ G ℓ + ˜ G ℓ +1 ⊤ ˜˜ G ℓ
+ (cid:35)(cid:33) ;
Solve equation 5 for each sample to get { h ℓµ,n ( t ) , z ℓµ,n ( t ) , ˜ g ℓµ,n ( t ) } S n =1 ;
Use learning rule (Table 1) to compute { ˜ g ℓµ,n ( t ) } S n =1 ;
Compute new correlation function { Φ ℓ , G ℓ , ˜ G ℓ , ˜˜ G ℓ } estimates: Φ ℓ,newµν ( t, s ) = 1 S (cid:80) n ∈
[ S ] ϕ ( h ℓµ,n ( t )) ϕ ( h ℓν n
[Equation]
s
[Equation]
G ℓ,newµν
[Equation]
t
[Equation]
t
[Equation]
˜ G
[Equation]
newµν
[Equation]
t,
[Equation]
n
[Equation]
t
[Equation]
˜˜
[Equation]
newµν
[Equation]
t
[Equation]
g
[Equation] [Equation]
t
[Equation]
Solve for Jacobians on each sample
[Table]
Compute new response functions { A ℓ , B ℓ − 1 , C ℓ , D ℓ − 1 } estimates:
[Equation]
[Table]
[Equation]
[Equation]
[Equation]
[Table]
[Equation]
[Equation] [Equation]
[Table] [Equation] [Table]
[Equation] [Table]
[Equation]
ℓ
; end
; while ℓ L 1 do
Update correlation functions
[Equation]
; ˜ G
[Equation]
←
[Equation]
; if ℓ < L then
Update response functions
[Equation]
ℓ + β B ℓ new
C ℓ ← 1 − β ) C ℓ + β C ℓ new , D ℓ ← 1 − β ) D ℓ + β D ℓ,new end ℓ ←
end 32 end 33 return { f µ t )
Pµ Φ ℓ G ℓ ˜ G ℓ
˜ ˜ G ℓ } Lℓ A ℓ B ℓ
C ℓ D ℓ L − 1 ℓ The sample-and-solve procedure we developed and describe below for nonlinear networks is based on numerical recipes used in the dynamical mean field simulations in computational physics Manacorda et al.
and is similar to recent work in the GD case Bordelon & Pehlevan (2022).
The basic principle is to leverage the fact that, conditional on order parameters, we can easily draw samples { u ℓµ ( t ) , r ℓµ ( t ) , ζ ℓµ ( t ) , ˜ ζ ℓµ ( t ) } from their appropriate GPs.
From these sampled fields, we can identify the kernel order parameters by simple estimation of the appropriate moments.
The algorithm is provided in Algorithm 1.
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 .in
our deep network experiments.
B D ERIVATION OF DMFT E QUATIONS
In this section, we derive the DMFT description of infinite network dynamics.
The path integral theory we develop is based on the Martin-Siggia-Rose-De Dominicis-Janssen (MSRDJ) framework
Martin et al.
A useful review of this technique applied to random recurent networks can be found here Crisanti & Sompolinsky (2018).
This framework was recently extended for deep learning with GD in (Bordelon & Pehlevan, 2022).
B. W RITING E VOLUTION E QUATIONS IN F EATURE S PACE
First, we will express all of the learning dynamics in terms of preactivation features h ℓµ ( t )
= 1 √ N W ℓ ( t ) ϕ ( h ℓµ ( t )) , pre-gradient features z ℓµ ( t ) = 1 √ N W ℓ ( t )
⊤ g ℓ +1 and pseudogradient features ˜
g ℓµ ( t ) .
Since we would like to understand typical behavior over random initializations of weights θ (0)
=
{ W 0 (0) , W 1 (0) , ..., w L (0) } , we want to isolate the dependence of our evolution equations by W ℓ (0) .
We achieve this separation by using our learning dynamics for W ℓ ( t )
[Equation]
The inclusion of the prefactor γ 0 √ N in the weight dynamics ensures that ddt f
=
O γ 0 ,N (1) and ddt h ℓ =
O γ 0 ,N ( γ 0 ) at initialization (Chizat et al., 2019; Bordelon & Pehlevan, 2022).
Using the forward and backward pass equations, we find the following evolution equations for our feature vectors
[Equation]
where we introduced the following feature and gradient/pseudo-gradient kernels
[Equation]
The particular learning rule defines the definition of the pseudo-gradient ˜ g ℓµ ( t ) .
We note that, for all learning rules considered, the pseudogradient ˜ g ℓi,µ ( t ) is a function of the fields { h ℓi,µ ( t ) , z ℓiµ ( t ) , m ℓiµ ( t ) , ζ ℓi,µ ( t ) , ˜ ζ ℓi,µ ( t ) } µ ∈
[ P ] ,t ∈ R + , conditional on the value of the kernels { Φ ℓ , ˜ G ℓ } .
The additional fields have definitions
[Equation]
and are specifically required for ρ -FA with ρ > 0 since ˜ g ℓµ ( t )
=
ρ ˙ ϕ
( h ℓµ ( t )) ⊙ ζ ℓµ ( t ) + (cid:112) 1 − ρ 2 ˙ ϕ
( h ℓ µ ( t )) ⊙ ˜
ζ ℓµ ( t ) .
The fields m ℓ µ = 1 √ D M ℓ x µ are required for GLNs.
All of the necessary fields { h ℓµ ( t ) , z ℓµ ( t ) ,
˜ g ℓµ ( t ) } are thus causal functions of the stochastic fields { χ ℓµ ( t ) , ξ ℓµ ( t ) , m ℓµ , ζ ℓµ ( t ) , ˜ ζ ℓµ ( t ) } and the kernels { Φ ℓ , ˜ G ℓ } .
It thus suffices to characterize the distribution of these latter objects over random initialization of θ (0) in the N → ∞ limit, which we study in the next section.
B. M OMENT G ENERATING F UNCTIONAL
We will now attempt to characterize the probability density of the random fields
[Equation]
It is readily apparent that the fields m ℓµ are independent of the others and have a Gaussian distribution over random Gaussian M ℓ .
These fields, therefore do not can be handled independently from the others, which are statistically coupled through the initial conditions.
We will thus characterize the moment generating functional of the remaining fields { χ ℓµ ( t ) , ξ ℓµ ( t ) , ζ ℓµ ( t ) , ˜ ζ ℓµ ( t ) } over random initial condition and random backward pass weights
[Equation]
where χ ℓ , ξ , ζ , ˜ ζ are regarded as functions of θ (0)
[Equation]
{ ˜ W ℓ } .
Arbitrary moments of these random variables can be computed by differentiation of Z near zero source.
For example, a two-point correlation function can be obtained as
[Equation]
More generally
[Equation]
we let µ =
( i, µ, t ) be a tuple containing the neuron, time, and sample index for an entry of one of these fields so that χ ℓ µ = χ ℓi,µ ( t ) .
Further
[Equation]
we let N χ ℓ , N ξ ℓ , N ζ ℓ , N ˜ ζ ℓ be index sets which contain sample and time indices as well as neuron indices N χ = { µ χ 1 , ..., | µ χ |N χ | } for all of the indices we wish to compute an average over.
Then arbitrary moments can be computed with the formula
[Equation]
We now to study this moment generating functional Z in the large width N → ∞ limit.
B. P ATH I NTEGRAL F ORMULATION AND I NTEGRATION OVER W EIGHTS
To enable the average over the weights, we multiply Z by an integral representation of unity that enforces the relationship between χ ℓ +1 µ ( t ) , W ℓ
[Equation] [Equation]
In the second line, we used the Fourier representation of the Dirac-Delta function for each of the N neuron indices δ ( r )
= (cid:82) ∞
−∞ d ˆ r 2 π exp ( i ˆ rr ) .
We repeat this procedure for the other fields ξ ℓµ ( t ) , ζ ℓµ ( t ) , ˜ ζ ℓµ ( t ) at each time t and each sample µ .
After inserting these delta functions, we find
[Table]
[Equation]
We see that we often have simultaneous integrals over time t and sums over samples µ so we will again adopt a shorthand notation for indices µ = ( µ, t ) and define a summmation convention (cid:80) µ a µ b µ {+= (cid:82) ∞ 
+}
[-∞ 
-]
dt (cid:80) Pµ
=1 a µ ( t ) b µ ( t ) .
To perform the averages over weights, we note that for a standard normal variable W ij , that E W ij exp ( iW ij a i b j ) =
exp (cid:0) − 12 a 2 i b 2 i (cid:1) .
Using this fact for each of the weight matrix averages, we have
[Equation]
In the above
[Equation]
we introduced a collection of order parameters { Φ , G, ˜ G, ˜˜ G, A, C }
[Equation]
which will correspond to correlation and response functions of our DMFT.
These are defined as
[Equation]
We perform a similar average over ˜ W ℓ can be obtained directly
[Equation]
Now that we have defined our collection of order parameters
[Equation]
we enforce their definitions with
Dirac-Delta functions by multiplying by one.
For example,
[Equation]
[Equation]
We enforce these definitions for all order parameters { Φ ℓ µν ,
[Equation]
We let the corresponding
Fourier duals for each of these order parameters be
[Equation]
In the next section we show the resulting formula for the moment generating function and take the N → ∞ limit to derive our DMFT equations.
B. DMFT A CTION
After inserting the Dirac-Delta functions to enforce the definitions of the order parameters
[Equation]
we derive the following moment generating functional in terms of q =
[Equation]
where S [ q ] is the O N (1) DMFT action which takes the form
[Equation]
Z ℓi [ q ] .
The single-site moment generating functionals (MGF)
Z ℓi involve only the integrals with sources { j ℓi , k ℓi , n ℓi , p ℓi } for neuron i ∈ [ N ] in layer ℓ .
For a given set of order parameters q at zero source, these functionals become identical across all neuron sites i .
Concretely, for any ℓ ∈ [ L ]
[Equation]
i ∈ [ N ]
[Equation]
the single site MGF takes the form
[Equation]
As promised [Equation] the only terms in Z i which vary over site index i are the sources { j, k, n, p } .
To simplify our later saddle point equations [Equation] we will abstract the notation for the single site MGF [Equation]
letting
[Equation]
where H ℓi is the single site effective Hamiltonian for neuron i and layer ℓ .
Note that at zero source,
H ℓ i are identical for all i ∈ [ N ] .
B. S ADDLE P OINT E QUATIONS
Letting the full collection of concatenated order parameters q be indexed by b .
We now take the
N
→ ∞ limit, using the method of steepest descent
[Equation] [Equation]
We see that the integral over q is exponentially dominated by the saddle point where ∇ S [ q ] = 0 .
We thus need to solve these saddle point equations for the q ∗ .
To do this, we need to introduce some notation.
Let O ( χ, ˆ χ, ξ, ˆ ξ, ζ, ˆ ζ, ˜ ζ, ˆ˜ ζ ) be an arbitrary function of the single site stochastic processes.
We define the ℓ -th layer i -th single site average, denoted by (cid:68) O
( χ, ˆ χ, ξ, ˆ ξ, ζ, ˆ ζ, ˜ ζ, ˆ˜ ζ ) (cid:69) ℓ,i as
[Equation]
27) which can be interpreted as an average over the Gibbs measure defined by energy H ℓi .
With this notation, we now set about computing the saddle point equations which define the primal order parameters { Φ , G, ˜ G, ˜˜ G } .
[Equation]
We further compute the saddle point equations for the dual order parameters
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
The correlation functions involving real variables { h, g, ˜ g } have a straightforward interpetation.
However, it is not immediately clear what to do with terms involving the dual fields { ˆ χ, ˆ ξ, ˆ ζ } .
As a starting example, let’s consider one of the terms for B ℓ − 1 µν , namely − i (cid:10) ˆ χ ℓ ν g ℓ ν (cid:11) .
We make progress by inserting another fictitious source term u ℓ µ and differentiating near zero source
[Equation]
Introducing a vectorization notation u ℓ =
Vec { u ℓ µ } µ , ˆ χ ℓ =
Vec { ˆ χ ℓ µ } µ and Φ ℓ − 1 =
Mat { Φ ℓ − 1 µ , ν } µ , ν , we can perform the internal integrals over ˆ χ ℓ (cid:90) (cid:89)
[Equation]
[Equation]
We thus need to compute a derivative of the above function with respect to u ℓ at u ℓ = 0 , which gives
[Equation]
[Equation]
From the above reasoning, we can also easily obtain ˆ Φ ℓ − 1 using
[Equation]
Performing a similar analysis, we insert source fields r + = (cid:20) r ℓ
[Equation]
for ˆ ξ ℓ + = (cid:20)
[Equation]
ˆ ζ ℓ (cid:21) and define G ℓ +1+ = (cid:34) G ℓ + ˜ G
[Equation]
˜ G
[Equation]
˜˜ G ℓ +
[Equation]
(cid:35) , and B ℓ + = (cid:2) B ℓ
D ℓ (cid:3) and then we can compute the necessary averages using the same technique
[Equation]
We now have formulas for all the necessary averages entirely in terms of the primal fields { χ, ξ, ζ, ˜ ζ } .
B. L INEARIZING WITH THE H UBBARD T RICK
Now, using the fact that in the N → ∞ limit q concentrates around q ∗ , we will simplify our single site stochastic processes so we can obtain a final formula for { A, B, C, D, ˆΦ , ˆ G, ˆ˜ G, ˆ˜˜ G } .
To do so, we utilize the Hubbard-Stratanovich identity
[Equation]
which is merely a consequence of the Fourier transform of the Gaussian distribution.
This is often referred to as “linearizing” the action since the a term quadratic in k was replaced with an average of an action which is linear in k .
In our setting
[Equation]
we perform this trick on a collection of variables which appear in the quadratic forms of our single site MGFs Z ℓi .
For example, for the ˆ χ ℓ +1 fields, we have
[Equation]
Similarly, we perform a joint decomposition for the { ˆ ξ ℓ , ˆ ζ ℓ } fields which gives
[Equation]
We thus see that the Gaussian sources { r ℓ µ } µ and { v ℓ µ } µ are mean zero with correlation given by Σ ℓ +1 .
Now that we have linearized the quadratic components involving each of the dual fields
{ ˆ χ, ˆ ξ, ˆ ζ } , we now perform integration over these variables, giving
[Equation]
This reveals the following set of identities
[Equation]
Since we know by construction that u ℓ = χ ℓ − A ℓ − 1 g ℓ − C ℓ − 1 ˜ g ℓ is a zero mean Gaussian with covariance Φ ℓ −
[Equation]
we can simplify our expressions for B ℓ − 1 and ˆ Φ ℓ − 1 using Stein’s Lemma
[Equation]
Similarly, using the Gaussianity of r ℓ , ζ ℓ , ˆ ζ ℓ we have
[Equation]
ˆ˜˜ G ℓ +1 = 0 .
B. F INAL DMFT E QUATIONS
We now take the limit of zero source j ℓ , k ℓ , n ℓ , p ℓ → 0 .
In this limit, all single site averages ⟨⟩ i become identical so we can simplify the expressions for the order parameters.
To “symmetrize” the equations we will also make the substitution B → B ⊤ , D → D ⊤ .
Next, we also rescale all of the response functions { A ℓ , B ℓ , C ℓ , D ℓ } by γ − 1so that they are O γ 0 (1) at small γ 0 .
This gives us the following set of equations for the order parameters
[Equation]
E x p t .
D M F T .
2, 3, (a) ρ =
Final Kernel
E x p t .
Tr 1 ( t , s )
D M F T .
Tr 2 ( t , s )
Tr 3 ( t , s ) (b) ρ = 0 Kernel Dynamics
E x p t .
D M F T .
2, 3, (c) ρ = 1 .
Final Kernel
E x p t .
Tr 1 ( t , s )
D M F T .
Tr 2 ( t , s )
Tr 3 ( t , s ) (d) ρ = 1 .
Kernel Dynamics
For the fields h ℓµ ( t ) , z ℓµ ( t ) , ˜ z ℓµ ( t ) , we have the following equations
[Equation]
   ˙ ϕ
( h ℓµ ( t ))
z ℓµ ( t )
GD ˙ ϕ ( h ℓµ ( t ))
(cid:104)(cid:112) 1 − ρ 2 ˜ ζ ℓµ ( t ) + ρv ℓµ ( t ) + ργ 0 (cid:82) t 0 ds (cid:80) Pν =1 D ℓµν ( t, s ) ϕ
( h ℓν ( s ))
(cid:105) ρ -FA ˙ ϕ
( h ℓµ ( t ))
˜ z ℓ , ˜ z ℓ ∼ N (0 , 1)
DFA ˙ ϕ ( m ℓµ ( t ))
z ℓµ ( t )
GLN ∆ µ ( t ) ϕ
( h ℓµ ( t ))
Hebb { u ℓµ
[Equation]
(cid:35) .
C E XTENSION TO O THER A RCHITECTURES AND O PTIMIZERS
In this section, we consider the effect of changing architectural details (multiple output channels and convolutional structure) and also optimization choices (momentum, regularization).
C. M ULTIPLE O UTPUT C LASSES
Similar to pre-existing work on the GD case (Bordelon & Pehlevan, 2022), our new generalized
DMFT can be easily extended to C output channels, provided the number of channels C is not simultaneously taken to infinity with network width N .
We note that the outputs of the network are now vectors f µ ∈ R C and that each eNTK entry is now a C × C matrix K µν ( t, s ) ∈ R C × C .
The relevant true gradient fields are vectors g ℓc,µ =
∂f c,µ ∂ h ℓµ .
We construct pseudo-gradients ˜
g ℓc,µ as before using each of our learning rules.
The gradient-pseudogradient kernel G ℓµν ∈ R C × C is ˜ G ℓc,c ′ ,µν = 1 N g ℓc,µ · g ℓc ′ ,ν .
The eNTK K µν = (cid:80) ℓ ˜ G ℓ +1 µν
Φ ℓµν can be used to derive the function dynamics
[Equation]
At infinite width N → ∞ , the field dynamics for h ℓµ ( t ) ∈ R , g ℓµ ( t ) ∈ R C satisfy
[Equation]
, (42) where A ℓµν ( t, s ) = γ(cid:28) δϕ ( h ℓµ ( t ))
δ r ℓν ( s ) (cid:29) ∈ R C , A ℓµν ( t, s ) = γ 0 (cid:28) δϕ ( h ℓµ ( t ))
δ v ℓν ( s ) (cid:29) ∈ R C , and B µα ( t, s ) =
∂ g ℓ +1 µ ( t ) ∂u ℓν ( s ) ∈ R C .
The feature kernels are the same as before Φ ℓµν ( t, s ) =
(cid:10) ϕ
( h ℓµ ( t ))
ϕ ( h ℓν ( s )) (cid:11) while the gradient-pseudogradient kernel is ˜ G ℓµν ( t, s ) =
(cid:10) g ℓµ ( t )˜
g ℓ ⊤ ν ( s ) (cid:11) ∈ R C × C .
The pseudogradient fields ˜ g ℓ are defined analogously for each learning rule as in the single class setting.
[Equation]
 
[Equation]
DFA
[Equation]
GLN
[Equation]
Hebb (43)
C. CNN
The DMFT described for each of these learning rules can also be extended to CNNs with infinitely many channels.
Following the work of Bordelon & Pehlevan (2022) Appendix G on the GD DMFT limit for CNNs, we let W ℓij, a represent the value of the filter at spatial displacement a from the center of the filter, which maps relates activity at channel j of layer ℓ to channel i of layer ℓ + 1 .
The fields h ℓµ,i, a satisfy the recursion
[Equation]
where S ℓ is the spatial receptive field at layer ℓ .
For example, a (2 k + 1) × (2 k + 1) convolution will have S ℓ =
( i, j ) ∈
Z 2 : − k ≤ i ≤ k, − k ≤ j ≤ k } .
The output function is obtained from the last layer is defined as f µ =
[Equation]
The true gradient fields have the same definition as before g ℓµ, a = γ 0 N ∂f µ ∂ h ℓµ, a ∈ R N , which as before enjoy the following recursion
[Equation]
We consider the following learning dynamics for the filters
[Equation]
where as before ˜ g ℓ is determined by the learning rule.
The relevant kernel order parameters now have spatial indices.
For instance the feature kernel at each layer has form Φ ℓµ,ν, ab = 1 N ϕ
( h ℓµ, a ( t )) ·
ϕ ( h ℓν, b ( s )) .
At the infinite width N → ∞ , the order parameters and field dynamics have the form
[Equation]
where correlation and response functions have the usual definitions
[Equation]
C. L2 R EGULARIZATION (W EIGHT D ECAY )
L2 regularization on the weights W ℓ (weight decay) can also be modeled within DMFT.
We start by looking at the weight dynamics
[Equation]
In the second line we used an integrating factor e λt .
We can thus arrive at the following feature dynamics in the DMFT limit
[Equation]
The ˜ g dynamics are also modified appropriately with factors of e − λt and e − λ
( t − s ) for each of our learning rules.
We see that the contribution from the initial conditions χ, ξ are suppressed at late times while the feature learning update which is O ( γ 0 /λ ) in the first layer dominates scale of the final features.
C. M OMENTUM
Momentum uses a low-pass filtered version of the gradients to update the weights (Goh, 2017).
A continuous time limit of momentum dynamics on the trainable parameters { W ℓ } 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.
Integration of the Q ℓ ( t ) dynamics gives the following integral expression for W ℓ
[Equation]
These weight dynamics give rise to the following field evolution
[Equation]
We see that in the τ → 0 limit, the t ′′ integral is dominated by the contribution at t ′′ ∼ t ′ recovering usual gradient descent dynamics.
For τ ≫ 0 , we see that the integral accumulates additional contributions from the past values of fields and kernels.
D L AZY L IMITS
In this section we discuss the lazy γ 0 → 0 limit.
In this limit we see that h ℓ ( t ) =
u ℓ ( t ) and z ℓ ( t ) =
r ℓ ( t ) for all time t .
Since the input data gram matrix Φ 0 µν = 1 D x µ · x ν is a constant in time the sources in the first hidden layer u 1 µ are constant in time.
Consequently, the first layer feature kernel is constant in time since
[Equation]
Now, we see that this argument can proceed inductively.
Since Φ 1 is time-independent, the second layer fields h 2 = u 2 ∼ N (0 , Φ 1 ) are also constant in time, implying Φ 2 is constant in time.
This argument is repeated for all layer ℓ ∈
[ L ] .
Similarly, we can analyze the backward pass fields z ℓ .
Since z L ∼ N (0 , G L +1 ) are constant, then z ℓ are time-independent for all ℓ .
It thus suffices to compute the static kernels { Φ ℓ , G ℓ , ˜ G ℓ } at initialization
[Equation]
(55) where in the last line we utilized the independence of u ℓ , r ℓ .
These above equations give a forward pass recursion for the Φ ℓ kernels and the backward pass recursion for G ℓ .
Lastly, depending on the learning rule, we arrive at the following definitions for ˜ G ℓ for ℓ ∈ { 1 , ..., L }
[Equation]
Using these results for ˜ G , we can compute the initial eNTK K
= (cid:80) Lℓ =
˜ G ℓ +1 ⊙ Φ ℓ which governs prediction dynamics.
D. L AZY L IMIT P ERFORMANCES ON R EALISTIC T ASKS
We note that, while the DMFT equations on P datapoints and T timesteps require O ( P 3 T 3 ) time complexity to solve in the rich regime, the lazy limit gives neural network predictions in O ( P 3 ) time, since the predictor can be obtained by solving a linear system of P equations.
The performance of these lazy limit kernels on realistic tasks would match the performances reported by Lee et al.
Specifically, GD and ρ = 1 FA would match the test accuracy reported for “infinite width
GD”, while ρ = 0 FA, DFA, and Hebbian rules would match “infinite width Bayesian” networks in
Figure 1 of Lee et al.
E D EEP L INEAR N ETWORKS
In deep linear networks, the DMFT equations close without needing any numerical sampling procedure, as was shown in prior work on the GD case (Yang & Hu, 2021; Bordelon & Pehlevan, 2022).
The key observation is that for all of the following learning rules, the fields { h , g , ˜ g } are linear combinations of the Gaussian sources { u, r, v } , and are thus Gaussian themselves.
Concretely, we introduce a vector notation h ℓ =
Vec { h ℓµ ( t ) } and g ℓ =
Vec { g ℓµ ( t ) } , etc.
We have in each layer
[Equation]
where the matrices R depend on the learning rule and the data.
The necessary kernels H ℓ = (cid:10) h ℓ h ℓ ⊤ (cid:11) can thus be closed algebraically since all of the correlation statistics of the sources { u, r, v } have known two-point correlation statistics.
E. L INEAR N ETWORK T RAINED WITH GD
The R matrices for GD were provided in (Bordelon & Pehlevan, 2022).
We start by noting the following DMFT equations for h ℓ , g ℓ
[Equation]
where [ H ℓ − 1 ∆ ] µν,ts = H ℓµν ( t, s )
∆ ν
( s ) .
Isolating the dependence of these equations on u and r , we have
[Equation]
These equations can easily be closed for H ℓ and G ℓ .
E. ρ -A LIGNED F EEDBACK A LIGNMENT
In ρ -FA we define the following pseudo-gradient fields
[Equation]
Next, we note that, at initialization, the ˜ G ℓ can be computed recursively
[Equation]
We note that ∂∂ r 1 h 1 = 0 which implies A 1 = 0 .
Similarly we have ∂∂ r 2 h 2 = 0 .
Thus A 2 = 0 .
Proceeding inductively, we find A ℓ = 0 .
Similarly, we note that ∂ ˜ g L ∂ u L =
so D L − 1 = 0 .
Inductively, we have D ℓ = 0 for all ℓ .
Using these facts, we thus find the following equations
[Equation]
We can close these equations for H ℓ and ˜ G ℓ
[Equation]
The matrices ˜˜ G ℓ = 11 ⊤ are all rank one.
Thus it suffices to compute the vectors c ℓ = (cid:0)
C
[Equation]
+
[Equation]
(cid:1) 1 .
Further, it suffices to consider d ℓ = ˜
G ℓ 1 / | 1 | 2 .
With this formalism we have
[Equation]
The analysis for DFA and Hebb rules is very similar.
F E XACTLY SOLVEABLE 2 LAYER LINEAR MODEL F. G RADIENT F LOW
Based on the prior results from (Bordelon & Pehlevan, 2022), the H y =
y ⊤ Hy / | y
| 2 dynamics for
GD are coupled to the dynamics for the error ∆( t )
= 1 | y | y · ∆ ( t ) have the form
[Equation]
These dynamics have the conservation law ddt H 2 y
= γ 20 ddt ( y − ∆) 2 .
Integrating this conservation law from time 0 to time t , we find H y ( t ) 2 = 1 + γ 20 ( y − ∆( t )) 2 .
We can therefore solve a single
ODE for ∆( t ) , giving the following simplified dynamics
[Equation]
These dynamics interpolate between exponential convergence (at small γ 0 ) and a logistic convergence (at large γ 0 ) of ∆( t ) to zero.
Since ∆ → 0 at late time, the final value of the kernel alignment is H y =
(cid:112) 1 + γ 20 y 2 .
F. ρ - ALIGNED FA
For the two layer linear network
[Equation]
the ρ -FA field dynamics are
[Equation]
[Equation]
FA we have ˜ g µ
[Equation]
= ˜
g ∼ N [Equation] 0 , 1) which is a constant standard normal.
We let a µ ( t ) = ⟨ ˜ gh µ ( t ) ⟩ .
The dynamics for H µν and a µ are coupled
[Equation]
Whitening the dataset K x
=
I and projecting all dynamics on ˆ y subspace gives the reduced dynamics
[Equation]
From these dynamics we identify the following set of conservation laws
[Equation]
Writing everything in terms of ∆ , a we have
[Equation]
Integrating both sides of this equation from 0 to t gives ∆ =
y − γ − 1 0 (cid:2) 12 a 3 + (1 + ρ ) a (cid:3) .
Thus, the a dynamics now one dimensional, giving
[Equation]
When run from initial condition a = 0 , this will converge to the smallest positive root of the cubic equation 12 a 3 + (1 + ρ ) a = γ
y .
This implies that, for small γ
we have a ∼ γ
y
+ ρ so that ∆ H = 2∆
˜
G ∼ γ 20 y 2 (1+ ρ ) 2 and so that larger initial alignment ρ leads to smaller changes in the feature kernel and pseudo-gradient alignment kernel.
At large γ
y , we have that a ∼ (2 γ 0 y ) 1 / 3 so that ∆ H
=
2∆
˜
G ∼ (2 γ 0 y ) 2 / 3 .
F. H EBB
For the Hebb rule, ˜ G µ = ⟨ gh µ ⟩ ∆ µ = γ 0 f µ ∆ µ = γ
( y µ − ∆ µ )∆ µ .
Under the whitening assumption
K xµν =
δ µν , the dynamics decouples over samples
[Equation]
We see that H µµ strictly increases.
The possible fixed points for ∆ µ are ∆ µ = 0 or ∆ µ = 12 (cid:104)
y µ ± (cid:113) y 2 µ + γ −
H µµ (cid:105) .
One of these roots shares a sign with y µ and has larger absolute value.
The other root has the opposite sign from y µ .
From the initial condition ∆ µ = y µ and H µµ = 1 , ∆ µ is initially approaching decreasing in absolute value so that | ∆ µ | ∈ (0 , | y µ | ) and will have the same sign as y µ .
In this regime ddt | ∆ µ | < 0 .
Thus, the system will eventually reach the fixed point at ∆ µ = 0 , rather than increasing in magnitude to the root which shares a sign with y µ or continuing to the root with the opposite sign as y µ .
G D ISCUSSION OF M ODIFIED H EBB R ULE
We chose to modify the traditional Hebb rule to include a weighing of each example by its instantaneous error.
In this section we discuss this choice and provide a brief discussion of alternatives
• Traditional Hebb Learning : ddt W ℓ ∝ (cid:80) µ ϕ ( h ℓ +1 ) ϕ
( h ℓ ) ⊤ .
In the absence of regularization or normalization, this learning rule will continue to update the weights even once the task is fully learned, leading to divergences at infinite time t → ∞ .
• Single Power of the Error : ddt W ℓ ∝ (cid:80) µ ∆ µ ϕ ( h ℓ +1 ) ϕ ( h ℓ ) ⊤ .
While this rule may naively appear plausible, it can only learn training points with positive target values y µ in a linear network if γ 0 > 0 .
Further this rule only gives Hebbian updates when ∆ µ > 0 .
• Two Powers of the Error : ddt W ℓ ∝ (cid:80) µ ∆ 2 µ ϕ ( h ℓ +1 ) ϕ
( h ℓ ) ⊤ .
This was our error modified Hebb rule.
We note that the update always has the correct sign for a Hebbian update and the updates stop when the network converges to zero error, preventing divergence of the features at late time.
H F INITE S IZE E FFECTS
We can reason about the fluctuations of q around the saddle point q ∗ at large but finite N using a Taylor expansion of the DMFT action S around the saddle point.
This argument will show that at large but finite N , we can treat q as fluctuating over initializations with mean q ∗ and variance
O ( N − 1 ) .
We will first illustrate the mechanics of this computation of an arbitrary observable with a scalar example before applying this to the DMFT.
H. S CALAR E XAMPLE
Suppose we have a scalar variable q with a distribution defined by Gibbs measure
[Equation]
NS [
[Equation]
] for action S .
We consider averaging some arbitrary observable O ( q ) over this distribution
[Equation]
We Taylor expand S around its saddle point q ∗ giving S [ q ] = S [ q ∗ ] + 12 S ′′ [ q ∗ ] [Equation] 2 +
[Equation]
∞ k =3 S ( k ) [ q ∗ ]( q − q ∗ ) k .
This gives
[Equation]
The exp( NS [ q ∗ ]) terms canceled in both numerator and denominator.
We let the variable q − q ∗ =√ N δ .
After this change of variable
[Equation]
we have
[Equation]
We note that all the higher order derivatives ( k ≥ 3 ) are suppressed by at least N − 1 / 2 compared to the quadratic term.
Letting U = (cid:80) ∞
k =3 N 1 − k/ 2 S ( k ) [ q ∗ ] δ k represent the perturbed potential , we can
Taylor expand the exponential around the Gaussian unperturbed potential exp (cid:0) − 12 δ 2 S ′′ [ q ∗ ] (cid:1) .
We let ⟨O ( δ ) ⟩ 0 =
E q ∼N (0 ,S
[Equation]
[Equation]
1 ) O ( δ ) represent an average over this unperturbed potential
[Equation]
Truncating each series in numerator and denominator at a certain order in 1 /N gives a PadeApproximant to the full observable average (Bender et al., 1999).
Alternatively, this can be expressed in terms of a cumulant expansion (Kardar, 2007)
[Equation]
79) where (cid:10) O U k (cid:11) c 0 are the connected correlations, or alternatively the cumulants .
The first two connected correlations have the form
[Equation]
Using Stein’s lemma
[Equation]
we can now attempt to extract the leading O ( N − 1 ) behavior from each of these terms.
First
[Equation]
we will note the following useful identity which follows from Stein’s Lemma
[Equation]
Using these this fact, we can find the first few correlation functions of interest
[Equation]
Thus
[Equation]
the leading order Pade-Approximant has the form
[Equation]
H.
[Equation]
[Equation]
DMFT A CTION E XPANSION
The logic of the previous section can be extended to our DMFT.
We first redefine the action as its negation S → − S to simplify the argument.
Concretely, this action S [ q ] defines a Gibbs measure over the order parameters q which we can use to compute observable averages
[Equation]
As before
[Equation]
one can Taylor expand the action around the saddle point q ∗
[Equation]
As before, the linear term vanishes since ∇ q S
[ q ∗ ]
= 0 at the saddle point q ∗ .
We again change variables to δ = √ N ( q − q ∗ ) and express the average as ⟨O⟩
[Equation]
where ⟨⟩ 0 denotes a Gaussian average over q ∼ N ( q ∗ , 1 N [ ∇ 2 S ] − 1 )
[Equation]
H. H ESSIAN C OMPONENTS OF DMFT A CTION
To gain insight into the Hessian
[Equation]
we will first restrict our attention to the subset of Hessian entries related to Φ ℓ , ˆ Φ ℓ .
We again adopt a multi-index notation µ = ( µ, ν, t, s ) so that Φ ℓ µ = Φ ℓµν ( t, s ) ∂ 2 S
[Equation]
The first equation follows from the fact that ˆ χ has vanishing moments due to the normalization of the probability distribution induced by Z ℓ .
Similarly, for the G , ˆ G kernels we have
[Equation]
∂ [Equation] Proceeding in a similar manner, we can compute all off-diagonal components such as ∂ 2 S ∂ Φ ∂ ˆ G and ∂ 2 S ∂ ˆΦ ∂ ˆ G .
Once all entries are computed, one can seek an inverse of the Hessian to obtain the covariance of the order parameters.
H. S INGLE S AMPLE N EXT - TO -L EADING O RDER P ERTURBATION T HEORY
In order to obtain exact analytical expressions, we will consider L -hidden layer ReLU and linear neural networks in the lazy regime trained on a single sample with K x = | x | 2 D = 1 .
To ensure preservation of norm, we will use ϕ ( h ) =
√ 2 h Θ( h ) for ReLU and ϕ ( h )
=
h for linear networks.
First, we note that in either case, the infinite width saddle point equations give
[Equation]
At large but finite width, the kernels therefore fluctuate around this typical mean value of Φ ℓ =and G ℓ = 1 .
We now compute the necessary ingredients to invert the Hessian
[Equation]
Next, we compute the sensitivity of each layer’s kernel to the previous layer
[Equation]
First, let’s analyze the marginal covariance statistics for Φ =
Vec { Φ ℓ } Lℓ =1 and ˆ Φ =
Vec { ˆΦ ℓ } Lℓ =1 .
We note that the DMFT action has Hessian components
[Equation]
V ϕ I (cid:21) , U =   1 − ...
−...
1 −   ...
  .
We seek a (physical) inverse C which has vanishing lower diagonal entry, indicating zero variance in the dual order parameters ˆΦ .
This gives us the following linear equations
[Equation]
The relevant entry is C 11 = − V ϕ
[ U ⊤ ] − 1 U − 1 .
This matrix has the form
C 11 = − V ϕ   1 ...

   1 ...
 
[Equation]
V ϕ   1 ...
[Equation] [Equation]
[Equation] [Equation]
L  
[Equation]
Using the fact that the covariance is the negative of the Hessian inverse multiplied by 1 /N , we have the following covariance structure for { Φ ℓ }
[Equation]
This result can be interpreted as the covariance of Brownian motion.
Following an identical argument, we find
[Equation]
We verify these scalings against experiments below in Figure 7.
[Figure] [Figure]
[Figure]