The edge of chaos: quantum field theory and deep neural networks

Kevin T. Grosvenor, Ro Jefferson

Introduction

The remarkable empirical success of deep neural networks in domains ranging from image classification to natural language processing has far outpaced our theoretical understanding. In practice, these networks are generally treated as black boxes, with state-of-the-art performance relying primarily on heuristics and trial-and-error rather than on any fundamental theory BahriRev ; Roberts:2021fes . Indeed, this state of affairs has even led some experts in the field to compare modern machine learning to alchemy Alchemy . As has been pointed out in, e.g., Roberts:2021lll , top-down insights from fields such as cognitive science may be fruitfully complemented by bottom-up approaches from theoretical physics towards uncovering the fundamental principles governing learning and intelligence in minds and machines.

Recently, physicists have begun exploring the parallels between deep neural networks and quantum field theory, leading to a number of interesting works on what is sometimes called the NN-QFT correspondence Roberts:2021fes ; Yaida:2019sjo ; Dyer:2019uzd ; Halverson:2020trp ; Erbin:2021kqf ; Maiti:2021fpy .We use the phrase “quantum field theory” to make manifest the precise analogies with well-studied techniques in QFT that we explore below, but we emphasize that there is nothing intrinsically “quantum” about the networks under consideration. It would perhaps be more accurate to say “statistical field theory,” or one may simply think of this as QFT in Euclidean signature, cf. sec. 5. We also thank Dan Roberts and Sho Yaida for pointing out that previous works that we have included under the “NN-QFT” umbrella did not involve a bona fide field theory in the sense of a well-defined continuum limit, nor a direct correspondence between elements of a neural network and elements of a QFT (see appendix A), but we have here used the term broadly as in Halverson:2020trp to refer to the general philosophy of establishing parallels between neural networks and QFT, with the aim of using the latter to understand the former. See also bondesan2021hintons for an orthogonal approach from quantum mechanics. One key aspect of this approach is the fact that many modern architectures admit a Gaussian process limit: as the number of neurons (per layer, i.e., the width) N→∞{N\rightarrow\infty}, the network is described by a Gaussian distribution, and hence may be modelled as a free (non-interacting) quantum field theory. This is essentially a consequence of the central limit theorem (CLT); see for example Halverson:2020trp for a brief summary and plentiful references of the Gaussian process limit in this context, including the original thesis neal1995 .

While the infinite-width limit provides an analytically tractable approximation that has led to important progress (see, e.g., jacot2020neural ; lee2018deep ; sohldickstein2020infinite ; yang2021feature ), it fails to capture crucial aspects of real-world networks which must of necessity be of finite width. For example, the lack of interactions – i.e., intralayer correlations – in the Gaussian limit implies that representations in these idealized networks do not evolve during gradient-based learning Roberts:2021fes ; LeeXiao . (Note that this does not contradict the well-known universal approximation theorem for infinite-width networks: the latter merely states that there exists some network (that is, a particular set of weights and biases) that approximates a given function, but says nothing about the learning dynamics. The statement that the representation (specifically, the neural tangent kernel) does not evolve at infinite width means that if the network does not happen to start in the correct state, it will never evolve to it; see sections 6.3.3, 10.1.2, or chapter 11 of Roberts:2021fes for details.) Additionally, for networks exhibiting an order-to-chaos phase transition (see below), the location of the critical point predicted by the central limit theorem differs from empirical observations schoenholz2017deep ; Erdmenger:2021sot . Understanding networks away from the infinite-width limit is therefore of central importance for any theory of deep learning with practical applications.

Conveniently, the art of carefully backing away from the N→∞N\rightarrow\infty limit has been perfected by physicists in the form of quantum field theory. The machinery of Feynman diagrams, which we shall later employ, provides a compact and efficient means of computing perturbative contributions from interactions. In the most basic terms, the idea is to solve a complicated (non-Gaussian) theory by perturbing about the free (Gaussian) theory in terms of some small parameter. This allows one to effectively turn on interactions – i.e., finite-width effects – in a controlled manner, which in statistical language corresponds to the inclusion of higher cumulants. In finite-width networks, such cumulants appear in subsequent layers in a manner precisely analogous to what one observes along the renormalization group (RG) flow, due to the marginalization over neurons in previous layers (i.e., tracing-out hidden degrees of freedom) Roberts:2021fes ; roDLRG .

Another important aspect that many neural networks share with models well-studied in physics is the phenomenon of criticality, by which we mean a continuous phase transition separating an ordered and disordered or chaotic phase. The idea that the edge of chaos holds key advantages for computation and learning dates back to at least the classic paper by Langton LANGTON199012 , and was further developed in the influential work by Bertschinger, Legenstein, and Natschläger Bert1 ; Bert2 . It has since appeared in many fields ranging from theoretical neuroscience and neurophysiology RCHIALVO2004756 ; BeingCrit ; relevant , to biological and complex systems Chialvo_2018 ; chialvo2019controlling , and was also explored in an early model of bioplausible neural networks in mistakes . More recently, poole2016exponential ; schoenholz2017deep ; xiao2018dynamical ; chen2018dynamical ; gilboa2019dynamical ; Erdmenger:2021sot demonstrated that networks initialized at criticality are trainable to far greater depths than those lying further into either phase. To see this, one identifies a correlation length that sets the scale at which correlations between local degrees of freedom – e.g., the activations of two different neurons, or the spins of two different magnetic dipoles – decay with separation or depth through the network. Intuitively, both the ordered and chaotic phases are bad for learning, since correlations about the input data – i.e., the structure one is attempting to learn – are energetically damped or washed-out by noise, respectively. However, a critical point is characterized by a divergent correlation length, which allows the persistence of structured information on all scales. We refer the interested reader to BahriRev ; TongSFT ; roCrit for topical reviews of this phenomenon, or to Ashton for a beautiful visual demonstration in the case of the 2d Ising model.

In this work, using techniques from statistical field theory helias2019statistical ; Sompo , we explicitly construct the quantum field theory corresponding to a general class of deep neural networks encompassing both recurrent (RNN) and feedforward (multilayer perceptron, MLP) architectures, in order to leverage well-known tools in perturbative QFT to compute the finite-width corrections to the correlation length. An original motivation was to determine whether these 1/N1/N effects would shift the location of the critical point, as one expects on both theoretical and empirical grounds. Perhaps surprisingly, while the effective correlation length does appear to receive corrections from all orders in the perturbative expansion, the location of the critical point itself appears unchanged. This conclusion should however be regarded with skepticism, since the theory breaks down at the critical point itself. As is generally the case in QFT, the perturbative analysis is only valid at weak coupling, which we shall see corresponds to a constraint on the variance of the weight initializations, σw2\sigma_{w}^{2}. Consequently, the resulting theory is only strictly valid in a subregion of phase space that shrinks as we approach the edge of chaos from the ordered phase. Nonetheless, the theory exhibits a remarkable similarity with the well-known O(N)O(N) vector model tHooft:1973alw ; Brezin:1972se ; Coleman:1985rnk ; brezin1993large ; tHooft:2002ufq ; Zinn-Justin:2002ecy ; Moshe:2003xn that we elaborate on in more detail below, and offers a new perspective on the nascent NN-QFT correspondence that may be fruitfully developed further.

As this work was nearing completion, the excellent book Roberts:2021fes appeared, which shares a similar philosophy of applying ideas from physics to understand the structure and properties of deep neural networks, and in particular also considers perturbative corrections in depth/width; see also the previous work Yaida:2019sjo . Relative to our approach, the main difference is that they did not develop a correspondence with any QFT; rather, the finite-width corrections in their case are seen to arise by starting with the Gaussian distribution of preactivations in the first layer, and fixing the couplings in subsequent layers to track the appearance of effective interactions, i.e., higher cumulants that appear as a result of marginalizing over hidden degrees of freedom, in the analogy with RG mentioned above. In contrast, we are concerned with the bulkThat is, we work away from the input/output layers. At a technical level, we shall assume time- (i.e., layer-) translation invariance in order to facilitate obtaining closed-form expressions for the correlation functions. behavior of the network after the layer-to-layer Hamiltonian has reached a steady state (which must occur some finite depth after the input layer), and the exact form of the interactions are included in the full action of the QFT by construction. A central feature shared by our analyses is that the ratio of depth to width, T/NT/N, is the perturbative expansion parameter; accordingly, we likewise work in the limit T,N→∞T,N\rightarrow\infty with T/N≪1T/N\ll 1 fixed (though in our case this quantity, specifically TT, is dimensionful, and hence one must include an order-1 constant, as will be discussed in detail below). As observed in Roberts:2021fes , this is the regime of most deep neural networks used in practice. We view our approaches as complementary, and warmly recommend Roberts:2021fes for readers interested in a pedagogical treatment of many ideas at this interface of theoretical physics and machine learning. We note that finite-width corrections to the feature kernel were also considered recently in zavatoneveth2021asymptotics .

Another RG-inspired approach appeared in the earlier work Halverson:2020trp , which was further developed in two more papers Erbin:2021kqf ; Maiti:2021fpy that appeared while this project was underway (see also antognini2019finite ). As alluded above, Halverson:2020trp explores the relation between QFTs and the Gaussian process (i.e., N→∞N\rightarrow\infty) limit of neural networks in detail. The basic idea from Wilsonian effective field theory is to write down the most general action consistent with the assumed symmetries and properties of the model (e.g., translation symmetry, locality), and fit the associated couplings (that is, coefficients of the interaction terms) by experiment. In particular, they posit an initially Gaussian action, and show that the deviations from the infinite-width limit can be accurately modelled by the addition of a quartic interaction term, whose contribution is suppressed by 1/N1/N. The irrelevance of higher (e.g., six-point) interactions can be understood from an RG perspective, which was developed more thoroughly in Erbin:2021kqf . These authors also introduced the phrase “neural network phenomenology” to emphasize the fact that the form of the action in all of the above approaches is posited on general grounds, with couplings determined either by experiment or by tracking effective interactions. In contrast, the key difference in the present work is again that we explicitly construct the action of the field theory from the (stochastic) differential equation governing the network dynamics, so that the precise form of the interactions follows directly. It would be very interesting to understand the relation between these approaches in more detail, and in particular whether applying the RG techniques in Halverson:2020trp ; Erbin:2021kqf to the type of bottom-up model we develop here would lead to further insights into criticality in deep neural networks.

Turning to the titular edge of chaos, we are inspired by the aforementioned works poole2016exponential ; schoenholz2017deep ; xiao2018dynamical ; chen2018dynamical ; gilboa2019dynamical ; Erdmenger:2021sot examining criticality in various deep network architectures. However, while many of these papers used the phrase “mean-field theory”, they did not actually rely on any MFT analysis: as mentioned above, Gaussianity arises simply as a consequence of the central limit theorem (CLT). In fact, one important lesson of our analysis is that the correlation functions obtained from the CLT do not agree with the MFT for random networks, even in the infinite-width limit. For the aforementioned works, the distinction is inconsequential, since both approximations appear to yield the same condition for criticality,For this reason, it is unclear whether the CLT result for the critical condition in schoenholz2017deep and related works effectively includes the O(1)\mathcal{O}(1) corrections we compute in sec. 4, since we expect that the latter do not alter the Gaussianity of the theory; see sec. 5 for further discussion. but it is essential to the development of a rigorous NN-QFT correspondence. Prior to considering finite-width corrections in sec. 4, we shall first show in sec. 3 that we recover the criticality condition in the previous works from a true MFT treatment, which we will subsequently reaffirm as the tree-level contribution in perturbative quantum field theory in sec. 4. For readers unfamiliar with statistical field theory, we emphasize that the use of MFT in this context is itself not a novel development: the basic approach we employ was pioneered in the classic paper Sompo , and we have benefited greatly from the pedagogical review helias2019statistical .For other applications of MFT to artificial intelligence, see for example Gabri_2020 and references therein. Nonetheless, while the basic starting point of our work is not fundamentally new, we have considerably developed the perturbative analysis, and applied a variety of old ideas in novel ways.

The remainder of this paper is organized as follows: in sec. 2, we construct the QFT corresponding to the general class of networks under consideration using standard techniques in statistical field theory helias2019statistical . Specifically, we will obtain the partition functionFor our machine learning readers, this is essentially the moment-generating function, with which we can – in principle – compute any observable we wish to know; see roCum for a pedagogical exploration of these relationships. describing self-averaging random networks, and derive equations for the correlation functions in the MFT approximation. In sec. 3, we will construct the double-copy MFT system in order to examine the growth of correlations between different samples of networks from the ensemble. The edge of chaos is then determined by the point at which the largest Lyapunov exponent becomes positive, which yields precisely the criticality condition discussed above. In sec. 4, we go beyond the MFT regime, and consider the perturbative expansion of the full (single-copy) QFT. We first explicitly compute the tree-level propagator – that is, the two-point correlation function in the absence of quantum correctionsAgain, to preempt any sensationalist headlines that “quantum physics explains deep learning”, we remind the reader that there is nothing fundamentally quantum at work: the language is meant to be evocative of the loop corrections with which physicists are intimately familiar, but these are purely classical corrections due to the cumulants associated with turning on interactions in a controlled manner. – identify the correlation length, and show that the condition for criticality precisely agrees with the previous MFT result, as expected. We then compute the first two correction terms to the two-point correlation function, which contribute at O(1)\mathcal{O}(1) and O(T/N)\mathcal{O}(T/N), respectively, for both linear (subsec. 4.3) and non-linear (subsec. 4.4) models.Our analysis is phrased at the more general level of recursive neural networks (RNNs), which includes feedforward networks as a simple case. In the former, the total time TT serves as an infra-red (IR) cutoff, while for feedforward networks this role is played by the total length LL, as in Roberts:2021fes . Here the use of Feynman diagrams vastly simplifies the computations: we will develop an elegant diagrammatic recursion relation, which enables us to sum the infinite series of diagrams at each order to yield a finite contribution. With the loop-corrected propagator in hand, we are then able to identify the finite-width corrections to the effective correlation length in the weak-coupling regime. We close in sec. 5 with some discussion and comments on future directions. For convenience, we have summarized the elements of the nascent NN-QFT dictionary in appendix A. Appendix B contains some identities used in evaluating the Feynman diagrams encountered in sec. 4.4, while appendix C contains explicit expressions for the loop-corrected correlation length for nonlinear models which were deemed too lengthy to include in the main text.

The statistical field theory approach

Rather than writing down a general action and fixing the couplings to match empirical results, we will instead employ a bottom-up approach, in which we start with the differential equation describing an RNN – which includes vanilla feedforward neural networks (i.e., multilayer perceptrons, MLPs) as a special case – and explicitly construct the corresponding quantum (statistical) field theory. As mentioned in the introduction, the approach we follow has a long and diverse history, and we shall draw heavily from the pedagogical review helias2019statistical . Indeed, the main technical differences are the inclusion of the data-dependent term, and the explicit constant γ\gamma in (2). That said, the presentation in helias2019statistical focuses on many other topics that are not relevant to our goal, and we have distilled the full derivation in order to make the paper self-contained, as well as to establish our notation.

The basic strategy is as follows: starting with the stochastic differential equation describing the update rule for the network, the probability for a particular sequence of network states is obtained by marginalizing over the stochasticity. We then introduce an auxiliary field to impose the constraint that the network continue to satisfy the update rule while allowing the fields to fluctuate (i.e., to go off-shell). Upon adding source terms, we obtain the partition function in a form familiar to physicists, from which we can in principle compute any quantity of interest, e.g., correlation functions. In subsec. 2.2, we make the theory explicit by introducing an ansatz for the trainable parameters, which are similarly elevated to fluctuating field variables. The MFT in subsec. 2.3 is then simply the leading-order saddlepoint approximation of the resulting QFT. Various technical assumptions introduced along the way are summarized in appendix A.1. Throughout this work, we have endeavored to make each step in the construction as transparently explicit as possible, in the hopes that the reader will find the length more pedagogical than daunting.

Our starting point is the continuous-time formulation of a recurrent neural network (RNN) as a stochastic differential equation (SDE) lim2021noisy

The SDE (1) is interpreted under the Itô discretization convention as

The field-theoretic approach begins by constructing a moment generating functional for the state of the system, i.e., the partition function. Proceeding with (1), the first step is to observe that if the noise is drawn independently for each timestep, then the probability of a particular path h(t)h(t) (by which we mean the sequence of states h0,…,hTh_{0},\ldots,h_{T}) may be written asStrictly speaking, we should view this as a conditional distribution on a particular sequence of inputs x(t)x(t), since this will be treated as external data below.

where we have included the possibility of specifying a non-zero initial condition in the form of the Kronecker delta term. The Dirac delta in (4) thus imposes that the state satisfies the given SDE (3) at time tt, given the noise xtx_{t} and the solution at the previous timestep ht−1h_{t-1} (i.e., the process is Markovian).

Now, given the integral expression for the Dirac delta function,

From the first line, one immediately sees that differentiating Z[j]Z[j] with respect to jtηj_{t}\eta yields the moments of hth_{t}, e.g., \partial_{j_{t}\eta}Z[j]\big{|}_{j_{t}=0}=\langle h_{t}\rangle_{h} and so on.

where the operator insertions h(si)h(s_{i}), i∈{1,…,n}i\in\{1,\ldots,n\} need not be time-ordered.

2 Self-averaging random networks

Recall that the function f(t)f(t) appearing in the partition function (12) depends on the trainable parameters A,B,W,U,bA,B,W,U,b, cf. (2). Henceforth we shall consider a class of so-called random neural networks, in which these parameters are initialized as independent Gaussian variables,

and similarly for ρ(bi)\rho(b_{i}). Note that as usual, the variances of XijX_{ij} are scaled by the width, to ensure that the activations at subsequent layers remain O(1)\mathcal{O}(1) at large NN. The partition function then describes an ensemble of networks, and we expect that in the large-NN limit, the observables of interest are captured by the ensemble average ⟨Z[j]⟩X,b≕Zˉ[j]\langle Z[j]\rangle_{X,b}\eqqcolon\bar{Z}[j]. The idea is that the network is self-averaging, in that while the particular instantiation varies from one realization of XijX_{ij}, bib_{i} to the next, the physical properties of the ensemble should approach that described by the average over the (random) couplings, provided the fluctuations around the mean values are sufficiently small. This statement is closely related to the central limit theorem, and becomes exact as N→∞N\rightarrow\infty helias2019statistical .As we will discuss in more detail below, the CLT does not appear to yield equivalent results to MFT in the present case, even in the infinite-width limit. The ensemble average is then

where ρ(Xij)\rho(X_{ij}) for each X∈{A,B,W,U}X\in\{A,B,W,U\} are the normalized Gaussian probability density functions (16), and similarly for ρ(bi)\rho(b_{i}), which we have absorbed into the measures DX\mathcal{D}X, Db\mathcal{D}b for compactness. Substituting the rule (2) into the partition function (12) and integrating over the disorder XX and the bias bb, we obtain

and the integration over X∈{A,B,W,U}X\in\{A,B,W,U\} and bb is contained in the interaction term

where in going to the third line, the exponential has factorized into a product of moment generating functions for XijX_{ij} and bib_{i}, with an implicit sum over repeated neuron indices i,ji,j. Due to the i.i.d. condition (15), each of these is a simple product of Gaussian integrals, e.g.,

In the large-NN (i.e., infinite width) limit, the value of these contributions will approach their respective means. The mean-field theory approximation to the ensemble average is then obtained as the leading-order saddlepoint contribution from A,B,W,U\mathfrak{A},\mathfrak{B},\mathfrak{W},\mathfrak{U}, treated as independent fields that we allow to fluctuate.

To proceed, we enforce the constraints (24) via delta functions as in (4),

3 Mean-field theory approximation

We now perform the aforementioned saddlepoint approximation, from which the MFT is obtained at leading order. Let us express the partition function schematically as Zˉ=∫ ⁣Dμ e−S[μ]\bar{Z}=\int\!\mathcal{D}\mu\,e^{-S[\mu]}. Provided the exponential decays sufficiently rapidly, the integral will be dominated by the minimum value μ0\mu_{0}. The saddlepoint approximation simply consists of Taylor expanding S[μ]S[\mu] about the minimum:

where the prime denotes (functional) differentiation with respect to μ\mu, and the linear term vanishes by definition, i.e., S′[μ0]=0S^{\prime}[\mu_{0}]=0. Note that while this may be a very poor approximation to S[μ]S[\mu] when ∣μ−μ0∣≫0|\mu-\mu_{0}|\gg 0, it will still give an accurate approximation to Zˉ\bar{Z} due to the exponential suppression of higher-order terms. If we take only the leading-order contribution, then the partition function is given entirely by the prefactor, e−S[μ0]e^{-S[\mu_{0}]}. It then remains simply to determine μ0\mu_{0}.

Substituting the Gaussian cumulant generating function (33) into the MFT action (32), we have

The propagators are then obtained as the matrix elements of the Green function GG for the matrix operator Ξ\Xi, defined as the right-inverse

which has three non-trivial components; denoting ∂ti≕∂i\partial_{t_{i}}\eqqcolon\partial_{i}, we have

Note that Ghh≡ChhG_{hh}\equiv C_{hh}: what this tells us is that the expression for the transition amplitude from h(t1)h(t_{1}) to h(t2)h(t_{2}) must be determined self-consistently from these equations, i.e., that the correlation ⟨hi(t1)hi(t2)⟩\langle h_{i}(t_{1})h_{i}(t_{2})\rangle depends on the correlations in the other variables, via the interactions induced by the disorder we integrated out above.

Let us now assume that the system exhibits time translation symmetry, so that G(s,t)=G(s−t)G(s,t)=G(s-t). This allows us to swap derivatives à la ∂sG(s−t)=−∂tG(s−t)\partial_{s}G(s-t)=-\partial_{t}G(s-t). Performing this little slight of hand on the first of the equations above yields

If we then act on the third equation with (∂2+γ)(\partial_{2}+\gamma), we obtain

Given our assumption of (time) translation invariance, it is convenient to define τ≔t1−t2{\tau\coloneqq t_{1}-t_{2}}. Then the off-diagonal terms are given by

while for the diagonal term, (41) becomes

This is the analogue of eq. (147) in helias2019statistical ; the treatment above simply extends this framework to the stochastic recursive networks of interest. Upon setting γ=1\gamma=1, g=0g=0, and setting all the variances to 0, our result reduces to the non-stochastic, purely feed-forward case considered in the seminal work Sompo1988 , based on the early MFT analysis in Sompo1982 . While we believe this to be the historical origin of the (use of the phrase) “mean-field approximation” that has recently appeared in the machine learning literature, we emphasize again that this does not necessarily correspond to the N→∞N\rightarrow\infty limit actually used in poole2016exponential ; schoenholz2017deep and related works. We shall show this explicitly in the next section, where correlation functions in the infinite-width limit retain an O(1)\mathcal{O}(1) contribution, which for some parameter values represents a substantial correction to the tree-level (MFT) result.

Now, our primary interest is in the propagator Ghh(τ)=⟨hi(t1)hi(t2)⟩G_{hh}(\tau)=\langle h_{i}(t_{1})h_{i}(t_{2})\rangle. In particular, in section 3, this solution is taken as a background around which chaotic fluctuations are treated perturbatively (not to be confused with the perturbative quantum field theory treatment in sec. 4). However, we do not actually require an explicit solution to (43); it suffices to obtain expressions for CxxC_{xx}, CϕϕC_{\phi\phi}, and CφφC_{\varphi\varphi} in order to express the equation for Ghh(τ)G_{hh}(\tau) in a more tractable form.

To that end, observe that hi(t1)h_{i}(t_{1}), hi(t2)h_{i}(t_{2}) are Gaussian random variables with covariance matrix Ghh(τ)G_{hh}(\tau). That is, dropping the individual neuron indices ii and adopting the shorthand h(t1,2)≕h1,2h(t_{1,2})\eqqcolon h_{1,2}, these are drawn from the bivariate normal distribution with

where in the second equality we have introduced the compact notation c0≔Ghh(0)=⟨h(t)h(t)⟩c_{0}\coloneqq G_{hh}(0)=\langle h(t)h(t)\rangle, cτ≔Ghh(τ)=⟨h(t1)h(t2)⟩c_{\tau}\coloneqq G_{hh}(\tau)=\langle h(t_{1})h(t_{2})\rangle (for t1 ⁣≠ ⁣t2t_{1}\!\neq\!t_{2}). Furthermore, CϕϕC_{\phi\phi} is simply the expectation value of a particular function of these variables, namely ϕ(h1)ϕ(h2)\phi(h_{1})\phi(h_{2}), with respect to this distribution:

where Dh1Dh2\mathcal{D}h_{1}\mathcal{D}h_{2} is the bivariate normal measure obtained by diagonalizing (44),

where the Pearson correlation coefficient is defined as ρ≔cτ/c0\rho\coloneqq c_{\tau}/c_{0}. If we then define the new integration variables hah_{a}, hbh_{b} such that

where DhaDhb\mathcal{D}h_{a}\mathcal{D}h_{b} is the (factorized) standard Gaussian measure,

By Price’s theorem Price for Gaussian processes,Perhaps the easiest way to see this is to work with the original bivariate measure (46), which satisfies ∂∂cDh1Dh2=∂2∂h1∂h2Dh1Dh2\frac{\partial}{\partial c}\mathcal{D}h_{1}\mathcal{D}h_{2}=\frac{\partial^{2}}{\partial h_{1}\partial h_{2}}\mathcal{D}h_{1}\mathcal{D}h_{2}. Since the fall-off of the Gaussian measure ensures vanishing boundary terms, integration by parts can then be used to move the derivatives to ∂∂h1Φ(h1)∂∂h2Φ(h2)\frac{\partial}{\partial h_{1}}\Phi(h_{1})\frac{\partial}{\partial h_{2}}\Phi(h_{2}). Since (50) cannot depend on the choice of integration variables, this proves the theorem for ha,hbh_{a},h_{b} as well. See also Papoulis theorem 6.7. we may express this as

The motivation for this is that it allows us to define the potential

in terms of which we can express the differential equation (43) for the autocorrelation cτc_{\tau} as

where gτ≔g(τ)g_{\tau}\coloneqq g(\tau), and the prime denotes differentiation with respect to cτc_{\tau}. This is now a self-consistentInsofar as the value c0c_{0} determines the potential via (51). kinematic expression for cτc_{\tau}, where the left-hand side is a time-derivative of the kinetic term, hence the identification of VV as the potential energy. In this language, the delta function enforces a discontinuity in the velocity at τ ⁣= ⁣0\tau\!=\!0. As alluded above, we do not require an explicit solution to this expression, but the form will prove convenient below.

The edge of chaos

In the previous section, we obtained a second-order differential equation for the two-point correlator Ghh(τ)G_{hh}(\tau), (43). With this in hand, we now wish to determine where the edge of chaos lies in phase space. There are at least two ways of proceeding: one is to explicitly solve for Ghh(τ)G_{hh}(\tau) by making some assumptions about the various correlators on the right-hand side. We will do this in the perturbative expansion in sec. 4, which then allows us to identify the correlation length in the presence of finite-width corrections. However, if one is content with MFT at N→∞N\rightarrow\infty, then there is an alternative way forwards that does not require a solution for Ghh(τ)G_{hh}(\tau) at all: the basic idea, as pioneered in, e.g., Sompo , is to examine the response of the system to fluctuations, whose stability is governed by the largest Lyapunov exponent. Following helias2019statistical , our strategy is to construct a double-copy of the mean-field theory obtained above, and consider the correlator between neurons in different copies as an infinitesimal fluctuation about the MFT correlator between neurons in the same copy. At the most basic level, the idea is to fix h(0)h(0) to be the same in both copies – which have initially identical parameters – and examine how h(t)h(t) (or rather, GhhG_{hh}) differs as a function of time; a similar strategy was used in poole2016exponential ; schoenholz2017deep . A formal parallel with the time-independent Schrödinger equation emerges, which relates the largest Lyapunov exponent to the ground-state energy of the system; as we will see, the onset of chaos corresponds to the point at which the ground-state energy becomes negative.

Denote the MFT correlator ⟨hi(t1)hi(t2)⟩=Ghh(t1 ⁣− ⁣t2)=Ghh(τ)≕c(τ)\langle h_{i}(t_{1})h_{i}(t_{2})\rangle=G_{hh}(t_{1}\!-\!t_{2})=G_{hh}(\tau)\eqqcolon c(\tau), and extend this notation to two identical copies of the system in the obvious way, namely cαβ(t1,t2)≔⟨hiα(t1)hiβ(t2)⟩c^{\alpha\beta}(t_{1},t_{2})\coloneqq\langle h_{i}^{\alpha}(t_{1})h_{i}^{\beta}(t_{2})\rangle, where α,β\alpha,\beta label the copies (so that α=β\alpha=\beta reduces to the single-copy case considered above). Note that at large NN,

as a consequence of the self-averaging behavior discussed above. We may then consider the mean-squared distance between two trajectories (i.e., between two identically-prepared copies of the system):

Note that in general c12≠c21c^{12}\neq c^{21}; only at equal times do we have c12(0)=c21(0)c^{12}(0)=c^{21}(0), so that d(t,t)d(t,t) reduces to the usual mean-squared distance. Our goal in this section is to understand the dynamics of d(t1,t2)d(t_{1},t_{2}). In particular, we expect that if the system is chaotic, d(t1,t2)d(t_{1},t_{2}) should have a characteristic divergence governed by the largest Lyapunov exponent.

Since the copies are initially uncoupled, we may immediately write down the partition function analogous to (9)

We now proceed as above, adding labels to the auxiliary variables X→Xαβ\mathfrak{X}\rightarrow\mathfrak{X}^{\alpha\beta} in (24) in order to accommodate the additional mixed fields with α≠β\alpha\neq\beta, i.e.,

We now perform the saddlepoint approximation as before, and keep the leading-order contribution to obtain the mean-field result. The minimality condition yields the following equations of motion for the auxilliary fields:

Substituting the minima (61) into the action, we obtain the MFT for two identical copies of the network:

where, in an extension of the single-copy notation (35), we have defined

We now seek the propagators Gαβ(t1,t2)G^{\alpha\beta}(t_{1},t_{2}) of the double-copy MFT, defined as the matrix elements of the right-inverse of Ξαβ(t1,t2)\Xi^{\alpha\beta}(t_{1},t_{2}):

This yields the following three equations for the non-vanishing components of GG:

Formally, this is the same result we obtained in the single-copy case, cf. (41); the difference lies in the sum over all α,β\alpha,\beta in the action (62), which picks up cross-correlations between the copies. As before, it is convenient to express these equations for the components of GG in terms of the temporal difference τ≔t1 ⁣− ⁣t2\tau\coloneqq t_{1}\!-\!t_{2} (where possible), so that the off-diagonal elements are given by

while the non-zero diagonal element becomesWe note that this corresponds to eq. (167) of helias2019statistical ; we have merely derived it via the standard approach.

Observe that the α ⁣= ⁣β\alpha\!=\!\beta components of this equation are precisely (43), as expected, and hence the solution for the autocorrelation Ghhαα=cαα(τ)G_{hh}^{\alpha\alpha}=c^{\alpha\alpha}(\tau) is the same as for the single-copy case c(τ)c(\tau) above. We may say that in this case, the system resides at a fixed point at which the trajectories hα(t)=hβ(t)h^{\alpha}(t)=h^{\beta}(t) for all time, and hence d(t,t)=0d(t,t)=0 ∀ t\forall\,t (since c11=c22=c12c^{11}=c^{22}=c^{12}).

Our interest is then in the stability of this fixed point. In particular, instability to fluctuations will cause d(t1,t2)d(t_{1},t_{2}) to grow, indicating chaotic dynamics. Conversely, a stable fixed point implies that the system eventually relaxes back to d(t1,t2)=0d(t_{1},t_{2})=0, so that perfect correlation is restored. Following helias2019statistical , our strategy will be to take the autocorrelation c(τ)=c11(τ)=c22(τ)c(\tau)=c^{11}(\tau)=c^{22}(\tau) – given implicitly by (69) with α=β\alpha=\beta, which is equivalent to the single-copy solution (43) – as a fixed background solution, and compute the cross-correlator c12(t,s)≔Ghh12(t,s)c^{12}(t,s)\coloneqq G^{12}_{hh}(t,s) to linear order in the expansionWe have changed to t,st,s rather than t1,t2t_{1},t_{2} to avoid confusion with the copy labels α=1,2\alpha=1,2, so that henceforth τ=t−s\tau=t-s.

where η≪1\eta\ll 1 is some small expansion parameter.

To proceed, it is convenient to introduce the following notation for the two-point correlators of ϕ(h)\phi(h):

where c0c_{0}, c≡cτc\equiv c_{\tau} are the components of the covariance matrix of the single-copy in (44), and c0≡c011=c022c_{0}\equiv c_{0}^{11}=c_{0}^{22}, c12c^{12} are the corresponding components for the double-copy:Note that the lower off-diagonal component is G21(s,t)=G12(t,s)G^{21}(s,t)=G^{12}(t,s).

We can then Taylor expand (69) and identify terms order by order to determine the linear contribution k(t,s)k(t,s). On the left-hand side, we simply substitute (70) for Ghh12=c12G_{hh}^{12}=c^{12}. On the right-hand side, we take the input data to be the same for both copies, i.e., x1=x2x^{1}=x^{2}, so that Cxx12=CxxC_{xx}^{12}=C_{xx} and Cφφ12=CφφC_{\varphi\varphi}^{12}=C_{\varphi\varphi}; then we only need to expand Cϕϕ12C_{\phi\phi}^{12}:

where the second line follows via Price’s theorem (50), with ϕ′=∂hϕ(h)\phi^{\prime}=\partial_{h}\phi(h). Upon substituting these expansions into (69), we recover (43) at O(1)\mathcal{O}(1), which leaves

2 The largest Lyapunov exponent

We have found that at linear order in fluctuations about the fixed point, the mean-squared distance between copies (54) is

with kk given by (74). We now wish to solve (74) in order to determine how the distance behaves as a function of time.

Since (74) is precisely of the same form as that in helias2019statistical , we may simply rephrase their derivation here. We begin by expressing (74) in terms of the “lightcone coordinates”

To solve this equation, we make the separation ansatz

One can think of this as a Euclidean analogue of the usual plane-wave ansatz with phase factor e−iλue^{-i\lambda u}; the significance of the constant λ\lambda will be discussed below. We then have

and V′′=∂c2VV^{\prime\prime}=\partial_{c}^{2}V is the second derivative of the potential defined in (51):Note that VV is the potential energy for the autocorrelation c(τ)c(\tau), while −V′′-V^{\prime\prime} is the potential energy for the fluctuation amplitude ψ(τ)\psi(\tau).

Note fϕ′f_{\phi^{\prime}}, and hence the potential term V′′V^{\prime\prime}, depend on τ\tau via the autocorrelation c=c(τ)c=c(\tau).

Formally, (80) is the time-independent Schrödinger equation Hψ=EψH\psi=E\psi with Hamiltonian

Since we seek normalizable (i.e., bound) states, and the energies of bound states are quantized, the solution ψ(τ)\psi(\tau) will be characterized by a discrete set of eigenvalues,

As per our ansatz (79), this in turn implies a discretized set of characteristic or Lyapunov exponents λn\lambda_{n} which control the growth of k(τ,u)k(\tau,u). In particular, the growth rate will be governed by the largest Lyapunov exponent, given by the ground state energy E0E_{0}:

The unstable regime is characterized by λ0>0\lambda_{0}>0, so that d(t1,t2)d(t_{1},t_{2}) grows exponentially with time. Note that if γ<0\gamma<0, this will true for all possible values of the ground state energy E0E_{0}. Therefore, in order to study networks at the edge of stability, we will henceforth consider the case with γ>0\gamma>0 (cf. helias2019statistical , which considered γ=1\gamma=1). We must then determine the point at which the ground state energy becomes negative, E0<0E_{0}<0. Following helias2019statistical , our strategy will be to construct a normalizable solution with E=0E=0, and derive a necessary condition on the existence of lower-energy ground states.

To proceed, observe that if we differentiate (52) with respect to τ\tau for τ≠0\tau\neq 0, and denote ∂τcτ=c˙τ\partial_{\tau}c_{\tau}=\dot{c}_{\tau}, we obtain

where the second step follows from applying the chain rule to V′V^{\prime}. Comparing this with the Schrödinger equation (80), we see that c˙(τ)\dot{c}(\tau) is an eigensolution of ψ(τ)\psi(\tau) everywhere except at τ=0\tau=0, with E=0E=0. To construct a valid solution for all τ\tau, we must address the discontinuity at the origin caused by the delta function in (52). To do so, define

and impose smoothness at τ=0\tau=0 (i.e., that yy belong to differentiability class C1C^{1}). Denoting the approach to zero from above and below respectively by 0±0^{\pm}, the latter condition amounts to the constraint that y˙(0+)−y˙(0−)=0\dot{y}(0^{+})-\dot{y}(0^{-})=0:

Therefore, the existence of such a solution requires

This is a necessary but not sufficient condition for the solution to be valid: since y(τ)y(\tau) has zero total energy by construction, we must also impose that the potential be less than or equal to zero at the extremum given by (89); see helias2019statistical for an in-depth discussion on this point. Recall from (83) or footnote 29 that the potential for this solution is −V′′-V^{\prime\prime}. Hence,

When this inequality is saturated, y(τ)y(\tau) must be the ground state with E0=0E_{0}=0. Away from saturation, the energy of the ground state is E0≤0E_{0}\leq 0. Intuitively, as the potential becomes more negative, there is more room for lower-energy states. While this does not technically suffice to show the existence of a strictly negative energy ground state, it does provide a necessary condition on the edge of stability for the system, since the corresponding Lyapunov exponent is greater than or equal to zero, λ0≥0\lambda_{0}\geq 0. In fact, this is consistent with the condition identified in previous literature: recalling the definition of the two-point correlator fϕf_{\phi} (cf. (71)) in terms of the Gaussian integral (48) with cτ=0c_{\tau=0} (i.e., ρ=1\rho=1) we may equivalently express (90) in the form

where the second integral over hbh_{b} has evaluated to unity. Note that the quantity on the left-hand side is exactly that denoted χ1\chi_{1} in poole2016exponential ; schoenholz2017deep and serves as a probe of stability for the fixed-point ρ=1\rho=1 in their analysis. Comparing this expression with eq. (7) in poole2016exponential (which is eq. (5) in schoenholz2017deep ), we see that our result precisely recovers the condition for chaos in Gaussian random networks, which corresponds to γ=1\gamma=1 and σA2=0\sigma_{A}^{2}=0, cf. (2). However, as alluded above, and will be discussed in more detail below, mean-field theory is not exact in the infinite-width limit; indeed, it is perhaps surprising that the MFT result (91) agrees with the result from the CLT obtained in the aforementioned works. In general, we must consider the full QFT, in which the MFT correlator c(τ)c(\tau) represents only the tree-level contribution.

Before turning to perturbative QFT in the next section, we note that in chen2018dynamical it was reported that in the case of RNNs, the injection of time-series dataThe authors of chen2018dynamical refer to this as “noise” from the inputs, but we have reserved that term for the true noise encoded in g(h,x)g(h,x), cf. (1). xx destroys the ordered phase, and consequently there is no order-to-chaos phase transition. This arises due to an extra factor that appears in their analogue of (91) containing possible correlations in xx. In our case, however, these are contained in the correlator Cxx(τ)C_{xx}(\tau), which does not affect the condition for criticality in the MFT approximation (though it does of course affect the explicit form of c(τ)c(\tau)). Further studies are therefore needed to elucidate the potential role of the data xx, or the introduction of other forms of noise more generally, in modifying the edge of chaos in different network models.

Perturbative corrections

As discussed in the introduction, the network becomes a Gaussian process in the infinite-width (N→∞N\rightarrow\infty) limit. At finite NN, deviations from Gaussianity require the addition of interaction terms, corresponding to the fact that higher cumulants no longer precisely vanish. In the language of quantum field theory, these correspond to loop corrections to the leading-order or tree-level result above, which have the potential to shift the “classical” edge of stability, which is the chief object of interest here. Indeed, empirical evidence schoenholz2017deep ; Erdmenger:2021sot suggests that the critical point in real-world networks is noticeably displaced from the CLT prediction, which has practical relevance for initialization. Even away from criticality, the correlation length – which sets the depth scale beyond which trainability sharply falls off – deviates substantially from the large-NN result—see for example fig. 5 in schoenholz2017deep , fig. 2 in xiao2018dynamical , or fig. 6 in Erdmenger:2021sot . It is therefore of significant practical as well as theoretical interest to quantify the deviations from Gaussianity in networks of finite width.

To that end, in this section we will compute both the leading O(1)\mathcal{O}(1) and subleading O(T/N)\mathcal{O}(T/N) corrections to the two-point correlator c(τ)=⟨h(t)h(s)⟩c(\tau)=\langle h(t)h(s)\rangle, which will then allow us to identify the loop-corrected correlation length for small ∣τ∣|\tau|. As discussed in the introduction and in more detail below, the result holds only at weak ’t Hooft coupling,In fact, we shall require both σw\sigma_{w} and σb\sigma_{b} to be sufficiently small relative to γ\gamma, as will be explained in more detail below. and the perturbative expansion assumes T/N<1T/N<1; the latter is the regime of practical relevance for modern deep neural networks Roberts:2021fes .Note that the authors of Roberts:2021fes referred to T/N→∞T/N\rightarrow\infty as the “chaotic limit”, which differs from the use of that terminology here, but the important point is that the perturbative expansion cannot be performed if T/NT/N is large. Conversely, T/N→0T/N\rightarrow 0 simply recovers the Gaussian theory, including the O(1)\mathcal{O}(1) correction to be computed in subsec. 4.3.1. In this sense, the O(1)\mathcal{O}(1) contributions are not bona fide interactions, but finite-temperature fluctuations in the statistical ensemble, as we explain in sec. 5. It would be interesting to explore these connections to O(N)O(N) theory in more detail, e.g., to see whether the analysis can be extended beyond the perturbative (weak-coupling) regime we consider here.

Since we will compute the two-point function explicitly, there is no need to employ the double-copy system used in the MFT analysis in the previous section; it is sufficient to examine the correlation length in a single copy of the full QFT for small times. The reason for this can be traced back to (70), which requires that the fluctuation ηk(t,s)∼ηeλT\eta k(t,s)\sim\eta e^{\lambda T} be small relative to the background solution c(τ)c(\tau). In other words, we do not demand that the two systems will diverge for all time, or in the single-copy theory, that the correlator will grow exponentially without bound. In the language of RG, we are considering infinitesimal perturbations about the critical point by some relevant operator(s), which will trigger a flow to a new, non-trivial fixed point in parameter space. This behavior was observed in poole2016exponential , see in particular fig. 2 therein, in which networks in the chaotic phase converge to some parameter-dependent fixed point near, but not necessarily at, c(τ)=0c(\tau)=0.

To keep the theory as simple as possible while still capturing the essential aspects, we shall consider the partition function for the (single-copy) theory with A=B={A=B=}. Relative to (24) however, it is extremely convenient to modify the auxiliary field to

and swap the attachment of the prefactor within the delta function-imposition of the constraint, i.e.,

A consistent solution to these equations is

Note that xi(t)x_{i}(t) is not constrained by its eom (which reduces to 0 ⁣= ⁣00\!=\!0), and thus we are free to select an arbitrary vev for the inputs; for simplicity (since we shall have in mind a nonlinear activation function with φ(0)=0\varphi(0)=0, see below), we shall take xi,0α(t)=0x_{i,0}^{\alpha}(t)=0 as well. We may then expand the fields around these background values by making the following shifts in the action:

and similarly for φ(x)\varphi(x). Our theory is then

where the quadratic part of the action is – again with implicit sums over repeated neuron indices –

In the next subsection, we will obtain the propagators for the theory given by (105). Unlike the MFT analysis in the previous section however, we will solve for the propagators explicitly, in order to proceed to obtain the finite-width corrections in subsections (4.3.1) and (4.3.2).

To find the propagators of the theory (105), we first introduce the two-component fields

where the operators Ξ,Υm\Xi,\Upsilon_{m} with m∈{w,u}m\in\{w,u\} are defined as

As in the previous MFT analysis, the propagators are obtained as the elements of the Green functions (i.e., the inverse operators) for the operators Ξ,Υm\Xi,\Upsilon_{m} appearing in the Gaussian part of the action, cf. (65). For Υm\Upsilon_{m}, we have

Substituting in the definition of the delta function (118) and imposing that the result hold for all momenta ω1,ω2\omega_{1},\omega_{2}, we find the momentum space propagator

and for the non-zero off-diagonal element,

where we have performed the same ∂t1 ⁣= ⁣−∂t2\partial_{t_{1}}\!=\!-\partial_{t_{2}} trick as before, cf. (67), again assuming translation invariance of the correlators. As a quick sanity check on the consistency of our expansion, observe that (after adjusting for the difference in normalization, cf. (92)) we have precisely recovered the MFT results (68), (69), as expected, since the former correspond to the tree-level contribution in perturbation theory.

As usual, it is more convenient to work in momentum (i.e., frequency) space, so we shall proceed by Fourier transforming the above expressions to obtain the momentum space propagators. We shall use the standard high-energy theory convention in which factors of 2π2\pi are attached to the momentum measure, and denote the momentum space functions with hats, i.e.,

where in the last step, the only non-vanishing contribution comes from the pole at ω=−iγ\omega=-i\gamma; recalling from our discussion below (85) that γ ⁣> ⁣0\gamma\!>\!0 in the regime of interest, this lies in the lower half-plane, and hence requires t ⁣< ⁣st\!<\!s in order to close the contour; the negative sign then arises from encircling the pole clockwise. Similarly,

Turning now to the off-diagonal term (116), we must contend with the fact that, from the eom (99), W0\mathfrak{W}_{0} will be a function of GhhG_{hh} when we perform the perturbative expansion. For consistency, let us work to fourth order in hh as above; then

The first term on the right-hand side is simply NGhh(τ)NG_{hh}(\tau), where τ≔t1 ⁣− ⁣t2\tau\coloneqq t_{1}\!-\!t_{2}. For the remaining term, since we are expanding around a free (Gaussian) theory,That is, the full expectation values are computed with respect to the interacting theory (105), but when evaluating them, we expand in terms of the coupling (i.e., N/σw2\sqrt{N/\sigma_{w}^{2}}), so that the leading contribution is (123), in which the expectation values are taken with respect to the Gaussian theory. we can apply Wick’s theorem to write this as a sum of products of two-point functions. Let us temporarily drop the neuron indices, and instead employ the shorthand ht≔hi(t)h_{t}\coloneqq h_{i}(t); then the four-point function simplifies to

where Ghh(0)=Ghh(t,t)G_{hh}(0)=G_{hh}(t,t) may be solved for self-consistently, cf. (135). Therefore, to this order,

where for compactness we have defined the effective variance

for reasons which will become clear in subsec. 4.3.1. Note that if we had worked to next (sixth) order in hh, we would obtain an additional term of the form

where the combined combinatoric factor for the nn-point correlator is (n ⁣− ⁣1)!!(n\!-\!1)!! (to see this, choose any point at random; there are (n ⁣− ⁣1)(n\!-\!1) ways to contract it, which leaves (n−3)(n-3) choices for the second pair, and so on). This would lead to a cubic differential equation for Ghh(τ)G_{hh}(\tau), in place of the much simpler linear equation (128). To avoid this – and the associated explosion of possible Feynman diagrams – we have limited ourselves to only the first two orders in the Taylor expansion; we comment on this truncation in more detail below. Hence, substituting (125) into (116), we have

where for simplicity we will henceforth assume that g(τ)g(\tau) is constant (which we can absorb into κ\kappa, and hence set g=1g=1), and have written U0\mathfrak{U}_{0} as though it were time-translation invariant.This amounts to assuming a sufficient degree of temporal uniformity in the injected data. In fact, we shall shortly assume that U0\mathfrak{U}_{0} is time-independent, in order to perform the inverse Fourier transform. In principle, this is not required for the theory, but one must otherwise provide the form of the correlator U0\mathfrak{U}_{0} as an input to the following analysis to obtain a closed-form result. Fourier transforming with respect to τ\tau, this then becomes

We can then Fourier transform this back to real space, where the sign of τ=t ⁣− ⁣s\tau=t\!-\!s determines the contour (i.e., which pole we encircle):

The second term is trivial on account of the delta function:

Lastly, by the convolution theorem, the third and final term can be expressed as

This is as far as we can evaluate this term without further information about the data U0\mathfrak{U}_{0}. To obtain a closed-form result, we shall take U0\mathfrak{U}_{0} to be time-independent; cf. footnote 36. Summing these contributions, the result for the propagator is

The form of the two-point correlator allows us to immediately identify the correlation length at tree-level:

As discussed in the introduction, the critical point is defined by ξ0→∞\xi_{0}\rightarrow\infty, which occurs when

As an aside, we note that we may express the first term in (135) as

2 Feynman rules

In order to compute the perturbative corrections to the tree-level propagator (135), we must deduce the Feynman rules for the theory. To that end, the interaction part of the action (107) may be written in terms of the two-component fields (108) as

At a glance, it appears that the only NN-dependence is in the coupling constants, such that a diagram with 2m2m vertices will contribute at O(1/Nm)O(1/N^{m}). However, in analogy with the O(N)O(N) vector model, we must sum over any internal neuron indices, which implies that internal loops have the potential to give rise to additional factors of NN that disrupts this simple counting. In fact, it turns out that the leading correction to the tree-level (MFT) result is due to an infinite number of cactus diagrams that all contribute at O(1)\mathcal{O}(1); we shall begin with these in the next subsection.

Therefore, working to second-order in the expansion of tanh⁡\tanh (but keeping terms only up to quartic order in h,xh,x; see above), we have the following Feynman rules for the theory:

h(t)h(t) propagating to h(s)h(s): \quad G_{hh}(t-s)\;=\raisebox{-0.35pt}{\includegraphics[scale={1.2}]{Ghh.png}}

Consider all possible arrangements at the vertices; e.g., include a copy of the diagram with q21(t1,t2,t3,t4)→q21(t2,t1,t3,t4)q_{21}(t_{1},t_{2},t_{3},t_{4})\rightarrow q_{21}(t_{2},t_{1},t_{3},t_{4}) only if this produces a distinct diagram.

Combinatorics: consider all possible ways to contract internal legs; e.g., in the 5-pt vertex q12′q_{12}^{\prime}, we can form loops by connecting pairs of incident hh legs in 3 different ways, cf. (124).

For each internal loop with a free neuron index, we have an additional factor of NN.

Add the contributions of all diagrams that contribute at the desired order in 1/N1/N.

3 Linear models

To organize the presentation, we shall first consider perturbative corrections for linear models, i.e., ϕ(h)≈h\phi(h)\approx h. That is, we consider only the leading term in the Taylor series (123). In this case we have only the 3-pt vertices qabq_{ab} in (141), which greatly simplifies the diagrammatic expansion. In the next two subsections, we will compute both the leading O(1)\mathcal{O}(1) and subleading O(T/N)\mathcal{O}(T/N) contributions to the two-point function (138). We will then generalize the analysis to include the 5-pt vertices q12′q_{12}^{\prime} corresponding to the subleading h4h^{4} term in (123) in subsec. 4.4.

As in the O(N)O(N) model tHooft:1973alw ; Brezin:1972se ; Coleman:1985rnk ; brezin1993large ; tHooft:2002ufq ; Zinn-Justin:2002ecy ; Moshe:2003xn , the leading correction to the tree-level propagator Ghh(τ)G_{hh}(\tau) comes from an infinite series of so-called cactus diagrams, each of which contributes at O(1)\mathcal{O}(1). Intuitively, these quantify fluctuations from typicality in the ensemble of networks, and vanish in the limit where the ’t Hooft coupling σw2→0\sigma_{w}^{2}\rightarrow 0, as we discuss in more detail in sec. 5. Crucially, the contribution from these diagrams remains even as N→∞N\rightarrow\infty, and thus represents an important effect in networks of arbitrary size.This is the reason that MFT is generically not what one obtains from the CLT, contrary to some indications in the literature. In the Ising model for example, MFT amounts to replacing each degree of freedom, together with its nearest-neighbor interactions, with an effective degree of freedom – the so-called mean field – in which these interactions have been averaged over. This ignores long range interactions which become important near criticality, and is known to give incorrect results in low dimensions, while the CLT is agnostic about both. The first three diagrams in the infinite series, to linear order in ϕ(h)\phi(h), are illustrated in fig. 1. Note that in each case, we have NN choices for the neuron that runs in each loop, which precisely cancels the factor of 1/N1/N from each pair of vertices.

where in the penultimate step, we have made the change of variables

where the exponent ∗n*n denotes that the base is convolved nn times. However, since convolutions correspond to products in momentum space, it is more convenient to instead work with the Fourier transform

where whether cc, ff, fˉ\bar{f} are position or momentum space propagators will be indicated by the argument (τ\tau or ω\omega, respectively).

We can now sum the infinite series to obtain the correction from all O(1)\mathcal{O}(1) cactus diagrams in fig. 1. Including the bare propagator c(ω)c(\omega) as n ⁣= ⁣0n\!=\!0, we have

where we have substituted in the momentum space propagators (120), and summed the geometric series subject to the convergence condition

3.2 Infinite 𝒪​(T/N)𝒪𝑇𝑁\mathcal{O}(T/N) mushrooms

The subleading correction to the Gaussian propagator is the order at which we observe manifest finite-width effects. Here we will also find that the more relevant expansion parameter is T/NT/N rather than 1/N1/N itself, in agreement with Roberts:2021fes . We shall first detail the computation of a generic, one-particle irreducible (1PI) O(T/N)\mathcal{O}(T/N) diagram, and then use this to compute all contributions (including non-1PI diagrams) to the propagator at O(T/N)\mathcal{O}(T/N) below.

whence the previous expression simplifies to

While it is possible to sum the infinite series to obtain the contribution from all 1PI mushroom diagrams, this does not yet include all contributions at O(T/N)\mathcal{O}(T/N), since we must also consider non-1PI diagrams—in particular, those involving an arbitrary nn-loop cactus, followed by an n ⁣= ⁣1n\!=\!1 mushroom (or the reverse). To accomplish this task, let us introduce the following elegant recursion relation, as a warm-up for the nonlinear analysis in subsec. 4.4: let represent the hhhh propagator including all O(1)\mathcal{O}(1) and O(T/N)\mathcal{O}(T/N) corrections, and denote its momentum space expression by X(ω)X(\omega). The dots at either side of the circle are to indicate that the latter subsumes half of the external legs, that is, that the external legs can be either cc, or ff, fˉ\bar{f}. The diagrammatic recursion relation for X(ω)X(\omega) is then

where X(0)X^{(0)} and X(1)X^{(1)} respectively denote the O(1)\mathcal{O}(1) and O(T/N)\mathcal{O}(T/N) contributions to XX in the expansion

where we have pulled out the factor of γ\gamma simply to make T/NT/N dimensionless, cf. (169). Note that XX includes the bare propagator, and that we can generate any O(1)\mathcal{O}(1) or O(T/N)\mathcal{O}(T/N) diagram by recursively substituting for XX, X(0)X^{(0)} on the right-hand side. For example, to generate an n ⁣= ⁣1n\!=\!1 cactus, we place the first diagram on the right-hand side (the bare propagator) in the space for XX in the second diagram; we then take this diagram and substitute it in again to generate an n ⁣= ⁣2n\!=\!2 cactus, and so on. On the second line, the circles containing X(0)X^{(0)} indicate that only O(1)\mathcal{O}(1) diagrams may be recursively inserted there, since the presence of the explicit n ⁣= ⁣1n\!=\!1 mushroom means that any further mushroom insertions would make the resulting diagram O(T2/N2)\mathcal{O}(T^{2}/N^{2}).

Now, given the analysis of the 1PI diagrams above, the computation of this expression is quite straightforward. Consider the second diagram on the right-hand side: this takes the form of (147) with n ⁣= ⁣1n\!=\!1 and c(ω)→X(ω)c(\omega)\rightarrow X(\omega). Similarly, the sum of the two diagrams on the second line is given by (152) with n ⁣= ⁣1n\!=\!1 and c(ω)→X(0)(ω)c(\omega)\rightarrow X^{(0)}(\omega). Thus, (153) reads

which we may solve order by order in γT/N\gamma T/N. Expanding XX as in (154) and solving for the O(1)\mathcal{O}(1) contribution, we find

which is precisely the O(1)\mathcal{O}(1) correction obtained in (148), as expected. We then use this to solve for the O(T/N)\mathcal{O}(T/N) contribution:

We emphasize that this expression includes all perturbative O(T/N)\mathcal{O}(T/N) contributions to linear models (that is, to leading order in the Taylor expansion (123)), including diagrams involving an infinite number of loops.

3.3 The loop-corrected correlation length

Adding the results (156) (equivalently (148)) and (157), we have thus found that the loop-corrected two-point function in momentum space, to leading order in T/NT/N, is

With the loop-corrected propagator in hand, we would now like to identify the correlation length in the presence of both O(1)\mathcal{O}(1) fluctuations and O(T/N)\mathcal{O}(T/N) finite-width effects. At a glance, this is obstructed by the mixed exponential and polynomial dependence on τ\tau. However, as explained at the beginning of this section, we do not require an expression for the correlation length valid at all times; rather, it suffices to identify an effective correlation length ξ\xi that governs the evolution of the correlator for small ∣τ∣|\tau| (i.e., small perturbations about the critical point, as in schoenholz2017deep and related works, as well as our MFT treatment in sec. 3).A sufficient but not necessary condition for this is ∣τ∣≪ξ0|\tau|\ll\xi_{0}, which certainly holds near the critical point. Thus, we can identify a meaningful loop-corrected correlation length by first expanding the exponential in (159), collecting terms order by order in ∣τ∣|\tau|, and re-exponentiating to obtain a purely exponential term of the form e−∣τ∣/ξe^{-|\tau|/\xi}. To linear order in ∣τ∣|\tau|, we find

where we have identified the loop-corrected correlation length

4 Nonlinear models

We thus have a recursive sequence of cactus diagrams, which we can evaluate using a similar recursive approach to that in the previous subsection. Let represent the loop-corrected propagator including all possible cacti, allowing both 3-pt and 5-pt interactions, and denote its momentum space expression by Y(0)(ω)Y^{(0)}(\omega). That is, we expand

cf. (154), where here we have used YY in place of XX to denote the inclusion of the subleading term in the expansion of the nonlinearity (123). Then the recursion relation for all O(1)\mathcal{O}(1) diagrams is simply

Implicitly, we also include a copy of the last diagram with the branch attached to the other side of the stem.

Now, the second diagram on the right-hand side is of course simply (147) with n ⁣= ⁣1n\!=\!1 and c(ω)→Y(ω)c(\omega)\rightarrow Y(\omega). For the third, let us first consider the case in which we replace the Y(0)Y^{(0)} in the branch with the bare propagator, resulting in a closed hhhh propagator or petal. Since the temporal endpoints are the same, this simply contributes a factor of −c0≔−c(τ ⁣= ⁣0)-c_{0}\coloneqq-c(\tau\!=\!0), where the negative sign stems from the coupling q12′q^{\prime}_{12}, cf. (142). The factor of 1/31/3 in the latter is precisely cancelled by the 3 ways to contract the two pairs of hh-legs. Importantly, note that the neuron index in the petal is the same as that in the adjacent loop; this can be seen from the indices in (107). Therefore, while petalous vertices gain an extra loop, they contribute at the same order as their apetalous counterparts in the perturbative expansion. Therefore, this diagram – plus the copy with the petal attached to the opposite side of the stem – is given by (147) with σw2→−2σw2c0\sigma_{w}^{2}\rightarrow-2\sigma_{w}^{2}c_{0} and c(ω)→Y(0)(ω)c(\omega)\rightarrow Y^{(0)}(\omega).

This lesson generalizes to the case in which the branch is a recursive cactus of arbitrary complexity: the delta functions within it will collapse all times to those at the vertex at which the branch joins the trunk, so that the entire branch is evaluated at τ ⁣= ⁣0\tau\!=\!0. Hence, the expression for the third diagram on the right-hand side of (163) – plus the copy with the branch attached to the opposite side of the stem – is formally identical to the petalous cactus just described, but with σw2→−2σw2Y0(0)\sigma_{w}^{2}\rightarrow-2\sigma_{w}^{2}Y_{0}^{(0)}, where Y0(0)≔Y(0)(τ ⁣= ⁣0)Y_{0}^{(0)}\coloneqq Y^{(0)}(\tau\!=\!0) includes the bare propagator c0c_{0}. The recursion relation (163) then reads

where we have defined the O(1)\mathcal{O}(1) loop-corrected variance

Solving this for Y(0)Y^{(0)} and recalling from (151) that ffˉ=(ω2+γ2)−1f\bar{f}=(\omega^{2}+\gamma^{2})^{-1}, we obtain the O(1)\mathcal{O}(1)-corrected propagator, including both 3-pt (h2h^{2}) and 5-pt (h4h^{4}) interactions:

Comparing this with (148), we see that the effect of the 5-pt vertex is to modify the effective variance we defined in (126) to (165).

4.2 Branching mushrooms

As before, we must regulate this divergence by imposing a finite cutoff TT, so that the above diagram contains a contribution that scales like T2/NT^{2}/N. At a glance, this appears pathological, but instead highlights the fact that the weak coupling regime is governed by both σw2\sigma_{w}^{2} and σb2\sigma_{b}^{2}; in particular, in addition to the convergence condition σw2<γ2\sigma_{w}^{2}<\gamma^{2} encountered above, we also require σb2<γ2\sigma_{b}^{2}<\gamma^{2}. To see this, observe that by dimensional analysis, the various components of the action (106) have the following mass (inverse time) dimensions:

Unfortunately, these last four diagrams are considerably more complicated than any we have considered above, since they involve a mixture of products and convolutions in both position and momentum space. Let us begin with the first, in comparison to the momentum space expression (150): we have the same factor of −T/2-T/2 from the top-most f(0)=fˉ(0)f(0)=\bar{f}(0) together with the remaining (regulated) integral over τ\tau in the cap, and a net factor of 1/N1/N (1/N21/N^{2} from the vertices, and NN from the internal neuron index). The two qabq_{ab} vertices will contribute a collective factor of (σw/2)2(\sigma_{w}/2)^{2}, while the two qab′q_{ab}^{\prime} vertices will contribute (−σw/3)2(-\sigma_{w}/3)^{2}, cf. (141). The GwG_{w} propagators themselves carry a net factor of 222^{2}, and the freedom to twist the GwG_{w} in the stem contributes an additional factor of 2. Note that we do not have the freedom to twist the horizontal GwG_{w} propagator, but can instead change the orientation of the cap, so that diagrams with either ff or fˉ\bar{f} running along the underside top-most bulb are allowed. We also have a combinatoric factor of 3!3! from the possible ways of connecting the three internal hhhh propagators, and – as mentioned above – can insert a self-similar Y(0)Y^{(0)} to any of them. Finally, the external legs contribute ffˉf\bar{f} as before, so that

For the next diagram in fig. 4, we again have a collective factor of σw4/(2232N2)\sigma_{w}^{4}/(2^{2}3^{2}N^{2}) from the vertices, a factor of 232^{3} from the two GwG_{w} propagators plus the freedom to twist the one in the stem, an ffˉf\bar{f} from the external legs, and f+fˉ=−2γffˉf+\bar{f}=-2\gamma f\bar{f} (in momentum space) from the possible orientations of the cap, and Y(0)Y^{(0)} in place of each of the internal cc propagators. However, while the top-most propagator again evaluates to f(0)=fˉ(0)=−1/2f(0)=\bar{f}(0)=-1/2, we are not quite free to integrate over the remaining vertex position (time), since this will be encountered by the intervertex (Y(0)∗Y(0))(ω)(Y^{(0)}*Y^{(0)})(\omega) propagator, which will thus be evaluated at τ ⁣= ⁣0\tau\!=\!0 (similar to how the delta functions collapse the temporal indices on the branches to X0X_{0}, Y0Y_{0} in the diagrams above). Since Y(0)∗Y(0)Y^{(0)}*Y^{(0)} will generically be some sum of exponentials plus a constant piece, this last is the only divergent contribution that requires us to regulate the integral, and hence carries the sought-after factor of TT. The other, exponential terms will carry no such factors,More precisely, the regulators in all convergent integrals are exponentially suppressed; see sec. 5. and hence contribute at order 1/N1/N in the expansion; we therefore drop them, and keep only the constant × T\,\times\,T part of this convolution, which we denote Tb02Tb_{0}^{2} (so-named because the constant part of the propagator is always the bias-dependent term). Additionally, the other difference relative to the previous diagram is that in place of 3!3! from the intervertex combinatorics, we have 2⋅322\cdot 3^{2}: 3 for which of the legs from one vertex to connect with (3 additional choices for) a leg from the other vertex, and 2 ways to connect the remaining two pairs. Thus, including the overall factor of NN from the internal neuron index, we have

The third diagram in fig. 4 offers a moment’s respite: it is precisely the same as (172). We thus move to the fourth and final diagram, which has −T/2-T/2 from the cap and a net factor of σw4/(2233N)\sigma_{w}^{4}/(2^{2}3^{3}N) from the vertices and neuron index as in the first diagram, and the combinatoric factor of 23⋅2⋅322^{3}\cdot 2\cdot 3^{2} as in the second/third. As for the propagators themselves, observe that by labelling the vertices on either side of the stem u1,u3u_{1},u_{3}, and the vertex on the underside of the horizontal GwG_{w} propagator u2u_{2}, the two possible orientations of the diagram readRecall from (112) that the temporal indices on either end of the GwG_{w} propagators are identified by virtue of the delta functions.

which one can see by traversing the diagram from left to right, and

which one can see by traversing the diagram from right to left, with t↔st\leftrightarrow s and u1↔u3u_{1}\leftrightarrow u_{3}. Therefore,

where in the last step we have Fourier transformed to momentum space. Prior to this, since in the first line f+fˉf+\bar{f} is evaluated in position space, (121) and (122) imply

With the form of these 1PI diagrams in hand, we can now proceed to consider all possible contributions to c(ω)c(\omega) from both 1PI and non-1PI diagrams. To do so, let us extend the diagrammatic notation introduced in subsubsec. 4.3.2 to include 5-pt interactions, so that represents the loop-corrected propagator up to O(T/N)\mathcal{O}(T/N) and subleading order in the expansion of the nonlinearity (123), and denote its momentum space expression by Y(ω)Y(\omega), cf. (162). We then have the recursion relation

Let us consider the various contributions to this expression in turn. From our analysis in the previous subsubsection, we know that the first two cactus-like diagrams are collectively given by (147) with c(ω)→Y(ω)c(\omega)\rightarrow Y(\omega) and σw2→σ^w2=σw2(1−2Y0(0))\sigma_{w}^{2}\rightarrow\hat{\sigma}_{w}^{2}=\sigma_{w}^{2}(1-2Y_{0}^{(0)}). Similarly, for the third cactus diagram, we have c(ω)→Y(0)(ω)c(\omega)\rightarrow Y^{(0)}(\omega) (since allowing Y(1)Y^{(1)} would make this diagram O(T2/N2)\mathcal{O}(T^{2}/N^{2})) and σw2→−2σw2γTNY0(1)\sigma_{w}^{2}\rightarrow-2\sigma_{w}^{2}\tfrac{\gamma T}{N}Y_{0}^{(1)}; note that we are including both possible choices for the side at which to attach the branches. The next two diagrams on the second row are collectively given by (152) with n ⁣= ⁣1n\!=\!1, c(ω)→Y(0)(ω)c(\omega)\rightarrow Y^{(0)}(\omega), and σw2→σ^w2\sigma_{w}^{2}\rightarrow\hat{\sigma}_{w}^{2}. Similarly, the first diagram on the third row is given by (167) with c(ω)→Y(0)(ω)c(\omega)\rightarrow Y^{(0)}(\omega); note that there is no possibility to attach branches, since the only explicit 5-pt vertex is already exhausted. Again, we are including both possible orientations for these three diagrams. Lastly, we have the four diagrams in fig. 4 with c(ω)→Y(ω)c(\omega)\rightarrow Y(\omega) and no further branching possibilities, which we have already given in (171), (172), and (175). Collecting results, we thus obtain the following recursive expression for Y(ω)Y(\omega):

which is readily solved, at least formally, to yield

where for compactness we have suppressed the ω\omega dependence, it being understood that these expressions are written in momentum space. The expression (179) is the analogue of (155) in the presence of 5-pt (h4h^{4}) interactions arising from the subleading term in the Taylor expansion of the nonlinearity, cf. (123), and can likewise be solved order by order in γT/N\gamma T/N. At O(1)\mathcal{O}(1), (179) reduces to

which is precisely the O(1)\mathcal{O}(1)-corrected propagator obtained in (166), as expected.

with Y(0)Y^{(0)} replaced by (180), and where for compactness we have absorbed the pseudo-initial conditions into

where σ^w2\hat{\sigma}_{w}^{2} was defined in (165). It then remains to compute Y(0)∗Y(0)∗(ffˉ){Y^{(0)}}*{Y^{(0)}}*(f\bar{f}), b02b_{0}^{2}, and Y(0)∗3{Y^{(0)}}^{*3}, which we do in appendix B; the results are given in (201), (202), and (204), respectively. The explicit expression for Y(1)Y^{(1)} that we obtain upon substituting these into (181) is however exceedingly lengthy, so we refrain from displaying it here. Nonetheless, we now have all the ingredients to obtain the loop-corrected propagator to linear order in T/NT/N, cf. (162), which enables us to define an effective correlation length in the next subsubsection.

4.3 The loop-corrected correlation length

Having computed the loop-corrected propagator (162) with (180) and (181), including both the leading and subleading terms in the expansion (123) of the nonlinearity ϕ(h)\phi(h), we now wish to repeat the analysis in subsubsec. 4.3.3, in which we identified a loop-corrected correlation length by expanding in small ∣τ∣|\tau|. That is, upon inverse Fourier transforming to

we again obtain an expression involving multiple different exponentials. Following the logic below (159), we therefore approximate the loop-corrected propagator for small ∣τ∣|\tau| as

where the constants AA, BB are given by

and the loop-corrected correlation length at small ∣τ∣|\tau| is

where in the present case, one finds that ∂∣τ∣Y(1)(0)=0\partial_{|\tau|}Y^{(1)}(0)=0. Note that taking the limit τ→∞\tau\rightarrow\infty in BB simply isolates the constant part of the corresponding expression, since all exponentials are decaying. As above, the explicit expressions for the components of YY on the right-hand sides of (185) and (186) are rather lengthy, but are given in appendix C.

Discussion

In this work, we have explicitly constructed the quantum (statistical) field theory corresponding to the general class of networks described by (1), which includes both RNNs and deep MLPs. Relative to previous works on the nascent NN-QFT correspondence that take a phenomenological perspective, we have pursued a more fundamental or bottom-up approach, using well-known methods in statistical field theory to derive the partition function for an ensemble of random networks. This has led us to several intriguing parallels with well-studied O(N)O(N) vector models and the perturbative expansion in Yang-Mills/QCD, and it would be interesting to study these formal similarities in more detail. For convenience, we have summarized the elements of the NN-QFT dictionary in appendix A.

At a physical level, the interpretation of the O(T/N)\mathcal{O}(T/N) corrections is fairly clear. As expected on general grounds, and explored quantitatively in Halverson:2020trp ; Yaida:2019sjo ; Roberts:2021fes , the Gaussian (N→∞N\rightarrow\infty) limit does not suffice to describe real-world networks at finite width, whose distributions (i.e., actions) include effective interaction terms corresponding to higher cumulants. These finite-width effects are of both theoretical and practical relevance, and the depth-to-width ratio T/NT/N was identified as an important emergent scale in Roberts:2021fes . Note however that, as mentioned in sec. 4.4, we can in fact have corrections at any order in Tm/NnT^{m}/N^{n} with 0≤m≤n0\leq m\leq n. While those with m ⁣= ⁣nm\!=\!n – such as the O(T/N)\mathcal{O}(T/N) term that we have computed here – will dominate in the N→∞N\rightarrow\infty limit, terms with m≠nm\neq n can become comparably important in networks of finite size; for example, if T∼10T\sim 10 and N∼100N\sim 100, then O ⁣(T3/N3)∼O ⁣(T/N2)\mathcal{O}\!\left(T^{3}/N^{3}\right)\sim\mathcal{O}\!\left(T/N^{2}\right). Physically, the effect is the same: non-Gaussianities accumulate with increasing depth, and are suppressed with increasing width. However, this suggests that the precise interplay between the two may be more subtle.Note that since TT is dimensionful, the depth of the network is measured in units of γ\gamma, cf. (169); e.g., an MLP has γT\gamma T layers.

Additionally, we have identified a dominant O(1)\mathcal{O}(1) correction that persists even at infinite width. It is unclear whether this is implicitly included in the results from the central limit theorem (CLT) in poole2016exponential ; schoenholz2017deep and related work, but regardless represents an important and novel contribution in the field-theoretic approach. While we have not proven this,An in principle straightforward albeit computationally prohibitive way to do this would be to compute all (or a convincing number of) higher-point correlators and show that they reduce to sums of products of two-point correlators as per Wick’s theorem. we expect – based on consistency with the CLT, i.e., the vanishing of interactions in the N→∞N\rightarrow\infty limit – that the O(1)\mathcal{O}(1) contribution does not alter the Gaussian nature of the distribution, and instead merely changes the variance from (126) to (165). Therefore, at a physical level, the O(1)\mathcal{O}(1) contribution does not represent bona fide interactions per se, but rather quantifies fluctuations from typicality in the ensemble of networks.

To see this, note that since we are working in Euclidean signature, our action is proportional to β∼1/ℏ\beta\sim 1/\hbar, where β\beta is the inverse temperature.Throughout this paper, we have followed the theoretical physics convention of working in civilized units, in which fundamental constants such as ℏ\hbar, cc, GNG_{N}, etc. are unity. As in the O(N)O(N) model, the ’t Hooft coupling σw∼ℏ\sigma_{w}\sim\hbar in order that the action be dimensionless, and thus higher-order terms in the perturbative expansion carry more factors of ℏ\hbar. In QFT in Lorentzian signature, this reflects the fact that loops represent quantum effects, with the order of the loop diagram in some sense quantifying the distance from classicality at which that effect arises. For QFT at finite temperature, i.e., statistical field theory, σw∼β−1\sigma_{w}\sim\beta^{-1}, and the loops can be understood as thermal (statistical) fluctuations around the zero-temperature (σw→0\sigma_{w}\rightarrow 0) background. The ’t Hooft coupling thus controls the size of the quantum/statistical fluctuations, so that the classical/MFT result is recovered in the limit when the weight initialization becomes deterministic. We emphasize again that this O(1)\mathcal{O}(1) effect is present even when T/N→0T/N\rightarrow 0, as can be seen from (161) or (186). That is, MFT is not obtained by simply taking N→∞N\rightarrow\infty, but rather by ignoring all fluctuations, including both genuine interactions (which disappear in the Gaussian limit, and are hence quantified by powers of 1/N1/N) and thermal fluctuations (which are extrinsic, i.e., independent of system size, and hence O(1)\mathcal{O}(1)).

As mentioned in the introduction, the location of the critical point predicted by the CLT (i.e., at N→∞N\rightarrow\infty) differs from empirical observations; see for example fig. 6 of Erdmenger:2021sot , in which the theoretical result – derived via the CLT, following poole2016exponential ; schoenholz2017deep – lies at (σb2,σw2)≈(0.05,1.76)(\sigma_{b}^{2},\sigma_{w}^{2})\approx(0.05,1.76), whereas the empirical result for networks with N ⁣= ⁣784N\!=\!784 appears to lie at (σb2,σw2)≈(0.05,1.55)(\sigma_{b}^{2},\sigma_{w}^{2})\approx(0.05,1.55). However, as we remarked beneath (161) and (186), we are unable to observe a shift in the location of the critical point at either O(1)\mathcal{O}(1) or O(T/N)\mathcal{O}(T/N). In the linear case, (161) does not exhibit any new divergences, while in the nonlinear case, the new divergences in (186) lie to the right of the tree-level divergence, i.e., further into the strong coupling regime; see the discussion at the end of sec. 4.4. In principle, we see no reason that these finite-width corrections could not have shifted the edge of chaos to the left, into the weak coupling regime. In practice however, this may represent a limitation of the present perturbative approach.

There are many ways in which the first-principles approach pursued here could be further explored and improved. For example, we have only computed the (quantum-corrected) two-point function ⟨h(t)h(s)⟩\langle h(t)h(s)\rangle, whereas in principle there is no obstruction to computing higher-point functions or more complicated observables of interest. This leads to the question of whether such a theory is renormalizable: we have shown that the infinite series of corrections to the two-point function converge at weak coupling only to linear order in T/NT/N, and while we see no obvious obstruction to convergence at higher orders, we have not proven that this continues to hold. Should it fail, then we have an effective theory valid only for sufficiently low-point correlators, to finite order in perturbation theory. By analogy, general relativity provides an extremely useful effective theory of gravity in the weak coupling regime, but is non-renormalizable, and hence breaks down at sufficiently high energies; the relevant question is then whether the neural networks of interest happen to lie at the metaphorical black hole singularity.

A related question is whether nonperturbative effects might extend this analysis beyond the weak coupling regime, and in particular, whether these shift the edge of chaos or otherwise contribute to the correlation length. The potential presence of nonperturbative effects was examined recently in zavatoneveth2021exact , which demonstrated that the exact output distributions for linear and ReLU networks with zero bias exhibit heavy tails. Of course, for networks with sufficiently small NN (such at those with N=1,2,5N=1,2,5 illustrated in fig. 1 therein), we expect that perturbation theory will cease to apply, since the network is no longer Gaussian in the first place. However, while Gaussianity is recovered in the N ⁣→ ⁣∞N\!\rightarrow\!\infty limit, one can see the appearance of heavy tails for larger values of NN (e.g., N=100N=100 with T∼1T\sim 1 in fig. 1 of zavatoneveth2021exact ) that cannot be accounted for by an O(1)\mathcal{O}(1) effect of the type we compute above, i.e., a simple shift in the variance (note that in the aforementioned figure, the finite-NN curves intersect the Gaussian in two locations). It would be interesting to study this in more detail, e.g., to quantify the minimum network size at which the perturbative approach breaks down, or to investigate whether other nonperturbative effects persist at large NN.

In closing, we offer this work as a first-principles contribution to the rapidly emerging NN-QFT correspondence Roberts:2021fes ; Yaida:2019sjo ; Dyer:2019uzd ; Halverson:2020trp ; Erbin:2021kqf ; Maiti:2021fpy . While there is still much to learn, we believe this and similar approaches from theoretical physics can shed light on the underlying mathematical principles of deep neural networks, and have the potential to provide practical guidance for the development of more sophisticated machine learning techniques.

Acknowledgements

It is a pleasure to thank James Giammona, Jim Halverson, Anindita Maiti, Dan Roberts, Keegan Stoner, and Sho Yaida for comments on a draft of this manuscript, as well as Johanna Erdmenger, Boris Hanin, and Soon Hoe Lim for discussions. K.T.G. acknowledges financial support from the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy through the Würzburg-Dresden Cluster of Excellence on Complexity and Topology in Quantum Matter ct.qmat (EXC 2147, project id 390858490), as well as the Hallwachs-Röntgen Postdoc Program of ct.qmat. K.T.G. has also received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 101024967.

Appendix A The NN-QFT dictionary

As explained in the introduction, we have generally used the phrase “NN-QFT correspondence” broadly to refer to the general philosophy of using techniques and ideas from QFT to understand deep neural networks. However, we have gone beyond previous works in directly constructing a bona fide field theory, allowing us to precisely identify various elements on either side of the correspondence:Here, we use the term “layer” to refer to either a single layer of an MLP, or a single timestep of an RNN. “Width” then refers to the number of neurons NN per layer; see the comment below (3). Let us also reiterate that the basic tools used in our construction are not new, and can be traced at least back to the work by Sompolinsky helias2019statistical ; Sompo ; nonetheless, the correspondence has not been explicitly stated in these terms.

Let us add a few comments about this NN-QFT dictionary. First, as remarked in the main text, the perturbative analysis applies in the regime T,N→∞T,N\rightarrow\infty with T/N≪1T/N\ll 1 fixed. This agrees with previous results Roberts:2021fes that the behaviour of the network is controlled by the ratio of depth to width, rather than either of these parameters independently: if N→∞N\rightarrow\infty with TT fixed, the network becomes a Gaussian process (i.e., we turn off interactions), but is effectively shallow; conversely, if T→∞T\rightarrow\infty with NN fixed, we lose all control of the perturbative expansion (i.e., effective interactions become too strong). As emphasized in Roberts:2021fes , networks of practical interest typically have small depth to width ratios, and therefore we expect real-world networks to fall within this perturbative regime. (Note that TT also serves as an IR regulator on otherwise divergent integrals, cf. footnote 39).

However, our analysis has uncovered an ambiguity in the “infinite-width limit” as presented in the literature, namely that previous works have often conflated MFT and the CLT. As mentioned in the introduction, and in more detail in footnote 37, these are generally inequivalent. In the present case for example, the MFT (i.e., tree-level) result is not recovered in the infinite-width limit, since the O(1)\mathcal{O}(1) correction is independent of NN (i.e., intensive, as opposed to extensive). See sec. 5 for further discussion of the physical interpretation of the O(1)\mathcal{O}(1) and O(T/N)\mathcal{O}(T/N) contributions.

As an additional constraint on the validity of our analysis, we found that σw2\sigma_{w}^{2} (and, in the case of non-linear models, also σb2\sigma_{b}^{2}) must be sufficiently small in order for the infinite series of Feynman diagrams appearing at each order in the perturbative expansion to converge, cf. (149) and (170). This is consistent with our observation that σw2\sigma_{w}^{2} plays the role of the ’t Hooft coupling, since the latter controls the weak/strong regime in Yang-Mills theory: perturbative quantum field theory of the kind we explore here is only tractable in the weak coupling regime, i.e., σw2<γ2\sigma_{w}^{2}<\gamma^{2}. At a practical level, this implies that our perturbative analysis can only be applied to the left of the critical point in σw2\sigma_{w}^{2}, and breaks down precisely when σw2=γ2\sigma_{w}^{2}=\gamma^{2}. For non-linear models, there is an additional constraint that σb2\sigma_{b}^{2} be sufficiently small to avoid an IR divergence, but this is less restrictive, since networks of practical interest typically have σb2≪γ2\sigma_{b}^{2}\ll\gamma^{2}.

Finally, we emphasize that the continuum limit is taken in the layer index, not the neural index, as explained in footnote 12. There is no meaningful notion of distance within a given layer. However, there is a meaningful notion of distance between different layers, since the networks under study do not admit skip connections; i.e., layer 1 is “closer” to layer 2 than it is to layer 3, and any effects of layer 1 on layer 3 are mediated via layer 2. At a technical level, this is the reason that TT has units of length in our analysis, while NN remains dimensionless, hence the appearance of γ\gamma in the dimensionless expansion parameter γT/N\gamma T/N (in contrast, both L ⁣≡ ⁣TL\!\equiv\!T and NN are dimensionless in Roberts:2021fes , no continuum limit was taken, and there is no field theory). Physically, this gives rise to the correspondence between a single layer of NN neurons in the network, and an NN-component field in the QFT. Hence we have (0 ⁣+ ⁣1)(0\!+\!1)-dimensional field theory, consistent with the dimensional analysis in (169). The interaction between components as the field evolves in time (i.e., in subsequent layers) is ultimately responsible for the NN free neurons running in the internal loops of the Feynman diagrams discussed in sec. 4.

Throughout this work, we have endeavored to be as explicit and as general as possible; however, we have made a number of technical assumptions along the way, most of which can be grouped into two broad categories:

Conditions which are required for our approach to hold on mathematical grounds (e.g., for convergence), and

Assumptions which are not strictly necessary, but which facilitate obtaining closed form expressions.

In (128), we have restricted to the case where the stochastic function g(τ)g(\tau) is constant, and absorbed this into κ\kappa. While this is not strictly necessary for the single-copy theory, it would be unusual for the stochasticity to depend on the current state of the system. In any case however, it is necessary for the double-copy analysis in sec. 3 that the stochasticity be common to both copies, which generically cannot hold if it depends on the states, cf. (55). If this were not the case, then the systems would deviate due to the different stochasticities even in the ostensibly ordered phase.

Turning now to the second category above, let us briefly summarize the various simplifying assumptions here, in roughly chronological order:

In (15), we have chosen to work with (Gaussian) random networks largely for analytical tractability, since the Gaussian form of the initializations allows many integrals to be performed analytically. We note however that this class of networks is a standard ansatz in the literature, e.g., poole2016exponential ; schoenholz2017deep , and in any case the distributions will be Gaussian at large NN due to the CLT.

To simplify (22) and related integrals, we have further taken the means of the initializations in (15) to be zero, again consistent with the cited literature.

In (33), we chose the stochastic increments to also be i.i.d. Gaussian with zero mean. In principle however, one could consider other forms of stochasticity; see lim2021noisy and references therein.

In solving for the Green functions, we assumed that the system exhibits time translation symmetry, cf. (40). While this seems like a strong assumption, we expect it to hold to good approximation in the bulk of the network (i.e., away from the boundaries), where our analysis is concerned; see sec. 1, in particular footnote 2.

In the perturbative analysis in sec. 4, we have set A=B=0A=B=0 in order to focus on the core elements of the theory. As seen previously, these can in principle be treated analogously to WW and UU.

We have set the vevs in (102) to zero, as this is the simplest solution to the equations of motion. However, other, more complicated vacua may exist; we hope to explore this in future work. Similarly, we have chosen the data to also have zero vev, though this is an external parameter that one can fix based on the dataset in question.

Another important restriction on the generality of our perturbative treatment is that we have restricted to tanh⁡\tanh as our activation function. As discussed in Roberts:2021fes (see in particular sec. 2.2), in order to achieve criticality, we desire an activation function which is smooth, and which passes through the origin, i.e., ϕ(0)=0\phi(0)=0. While there are other activation functions which posses this property (e.g., sin⁡\sin, SWISH, GELU), none are as widely used as tanh⁡\tanh; insofar as the latter captures the key properties we wish to explore, we have limited ourselves to ϕ(h)=tanh⁡(h)\phi(h)=\tanh(h) for concreteness. This however is not strictly necessary, and it would be interesting to consider other activation functions in this context. An alternative route would be to simply work with a generic Taylor expansionWe thank Harold Erbin for this suggestion.

where we have taken ϕ(0)(0)=0\phi^{(0)}(0)=0 for reasons just explained, and rescaled so that the coefficient of the linear term is unity. The case considered herein then corresponds to taking ϕ(2)(0)=0\phi^{(2)}(0)=0 and ϕ(3)(0)=−1/3\phi^{(3)}(0)=-1/3, and dropping all higher powers of hh. As discussed below (139), these are negligible for activation functions of this type.

Appendix B Convolution identities

In this appendix, we evaluate the convolutions that appear in the perturbative (finite-width) corrections to the correlation function in subsec. 4.4.2. Specifically, to evaluate (181), we require Y(0)∗Y(0)∗(ffˉ)(ω){Y^{(0)}}*{Y^{(0)}}*(f\bar{f})(\omega), b02b_{0}^{2}, and Y(0)∗3{Y^{(0)}}^{*3}.

Let us introduce the convenient shorthand notation

where F−1\mathcal{F}^{-1} is the inverse Fourier transform; for compactness, we will often suppress the argument of Lx\mathcal{L}_{x}, it being understood that this function acts on momentum space. We now begin by collecting a few useful identities that will enable us to straightforwardly evaluate the rather complicated expressions for the various convolutions in the main text above. First, consider the convolution

which follows from the convolution theorem and (188). Next, consider the convolution of Lz\mathcal{L}_{z} with the product

Lastly, observe that convolving with 2πδ(ω)2\pi\delta(\omega) is the identity operation; that is, if g(ω)g(\omega) is an arbitrary smooth distribution on momentum space, then

where the (2π)−1(2\pi)^{-1} in the measure is due to our Fourier conventions in (117). Note in particular that this formula applies for g(ω)=δ(ω)g(\omega)=\delta(\omega).

In the notation (188), the bare (tree-level/MFT) propagator c(ω)c(\omega) given in (130) may be written

Observing that δ(ω)Lξ1=ξ12\delta(\omega)\mathcal{L}_{\xi_{1}}=\xi_{1}^{2} and applying (190), we may express this as

On the second line of (196), we have defined the coefficients axa_{x} for later convenience.

With the above expressions in hand, consider the convolution

with the coefficients axa_{x} defined in (196). Applying (189) and (192), this becomes

We can now use this expression to evaluate the three desired convolutions mentioned at the beginning of this appendix.

In the notation (188), f(ω)fˉ(ω)=L1/γf(\omega)\bar{f}(\omega)=\mathcal{L}_{1/\gamma}, cf. (151). Hence, to compute Y(0)∗Y(0)∗(ffˉ){Y^{(0)}}*{Y^{(0)}}*(f\bar{f}) in momentum space, we simply convolve each term in (199) with L1/γ\mathcal{L}_{1/\gamma}. By (189), this will result in convolutions of the form

Recall from the discussion above (172) that b02b_{0}^{2} refers to the non-exponential part of (Y(0)∗Y(0))(ω)({Y^{(0)}}*{Y^{(0)}})(\omega), evaluated at τ ⁣= ⁣0\tau\!=\!0. That is, we keep only the term in F−1(Y(0)∗Y(0))(τ)\mathcal{F}^{-1}({Y^{(0)}}*{Y^{(0)}})(\tau) that requires regulating by imposing a cutoff as in footnote 39. From the form of (199) and the inverse Fourier transform (188), we see that the only term that thus contributes is proportional to δ(ω)\delta(\omega), hence:

where we have substituted in the coefficient aδa_{\delta} defined in (196).

Finally, to evaluate (Y(0)∗Y(0)∗Y(0))(ω)({Y^{(0)}}*{Y^{(0)}}*{Y^{(0)}})(\omega), we must convolve (199) with (196):

Applying (189) and (192) as before and collecting terms, this becomes

The convolutions (201), (202), and (204) can then be substituted into (181) to obtain an explicit expression for Y(1)(ω)Y^{(1)}(\omega).

Appendix C Explicit expressions for the loop-corrected propagator

In this appendix, we collect the explicit expressions for the various components of the loop-corrected propagator Y(τ)Y(\tau) and associated correlation length Ξ\Xi in the nonlinear case, in the small-∣τ∣|\tau| approximation (184):

where the constants A,BA,B were defined as

and the loop-corrected correlation length is

where Y(0)(τ)Y^{(0)}(\tau), Y(1)(τ)Y^{(1)}(\tau) are the inverse Fourier transforms of (180) and (181), respectively. The former is straightforward and relatively compact:

where the coefficients a0a_{0}, a1a_{1}, and aδa_{\delta} defined in (196) are

and ξ0\xi_{0}, ξ1\xi_{1} were defined in (137) and (195), respectively,

Unfortunately, Y(1)(τ)Y^{(1)}(\tau) is substantially more complicated, but can nonetheless be obtained by using the shorthand (188) and associated identities introduced in appendix B to write (181) as an expression linear in Lx(ω)\mathcal{L}_{x}(\omega), each instance of which can then be trivially inverse Fourier transformed to F−1(Lx)=x2e−∣τ∣/x\mathcal{F}^{-1}(\mathcal{L}_{x})=\frac{x}{2}e^{-|\tau|/x}. After a great deal of algebra, we find that the constant portion appearing in BB is

As for the value at τ ⁣= ⁣0\tau\!=\!0 appearing in the coefficient AA, let us express the five terms in the inverse Fourier transform of (181) separately. Noting that

References