## TASI Lectures on Physics for Machine Learning

## Jim Halverson

Department of Physics, Northeastern University, Boston, MA 02115, USA

The NSF Institute for Artificial Intelligence and Fundamental Interactions jhh@neu.edu

## Abstract

These notes are based on lectures I gave at TASI 2024 on Physics for Machine Learning. The focus is on neural network theory, organized according to network expressivity, statistics, and dynamics. I present classic results such as the universal approximation theorem and neural network / Gaussian process correspondence, and also more recent results such as the neural tangent kernel, feature learning with the maximal update parameterization, and Kolmogorov-Arnold networks. The exposition on neural network theory emphasizes a field theoretic perspective familiar to theoretical physicists. I elaborate on connections between the two, including a neural network approach to field theory.

## Contents

| 1   |                                      | Introduction 3                                                                                           |
|-----|--------------------------------------|----------------------------------------------------------------------------------------------------------|
| 2   | Expressivity of Neural Networks      | 5                                                                                                        |
| 2.1 | Universal Approximation Theorem      | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  |
| 2.2 | Kolmogorov-Arnold Theorem . . .      | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  |
| 3   | Statistics of Neural Networks        | 7                                                                                                        |
| 3.1 | NNGP Correspondence . . . . . . .    | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8  |
| 3.2 | Non-Gaussian Processes . . . . . .   | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9  |
| 3.3 | Symmetries . . . . . . . . . . . . . | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 |
| 3.4 | Examples . . . . . . . . . . . . . . | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 |
| 4   | Dynamics of Neural Networks          | 13                                                                                                       |
| 4.1 | Neural Tangent Kernel . . . . . . .  | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 |
| 4.2 | An Exactly Solvable Model . . . . .  | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 |
| 4.3 | Feature Learning . . . . . . . . . . | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 |
| 5   | NN-FT Correspondence Theory          | 17                                                                                                       |
| 5.1 | Quantum Field . . . . . . . . .      | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 |
| 5.2 | ϕ 4 Theory . . . . . . . . . . . .   | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 |
| 5.3 | Open Questions . . . . . . . . . . . | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 |
| 6   | Recap and Outlook                    | 20                                                                                                       |
| A   | Central Limit Theorem                | 22                                                                                                       |

## 1 Introduction

Computer science (CS) is still in its infancy. 'What!?' you incredulously exclaim, thinking back to the earliest computer scientists you can think of, perhaps Lovelace or Babbage or Turing. Since its early days, CS has steadily progressed, from cracking the Enigma code in the 40's, to personal computers in the 70's and 80's, the internet in the 90's, powerful computers-in-your-pocket in the 2000's, and finally to some version of artificial intelligence in the last decade; see [1] for a thorough account. It shows no signs of stopping, and one might wager that future historians will not speak of decades of progress in CS, but centuries. Computer science is still in its infancy.

It is 2024, what have we seen recently? A plethora of 'experimental' breakthroughs in machine learning (ML) that constitute some of the most exciting developments in CS to date. Reinforcement learning algorithms have become world-class at Go [2] and Chess [3, 4], merely by playing against themselves. Diffusion models [5, 6, 7] can generate images of people that don't exist, and yet you might never know. Large language models (e.g. GPT-3 [8] literature, or popular accounts [9, 10]) can code better than you - or me, at least - and they can even write compelling bedtime stories for your children. These forms of artificial intelligence have already started a trillion dollar industry, and some have speculated that we've already seen sparks [11] of AGI, or human-level intelligence.

We've also started to see significant advances in the sciences. For instance, AlphaFold [12] has achieved state-of-the-art performance for predicting the structure of folded proteins, and neural networks (NNs) give state-of-the-art models for complex objects, from quantum many-body ground states [13, 14] to metrics [15, 16, 17] on the Calabi-Yau manifolds of string theory. Lack-of-rigor is a natural concern, but in certain cases ML techniques can be made rigorous or interpretable at a level that would satisfy a formal theoretical physicist or pure mathematician; see, e.g., [18] and references therein for examples in string theory, algebraic geometry, differential geometry, and low-dimensional topology, including uses of ML theory for science. Of course, this is just scratching the surface, see, e.g., [19, 20, 21] for a smattering of results across physics and the physical sciences.

With this in mind, we have some explaining to do. There are a large number of impressive ML results in both pop culture and the sciences, but experiments have significantly outpaced theory over the last decade. An analogy from physics might be useful, given the original audience. The current situation in ML might be reminiscent of the 1960's in particle physics: some essentials of the theory were known, e.g. quantum electrodynamics (QED), but a deluge of newly discovered hadrons left theorists scratching their heads and demanded an organizing principle to explain the new phenomena. This was one of the motivating factors for the development of string theory, but the right theory in the end is the quark model, as described by quantum chromodynamics (QCD). It's tempting to speculate that recent results in ML are waiting for someone to discover a foundational theory, akin to QCD for the strong interactions. As theoretical physicists, we hope for this sort of mechanistic understanding. However, it might be that ML and intelligence are so complex that sociology is a better analogy, and it would be a fool's errand to expect such a precise theory. My personal guess is that detailed theory will pay off in certain areas of ML - perhaps related to sparsity in NNs, architecture design, or the topics of these lectures - but not in all. Nevertheless, given the experimental progress, one must try.

These lectures were given at TASI 2024 [22] to Ph.D. students in theoretical high energy physics. I was given the title 'Physics4ML', which means that I'm trying to keep ML-for-Physics to a minimum. I take a physics perspective, but acknowledge that this is an enormous field to which many communities have contributed.

The central idea of the lectures is that understanding NNs is essential to understanding ML, a story I built on three pillars: expressivity, statistics, and dynamics of NNs, one for each of the lectures I gave. The content builds on many ideas explained to me over the last five years by friends, acknowledged below, who pioneered many of the developments, as well as a few of my own results. Throughout, I take a decidedly field-theoretic lens to suit the audience, and also because I think it's a useful way to understand NNs.

## The Setup.

Understanding ML at the very least means understanding neural networks. A neural network is a function

$$\phi _ { \theta } \colon \mathbb { R } ^ { d } \rightarrow \mathbb { R }$$

with parameters θ . We've chosen outputs in R because, channeling Coleman, scalars already exhibit the essentials. We'll use the lingo

$$\text{Input} \colon \ x \in \mathbb { R } ^ { d } & & ( 2 ) \quad \text{ of } \hat { t }$$

$$\text{Output} \colon \ \phi _ { \theta } ( x ) \in \mathbb { R } & & ( 3 ) \quad \ \circ$$

$$\text{Network} \colon \ \phi _ { \theta } \in \text{Maps} ( \mathbb { R } ^ { d }, \mathbb { R } ) & & ( 4 ) & & ^ { \text{Pea} }$$

$$\text{Data} \colon \ \mathcal { D },$$

where the data D depends on the problem, but involves at least a subset of R d , potentially paired with labels y ∈ R .

With this minimal background, let's ask our central question:

## Question: What does a NN predict?

For any fixed value of θ , the answer is clear: ϕ θ ( x ). However, the answer is complicated by issues of both dynamics and statistics.

First, dynamics. In ML, parameters are updated to solve problems and we really have trajectories in

$$\text{Parameter Space} \colon \ \theta ( t ) \in \mathbb { R } ^ { | \theta | } & & ( 6 ) \quad \text{ as } w$$

$$\text{Output Space} \colon \ \phi _ { \theta ( t ) } ( x ) \in \mathbb { R } & & ( 7 ) \quad \text{ init} \text{;}$$

$$\text{Function Space} \colon \ \phi _ { \theta ( t ) } \in \text{Maps} ( \mathbb { R } ^ { d }, \mathbb { R } ). \quad \quad ( 8 ) \quad \text{ and } \quad \text{$\dots$}$$

governed by some learning dynamics determined by the optimization algorithm and the nature of the learning problem. For instance, in supervised learning we have data

$$\mathcal { D } = \{ ( x _ { \alpha }, y _ { \alpha } ) \in \mathbb { R } ^ { d } \times \mathbb { R } \} _ { \alpha = 1 } ^ { | \mathcal { D } | }, \quad \quad ( 9 ) \quad \text{ the }$$

and a loss function

$$\mathcal { L } [ \phi _ { \theta } ] & = \sum _ { \alpha = 1 } ^ { | \mathcal { D } | } \ell ( \phi _ { \theta } ( x _ { \alpha } ), y _ { \alpha } ), & ( 1 0 ) & \quad \text{$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$\quad$$$

where ℓ is a loss function such as ℓ MSE = ( ϕ θ ( x α ) -y α ) 2 . One may optimize θ by gradient descent

$$\frac { d \theta _ { i } } { d t } = - \nabla _ { \theta _ { i } } \mathcal { L } [ \phi _ { \theta } ],$$

or other algorithms, e.g., classics like stochastic gradient descent (SGD) [23, 24] or Adam [25], or a more recent technique such as Energy Conserving Descent [26, 27]. Throughout, t is training time of the learning algorithm unless otherwise noted.

Second, statistics. When a NN is initialized on your computer, the parameters θ are initialized as draws

$$\theta \sim P ( \theta )$$

from a distribution P θ ( ), where means 'drawn from' in this context. Different draws of θ will give different functions ϕ θ , and a priori we have no reason to prefer one over another. The prediction ϕ θ ( x ) therefore can't be fundamental! Instead, what is fundamental is the average prediction and second moment or variance:

$$\mathbb { E } [ \phi _ { \theta } ( x ) ] = \int d \theta P ( \theta ) \, \phi _ { \theta } ( x )$$

$$\mathbb { E } [ \phi _ { \theta } ( x ) \phi _ { \theta } ( y ) ] = \int d \theta P ( \theta ) \, \phi _ { \theta } ( x ) \phi _ { \theta } ( y ),$$

as well as the higher moments. Expectations are across different initializations. Since we're physicists, we henceforth replace E [ · ] = ⟨·⟩ and we remember this is a statistical expectation value. It's useful to put this in our language:

$$G ^ { ( 1 ) } ( x ) = \langle \phi _ { \theta } ( x ) \rangle$$

$$G ^ { ( 2 ) } ( x, y ) = \langle \phi _ { \theta } ( x ) \phi _ { \theta } ( y ) \rangle,$$

the mean prediction and second moment are just the one-point and two-point correlation functions of the statistical ensemble of neural networks. Apparently ML has something to do with field theory.

Putting the dynamics and statistics together, we have an ensemble of initial θ -values, each of which is the starting point of a trajectory

θ t ( ), and therefore we have an ensemble of trajectories. We choose to think of θ t ( ) drawn as

$$\theta ( t ) \sim P ( \theta ( t ) ),$$

a density on parameters that depends on the training time and yields time-dependent correlators

$$G _ { t } ^ { ( 1 ) } ( x ) & = \langle \phi _ { \theta } ( x ) \rangle _ { t } & ( 1 8 )$$

$$G _ { t } ^ { ( 2 ) } ( x, y ) = \langle \phi _ { \theta } ( x ) \phi _ { \theta } ( y ) \rangle _ { t }, & & ( 1 9 ) & & \bullet$$

where the subscript t indicates time-dependence and the expectation is with respect to P θ t ( ( )). Of course, assuming that learning is helping, we wish to take t →∞ and are interested in

G (1) ∞ ( x ) = mean prediction of ∞ -number of NNs as t →∞ .

Remarkably, we will see that in a certain supervised setting there is an exact analytic solution for this quantity.

There is one more pillar beyond dynamics and statistics that I need to introduce: expressivity. Let's make the point by seeing a failure mode. Consider neural networks of the following functional form, or architecture :

$$\phi _ { \theta } ( x ) = \theta \cdot x.$$

The one-point and two-point functions of these are analytically solvable, but going that far defeats the purpose: this is a linear model, and learning schemes involving it are linear regression, which will fail on general problems. We say that model is not expressive enough to account for the data. Conversely, we wish instead to choose expressive architectures that can model the data, which essentially requires that the architecture is complex enough to approximate anything. Of course, such architectures must be non-linear.

We now have the three pillars on which we'll build our understanding of neural networks, and associated questions:

- · Expressivity. How powerful is the NN?
- · Statistics. What is the NN ensemble?
- · Dynamics. How does it evolve?

We will approach the topics in this order, building up theory that takes us through the last few years through a physicist's lens.

A physicist's lens means a few things. First, it means a physicist's tools, including:

- · Field Theory as alluded to above.
- · Landscape Dynamics from loss functions on θ -space.
- · Symmetries of individual NNs and their ensembles.

A physicist's lens also means we will try to find the appropriate balance of rigor and intuition. We'd like mechanisms and toy models, but we won't try to prove everything at a level that would satisfy a mathematician. This befits the current situation in ML, where there are an enormous number of empirical results that need an O (1) theoretical understanding, not rigorous proof.

Henceforth, we drop the subscript θ in ϕ θ ( x ), and the reader should recall that the network depends on parameters.

## 2 Expressivity of Neural Networks

Neural networks are big functions composed out of many simpler functions according to the choice of architecture. The compositions give more flexibility, prompting

## Question: How powerful is a NN?

Ultimately this is a question for mathematics, as it's a question about functions. Less colloquially, what we mean by the power of a NN is its ability to approximate any function.

## 2.1 Universal Approximation Theorem

The Universal Approximation Theorem (UAT) is the first result in this direction. It states that a neural network with a single hidden layer can approximate any continuous function on a compact domain to arbitrary accuracy. More precisely, the origin version of the theorem due to Cybenko is

Theorem 2.1 (Cybenko) . Let f : R d → R be a continuous function on a compact set K ⊂ R d . Then for any ϵ &gt; 0 there exists a neural network with a single hidden layer of the form

$$\phi ( x ) = \sum _ { i = 1 } ^ { N } \sum _ { j = 1 } ^ { d } w _ { i } ^ { ( 1 ) } \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } + b _ { i } ^ { ( 0 ) } ) + b ^ { ( 1 ) }, \quad \quad ( 2 1 ) \quad \text{ while} \quad \text{app}$$

θ = { w (0) ij , w (1) i , b (0) i , b (1) } , where σ : R → R is a non-polynomial nonlinear activation function, such that

$$\sup _ { x \in K } | f ( x ) - \phi ( x ) | < \epsilon. \quad \ \ ( 2 2 ) \quad \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$$

The architecture in Eq. (21) is known by many names, including the perceptron, a fully-connected network, or a feedforward network . The parameter N is known as the width . It may be generalized to include a depth dimension L encoding the number of compositions of affine transformations and non-linearities. Such an architecture is known as a multi-layer perceptron (MLP) or a deep feedforward network.

The UAT is a powerful result, but it has some limitations. First, though the error ϵ does get better with N , it doesn't say how many neurons are needed. Second, it doesn't say how to train the network: though there is a point θ ∗ in parameter space that is a good approximation to any f , existence doesn't imply that we can find it, which is a question of learning dynamics.

To ask the obvious,

Question: Why does this UAT work?

Figure 1: The Universal Approximation Theorem can be understood by approximating a function like sin( x ) with a series of bumps.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00082v1-figure-41892236-3c15-4edb-a46a-a4a7258d8a56.jpg)

In Cybenko's original work, he focused on the case that σ was the sigmoid function

$$\sigma ( x ) = \frac { 1 } { 1 + e ^ { - x } }, \quad \begin{array} { c c c c } & & \\ & \\. &. &. &. &. &. &. \end{array} \quad ( 2 3 )$$

which allows us to get a picture of what's happening. The sigmoids appear in the network function of the form

$$\sigma \left ( w _ { i } ^ { ( 0 ) } \cdot x + b _ { i } ^ { ( 0 ) } \right )$$

which approximates a shifted step function as w (0) → ∞ . A linear combination can turn it into a bump with approximately compact support that gets scaled by w (1) . These bumps can then be put together to approximate any function; see, e.g., Fig. 2.1.

Cybenko's version of the UAT was just the first, and there are many generalizations, including to deeper networks, to other activation functions, and to other domains. See [28] for the original paper and [29] for a generalization to the case of multiple hidden layers.

## 2.2 Kolmogorov-Arnold Theorem

The UAT essentially says that any function can be approximated by a neural network, i.e. a complicated function comprised out of many building blocks. It is natural to wonder whether there are other theorems to this effect, and whether they inspire other neural network constructions.

One such result is due to Kolmogorov [30] and Arnold [31], who showed that any multivariate continuous function can be represented (exactly, not approximated) as a sum of continuous one-dimensional functions:

Figure 2: A comparison of MLP and KAN, including their functional form and the mathematical theorem motivating the architecture.

![Image](https://ac.marcodsn.me/arxiv-markdown-images/2408.00082v1-figure-95b02fc3-dc62-4a34-80bc-1e29e66c8dea.jpg)

Theorem 2.2 (Kolmogorov-Arnold Representation Theorem) . Let f : [0 , 1] n → R be an arbitrary multivariate continuous function. Then it has the representation

$$f ( x _ { 1 }, \dots, x _ { n } ) = \sum _ { q = 0 } ^ { 2 n } \Phi _ { q } \left ( \sum _ { p = 1 } ^ { n } \phi _ { q, p } ( x _ { p } ) \right ) \quad \text{(2.5)} \quad \text{work}$$

with continuous one-dimensional functions Φ q and ϕ q,p .

This result is perhaps less intuitive than the UAT. If every multivariate function is to be represented by univariate functions plus addition, what then of f ( x, y ) = xy ? This is just a pedagogical example since

$$f ( x, y ) = x y = e ^ { \log x + \log y },$$

but of course the general theorem is very non-trivial.

A notable feature of (25) is that it is a sum of functions of functions, which one might take to inspire a neural network definition.

However, one aspect that is a little unusual is that ϕ q,p depends on both p and q , and therefore lives on the connection between x p and x (1) q := ∑ n p =1 ϕ q,p ( x p ). If this is a neural network, it's one with activations ϕ q,p on the edges , rather than on the nodes. Furthermore, for distinct values of p, q , the functions ϕ q,p are independent in general.

In fact, this idea led to the recent proposal of Kolmogorov-Arnold networks (KAN) [32], a new architecture in which activation functions are on the edges, as motivated by KART, and are learned. Much like how MLPs may be formed out of layers that repeat the structure in the single-layer UAT, KANs may be formed into layers to repeat the structure of KART. See Figure 2 for a detailed comparison with MLPs, including a depiction of the architectures and how they are formed out of layers motivated by their respective mathematical theorems. The KAN implementation provided in [32] includes visualizations of the learned activation functions, which can lead to interpretable can architectures that can be mapped directly onto symbolic formulae.

## 3 Statistics of Neural Networks

Let's try to understand neural networks at initialization. For this, firing up your computer once is not enough, since one initialization give you one draw θ ∼ P θ ( ) and therefore one random neural network. Instead, we want to understand the statistics of the networks:

## Question: What characterizes the stats of the NN ensemble?

One aspect of this is encoded in the moments, or n -pt functions,

$$G ^ { ( n ) } ( x _ { 1 }, \dots, x _ { n } ) = \langle \phi ( x _ { 1 } ) \dots \phi ( x _ { n } ) \rangle,$$

which may be obtained from a partition function as

$$Z [ J ] = \langle e ^ { \int d ^ { d } x J ( x ) \phi ( x ) } \rangle$$

$$G ^ { ( n ) } ( x _ { 1 }, \dots, x _ { n } ) = \left ( \frac { \delta } { \delta J ( x _ { 1 } ) } \dots \frac { \delta } { \delta J ( x _ { n } ) } Z [ J ] \right ) \Big | _ { J = 0 }, \quad ( 2 9 )$$

where J x ( ) is a source. This expectation ⟨·⟩ is intentionally not specified here to allow for flexibility. For instance, using the expectation in the introduction we have

$$Z [ J ] & = \int d \theta P ( \theta ) e ^ { \int d ^ { d } x J ( x ) \phi ( x ) }, & ( 3 0 ) \quad \text{Und}$$

reminding the reader that the NN ϕ x ( ) depends on θ . The partition function integrates over the density of network parameters. But as physicists we're much more familiar with function space densities according to

$$Z [ J ] & = \int \mathcal { D } \phi \, e ^ { - S [ \phi ] } e ^ { \int J ( x ) \phi ( x ) }, & ( 3 1 )$$

the Feynman path integral that determines the correlators from an action S ϕ [ ] that defines a density on functions.

Since starting a neural network requires specifying the data ( ϕ, P ( θ )), the parameter space partition function (30) and associated parameter space calculation of correlators is always available to us. Given that mathematical data, one might ask

Question: What is the action S ϕ [ ] associated to ( ϕ, P ( θ ))?

When this question can be answered, it opens a second way of studying or understanding the theory. The parameter-space and functionspace descriptions should be thought of as a duality .

## 3.1 NNGP Correspondence

Having raised the question of the action S ϕ [ ] associated to the network data ( ϕ, P ( θ )), we can turn to a classic result of Neal [33].

For simplicity, we again consider a single-layer fully connected network of width N , with the so-called biases turned off for simplicity:

$$\phi ( x ) = \frac { 1 } { \sqrt { N } } \sum _ { i = 1 } ^ { N } \sum _ { j = 1 } ^ { d } w _ { i } ^ { ( 1 ) } \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } ),$$

where the set of network parameters is θ = { w (0) ij , w (1) i } independently and identically distributed (i.i.d.).

$$w _ { i j } ^ { ( 0 ) } \sim P ( w ^ { ( 0 ) } ) \quad w _ { i } ^ { ( 1 ) } \sim P ( w ^ { ( 1 ) } ).$$

Under this assumption, we see

Observation: The network is a sum of N i.i.d. functions.

This is a function version of the Central Limit Theorem, generalizing the review in Appendix A, and gives us the Neural Network / Gaussian Process (NNGP) correspondence,

NNGP Correspondence: in the N → ∞ limit, ϕ is drawn from a Gaussian Process (GP),

$$\lim _ { N \to \infty } \ \phi ( x ) \sim \mathcal { N } \left ( \mu ( x ), K ( x, y ) \right ),$$

with mean and covariance (or kernel) µ x ( ) and K x,y ( ).

By the CLT, exp( -S ϕ [ ]) is Gaussian and therefore S ϕ [ ] is quadratic in networks. Now this really feels like physics, since the infinite neural network is drawn from a Gaussian density on functions, which defines a generalized free field theory.

We will address generality of the NNGP correspondence momentarily, but let's first get a feel for how to do computations. To facilitate then, we take P w ( (1) ) to have zero mean and finite variance,

$$\langle w ^ { ( 1 ) } \rangle = 0 \quad \langle w ^ { ( 1 ) } w ^ { ( 1 ) } \rangle = \mu _ { 2 },$$

which causes the one-point function to vanish G (1) ( x ) = 0 . Following Williams [34], we compute the two-point function in parameter space (with Einstein summation)

$$\text{$num$ semium} \\ G ^ { ( 2 ) } ( x, y ) & = \frac { 1 } { N } \langle w _ { i } ^ { ( 1 ) } \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } ) \ w _ { k } ^ { ( 1 ) } \sigma ( w _ { k l } ^ { ( 0 ) } y _ { l } ) \rangle \\ & = \frac { 1 } { N } \langle w _ { i } ^ { ( 1 ) } w _ { k } ^ { ( 1 ) } \rangle \langle \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } ) \sigma ( w _ { k l } ^ { ( 0 ) } y _ { l } ) \rangle \\ & = \frac { \mu _ { 2 } } { N } \langle \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } ) \, \sigma ( w _ { i l } ^ { ( 0 ) } y _ { l } ) \rangle,$$

where the last equality follows from the ones being i.i.d., ⟨ w (1) i w (1) k ⟩ = µ δ 2 ik . The sum over i gives us N copies of the same function, leaving us with

$$G ^ { ( 2 ) } ( x, y ) = \mu _ { 2 } \, \langle \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } ) \, \sigma ( w _ { i l } ^ { ( 0 ) } y _ { l } ) \rangle, \quad \stackrel { \lambda } { 2 0 0 0 }.$$

where we emphasize there is now no summation on i . This is an exact-inN two-point function that now requires only on the computation of the quantity in bra-kets. One may try to evaluate it exactly by doing the integral over w (0) . If it can't be done, Monte Carlo estimates may be obtained from M samples of w (0) ∼ P w ( (0) ) as

$$G ^ { ( 2 ) } ( x, y ) \simeq \frac { \mu _ { 2 } } { M } \sum _ { \text{samples} } ^ { M } \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } ) \, \sigma ( w _ { i l } ^ { ( 0 ) } y _ { l } ). \quad \ \ \ ( 4 0 ) \quad \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$$

In typical NN settings, parameter densities are easy to sample for convenience, allowing for easy computation of the estimate. If the density is more complicated, one may always resort to Markov chains, e.g. as in lattice field theory.

With this computation in hand, we have the defining data of this NNGP,

$$\lim _ { N \to \infty } \ \phi ( x ) \sim \mathcal { N } \left ( 0, G ^ { ( 2 ) } ( x, y ) \right ). \quad \ \ ( 4 1 ) \quad \$$

The associated action is

$$S [ \phi ] = \int d ^ { d } x d ^ { d } y \, \phi ( x ) \, G ^ { ( 2 ) } ( x, y ) ^ { - 1 } \, \phi ( y ), \text{ \quad \ \ } ( 4 2 )$$

where

$$\int d ^ { d } y \, G ^ { ( 2 ) } ( x, y ) ^ { - 1 } G ^ { ( 2 ) } ( y, z ) = \delta ^ { ( d ) } ( x - z ). \quad \ \ ( 4 3 ) \quad \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$$

defines the inverse two-point function. In fact, this allows us to determine the action of any NNGP with µ x ( ) = G (1) ( x ) = 0, by computing the G (2) in parameter space and inverting it.

So certain large neural networks are function draws from generalized free field theories. But at this point you might be asking yourself

Question: How general is the NNGP correspondence?

Neal's result - that infinite-width single-layer feedforward NNs are drawn from GP - stood on its own for many years, perhaps (I am guessing) due to focus on non-NN ML techniques in the 90's and early 2000's during a so-called AI Winter. As NNs succeeded on many tasks in the 2010's after AlexNet [35], however, many asked whether architecture X has a hyperparameter N such that the network is drawn from a Gaussian Process as N →∞ . Before listing such X 's, let's rhetorically ask

Question: Didn't Neal's result essentially follow from summing N i.i.d. random functions? Maybe NNs do this all the time?

In fact, that is the case. Architectures admitting an NNGP limit include

- · Deep Fully Connected Networks, N = width,
- · Convolutional Neural Networks, N = channels,
- · Attention Networks, N = heads,

and many more. See, e.g., [36] and references therein.

## 3.2 Non-Gaussian Processes

If the GP limit exists due to the CLT, then violating any of the assumptions of the CLT should introduce non-Gaussianities, which are interactions in field theory. From Appendix A, we see that the CLT is violated by finiteN corrections and breaking statistical independence. See [37] for a systematic treatment of independence breaking, and derivation of NN actions from correlators.

We wish to see the N -dependence of the connected 4-pt function. William's technique for computing G (2) extends to any correlator. To avoid a proliferation of indices, we will compute it using the notation

$$\phi ( x ) = \sum _ { i } w _ { i } \varphi _ { i } ( x )$$

where w i is distributed as w (1) was in the single layer case, and φ i ( x ) are i.i.d. neurons of any architecture. The four-point function is

$$G ^ { ( 4 ) } & = \langle \phi ( x ) \phi ( y ) \phi ( z ) \phi ( w ) \rangle & ( 4 5 ) \quad \text{ we con}$$

$$= \sum _ { i, j, k, l } \langle w _ { i } w _ { j } w _ { k } w _ { l } \rangle \langle \varphi _ { i } ( x ) \varphi _ { j } ( y ) \varphi _ { k } ( z ) \varphi _ { l } ( w ) \rangle & & ( 4 6 ) & & \text{with }.$$

$$& = \sum _ { i } \langle w _ { i } ^ { 4 } \rangle \langle \varphi _ { i } ( x ) \varphi _ { i } ( y ) \varphi _ { i } ( z ) \varphi _ { i } ( w ) \rangle & & ( 4 7 ) \quad \begin{array} { c } \text{A c} \\ \phi \text{ is } G \end{array}$$

̸

$$+ \sum _ { i \neq j } \langle w _ { i } ^ { 2 } \rangle \langle w _ { j } ^ { 2 } \rangle \langle \varphi _ { i } ( x ) \varphi _ { i } ( y ) \varphi _ { j } ( z ) \varphi _ { j } ( w ) + \text{perms} \rangle. \quad ( 4 8 ) \quad.$$

One can see that you have to be careful with indices. The connected 4-pt function is [38]

$$G _ { c } ^ { ( 4 ) } ( x, y, z, w ) & = G ^ { ( 4 ) } ( x, y, z, w ) - \left ( G ^ { ( 2 ) } ( x, y ) G ^ { ( 2 ) } ( z, w ) + \text{perms} \right ), \quad \text{network} \\ \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot$$

and watching indices carefully we obtain

$$G _ { c } ^ { ( 4 ) } ( x, y, z, w ) = \frac { 1 } { N } \Big ( \mu _ { 4 } \left \langle \varphi _ { i } ( x ) \varphi _ { i } ( y ) \varphi _ { i } ( z ) \varphi _ { i } ( w ) \right \rangle \quad ( 5 0 ) \int _ { \substack { [ 4 1, \ 4 \\ - 1 \dots \cdot \dots \cdot } } ^ { \blacktriangleleft }$$

$$- \mu _ { 2 } ^ { 2 } \left ( \left \langle \varphi _ { i } ( x ) \varphi _ { i } ( y ) \right \rangle \left \langle \varphi _ { i } ( z ) \varphi _ { i } ( w ) \right \rangle + \text{perms} \right ) \, \right ), \quad ( 5 1 ) \quad \text{area} \, \text{r}$$

with no Einstein summation on i . We see that the connected 4-pt function is non-zero at finiteN , signalling interactions. We will see that in some examples G (4) c can be computed exactly.

## 3.3 Symmetries

We have gotten some control over the statistics of the ensemble of neural networks. It natural at this point to ask

## Question: Is there structure in the ensemble?

By this I mean properties that the ensemble realizes that an individual network might not see. We will return to this question broadly in Section 5, but for now we will focus on one type of structure: symmetries.

To allow for symmetries at both input and output, in this section we consider networks

$$\phi \colon \mathbb { R } ^ { d } \rightarrow \mathbb { R } ^ { D }.$$

with D -dimensional output. Sometimes the indices will be implicit. A classic example is equivariant neural networks [39]. We say that ϕ is G -equivariant with respect to a group G if

$$\rho _ { D } ( g ) \phi ( x ) = \phi ( \rho _ { d } ( g ) x ) \quad \forall g \in G,$$

where

$$\rho _ { d } \in \text{Mat} ( \mathbb { R } ^ { d } ) \quad \rho _ { D } \in \text{Mat} ( \mathbb { R } ^ { D } )$$

are matrix representations of G on R D and R d , respectively. The network is invariant if ρ D = ✶ , the trivial representation. Equivariance is a powerful constraint on the network that may be implemented in a variety of ways. For problems that have appropriate symmetries, building them into the network can improve the speed and performance of learning [40], e.g., at the level of scaling laws [41, 42, 43]. For instance, in Phiala Shanahan's lectures you'll learn about SU N ( )-equivariant neural networks from her work [44], which are natural in lattice field theory due to invariance of the action under gauge transformations.

But this is the statistics section, so we're interested in symmetries that arise in ensembles of neural networks, which leave the statistical ensemble invariant. In field theory, we call them global symmetries . Let the network transform under a group action as

↦

$$\phi \mapsto \phi _ { g }, \quad g \in G.$$

We say that ensemble of networks has a global symmetry group G if the partition function is invariant,

$$Z _ { g } [ J ] = Z [ J ], \quad \forall g \in G.$$

At the level of expectations, this is

$$\langle e ^ { \int d ^ { d } x J ( x ) \phi _ { g } ( x ) } \rangle = \langle e ^ { \int d ^ { d } x J ( x ) \phi ( x ) } \rangle \quad \forall g \in G,$$

↦

where one can put indices on ϕ and J as required by D . By a network redefinition on the LHS, this may be cast as having a symmetry if ⟨·⟩ is invariant. In the usual path integral this is the statement of invariant action S ϕ [ ] and measure D ϕ . In parameter space, the redefinition may be instituted [45] by absorbing g into a redefinition of parameters as θ → θ g , with symmetry arising when

$$\int d \theta _ { g } P ( \theta _ { g } ) e ^ { \int d ^ { d } x J ( x ) \phi _ { \theta } ( x ) } = \int d \theta P ( \theta ) e ^ { \int d ^ { d } x J ( x ) \phi _ { \theta } ( x ) }, \quad ( 5 8 )$$

i.e. the parameter density and measure must be invariant. We will give a simple example realizing this mechanism in a moment.

It is most natural to transform the input or output of the network. Our mechanism allows for symmetries of both types, which are analogs of spacetime and internal symmetries, respectively. It may also be interesting to study symmetries of intermediate layers, if one wishes to impose symmetries on learned representations. Equivariance fits into this picture because it turns a transformation at input into a transformation at output. The ensemble of equivariant NNs is invariant under ρ d action on the input if the partition function is invariant under the induced ρ D action on the output.

Example. Consider any architecture of the form

$$\phi ( x ) = \sum _ { i } w _ { i } \varphi _ { i } ( x ), \quad w _ { i } \sim P ( w ) \text{ even},$$

↦

for any neuron φ , which could itself be a deep network. The Z 2 action ϕ → -ϕ may be absorbed into parameters w g = -w i with dwP w ( ) invariant by evenness, which is a global symmetry provided that the domain is invariant. This theory has only even correlators.

Less trivial examples will be presented below, when we present specific networks and compute correlators.

## 3.4 Examples

In the statistics of neural networks, we have covered three topics: Gaussian limits, non-Gaussian corrections from violating CLT assumptions, and symmetries. We will present this essential data in some examples and then discuss similarities and differences. For canonical cases in ML, like networks with ReLU activation or similar, see [46] and references therein.

Gauss-net. The architecture and parameter densities are

$$\phi ( x ) = \frac { w _ { i } ^ { ( 1 ) } \exp ( w _ { i j } ^ { ( 0 ) } x _ { j } + b _ { i } ^ { ( 0 ) } ) } { \sqrt { \exp [ 2 ( \sigma _ { b _ { 0 } } ^ { 2 } + \frac { \sigma _ { w _ { 0 } } ^ { 2 } } { d } x ^ { 2 } ) ] } },$$

for parameters drawn i.i.d. from

$$\text{will} \quad \ \ w ^ { ( 0 ) } & \sim \mathcal { N } ( 0, \frac { \sigma _ { W _ { 0 } } ^ { 2 } } { d } ), \quad \ w ^ { ( 1 ) } & \sim \mathcal { N } ( 0, \frac { \sigma _ { w _ { 1 } } ^ { 2 } } { 2 N } ), \quad \ b ^ { ( 0 ) } & \sim \mathcal { N } ( 0, \sigma _ { b _ { 0 } } ^ { 2 } ). \\ \text{are} \quad \ \ r i n \dots \cdots \cdots \cdots \cdots \cdots \cdots \cdots$$

The two-point function is

$$G ^ { ( 2 ) } ( x _ { 1 }, x _ { 2 } ) = \frac { \sigma _ { w _ { 1 } } ^ { 2 } } { 2 } e ^ { - \frac { 1 } { 2 d } \sigma _ { w _ { 0 } } ^ { 2 } ( x _ { 1 } - x _ { 2 } ) ^ { 2 } }$$

and we see that the theory has a correlation length

$$\xi = \sqrt { \frac { d } { \sigma _ { w _ { 0 } } ^ { 2 } } }.$$

The connected four-point function is

$$G _ { c } ^ { ( 4 ) } = & \frac { 1 } { 4 N } \sigma _ { w _ { 1 } } ^ { 4 } \left [ 3 e ^ { 4 \sigma _ { b _ { 0 } } ^ { 2 } } e ^ { - \frac { \sigma _ { w _ { 0 } } ^ { 2 } } { 2 d } } \sum _ { i } x _ { i } ^ { 2 } - 2 ( x _ { 1 } x _ { 2 } + 6 \, \text{perms} ) } \\ & - ( e ^ { - \frac { 1 } { 2 d } \sigma _ { w _ { 0 } } ^ { 2 } \left ( ( x _ { 1 } - x _ { 4 } ) ^ { 2 } + ( x _ { 2 } - x _ { 3 } ) ^ { 2 } \right ) } + \, 2 \, \text{perms} ) \right ].$$

We see that the 2-pt function is translation invariant, but not the 4-pt function.

Euclidean-Invariant Nets . We are interested in constructing input layers that are sufficient to ensure invariance under SO d ( ) and translations, i.e., under the Euclidean group. Consider an input layer of the form

$$\mathbb { S } \colon & \mathbb { s } \colon \\ \text{in} & \quad \ell _ { i } ( x ) = F ( \mathbf w ^ { ( 0 ) } _ { \ i } ) \cos \left ( \sum _ { j } w _ { i j } ^ { ( 0 ) } x _ { j } + b _ { i } ^ { ( 0 ) } \right ), \ i \in 1, \dots, N, \quad ( 6 5 )$$

where the sum has been made explicit since i 's are not summed over, with

$$w _ { i j } ^ { ( 0 ) } \sim P ( w _ { i j } ^ { ( 0 ) } ) \quad b _ { i } ^ { ( 0 ) } \sim \text{Unif} [ - \pi, \pi ].$$

It is easy to see that x i → R x ij j for R ∈ SO d ( ) can be absorbed into a redefinition of the w (0) ij 's, and the partition function is invariant under this action provided that F ( w ( 0 ) i ) and P w ( (0) ij ) are invariant. Furthermore, arbitrary translations x j → x j + ϵ j give a term w (0) ij ϵ j that can be absorbed into a redefinition of the b (0) i that leaves the theory invariant. See [47] for the 2-pt and 4-pt functions.

We emphasize two nice features:

- · Larger Euclidean Nets. Any network that builds on ℓ without reusing its parameters is Euclidean-invariant.
- · Spectrum Shaping. In computing G (2) ( p ), b i gets evaluated on p , and F may be chosen to shape the power spectrum (momentum space propagator) arbitrarily.

We refer the reader to [47] for general calculations of ℓ -correlators and to the specializations below for simple single-layer theories. We turn the ℓ i ( x ) input layer into a scalar NN by

$$\phi ( x ) = \sum w _ { i } ^ { ( 1 ) } \ell _ { i } ( x )$$

with drawn w (1) i ∼ P w ( (1) ).

Cos-net. The architecture is defined by specifying (67) to F = 1

$$\phi ( x ) = w _ { i } ^ { ( 1 ) } \cos \left ( w _ { i j } ^ { ( 0 ) } x _ { j } + b _ { i } ^ { ( 0 ) } \right ),$$

and specific parameter densities

$$w ^ { ( 1 ) } & \sim \mathcal { N } \left ( 0, \frac { \sigma _ { w _ { 1 } } ^ { 2 } } { N } \right ) \quad w ^ { ( 0 ) } \sim \mathcal { N } \left ( 0, \frac { \sigma _ { w _ { 0 } } ^ { 2 } } { d } \right ) \quad b ^ { ( 0 ) } \sim \text{Unif} [ - \pi, \pi ]. \quad \bigoplus \text{Inf}$$

The two-point function is equivalent to that of Gauss-net

$$G ^ { ( 2 ) } ( x, y ) & = \frac { \sigma _ { w _ { 1 } } ^ { 2 } } { 2 } e ^ { - \frac { 1 } { 2 d } \sigma _ { w _ { 0 } } ^ { 2 } ( x _ { 1 } - x _ { 2 } ) ^ { 2 } }. & & ( 7 0 ) & & \text{We } ^ { 1 } \text{Euc}.$$

The connected four-point function is

$$G ^ { ( 4 ) } | _ { c } = & \frac { 1 } { 8 N } \sigma _ { w _ { 1 } } ^ { 4 } \left [ 3 \left ( e ^ { - \frac { 1 } { 2 d } \sigma _ { w _ { 0 } } ^ { 2 } ( x _ { 1 } + x _ { 2 } - x _ { 3 } - x _ { 4 } ) ^ { 2 } } + \, 2 \, \text{perms} \right ) \\ & - \left ( 2 e ^ { - \frac { 1 } { 2 d } \sigma _ { b } ^ { 2 } \left ( ( x _ { 1 } - x _ { 4 } ) ^ { 2 } + ( x _ { 2 } - x _ { 3 } ) ^ { 2 } \right ) } + \, 2 \, \text{perms} \right ) \, \right ].$$

The 2-pt function and 4-pt function are fully Euclidean invariant.

Equipped with both Cos-net and Gauss-net, we'd like to compare the two:

- · Symmetry. Cos-net is Euclidean-invariant ∀ N , by construction, while Gauss-net enjoys this symmetry only when N →∞ ; in that limit it only depends on G (2) ( x, y ).
- · LargeN Duality. As N →∞ , both theories are drawn from the same Gaussian Process, i.e., with the same G (2) ( x, y ).

Scalar-net. Here is one final example you might like, specializing (67)

$$\phi ( x ) = \sqrt { \frac { 2 \text{vol} ( B _ { \Lambda } ^ { d } ) } { ( 2 \pi ) ^ { d } \sigma _ { w _ { 1 } } ^ { 2 } } } \frac { 1 } { \sqrt { \text{w} ^ { ( 0 ) } _ { i } ^ { 2 } + m ^ { 2 } } } \ w _ { i } ^ { ( 1 ) } \cos \left ( w _ { i j } ^ { ( 0 ) } x _ { j } + b _ { i } ^ { ( 0 ) } \right ),$$

and specific parameter densities

$$w ^ { ( 1 ) } & \sim \mathcal { N } \left ( 0, \frac { \sigma _ { w _ { 1 } } ^ { 2 } } { N } \right ) \quad w ^ { ( 0 ) } \sim \text{Unif} ( B _ { \Lambda } ^ { d } ) \quad b ^ { ( 0 ) } \sim \text{Unif} [ - \pi, \pi ], \\ & \quad \text{--} \i. \, \dots \, \ n d \, \colon = \, \sum \nolimits \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon = \, \sum \nolimits \, \dots \, \colon$$

where B d Λ is a d -ball of radius Λ. The theory is translation invariant by construction, and so we compute the power spectrum of the twopoint function G (2) ( x -y ) to be

$$G ^ { ( 2 ) } ( p ) = \frac { 1 } { p ^ { 2 } + m ^ { 2 } }.$$

We see that we have a realization of the free scalar field theory in d Euclidean dimensions. See Sec. 5.2 for an extension to ϕ 4 theory.

## 4 Dynamics of Neural Networks

Having covered expressivity and statistics, we turn to dynamics. Focusing on the most elementary NN dynamics, we ask

Question: How does a NN evolve under gradient descent?

First we will study a simplification known as the neural tangent kernel (NTK), and then will use it in the case of MSE loss to solve a model exactly. We'll discuss drawbacks of the NTK, and then improve upon them with a scaling analysis that ensures feature learning.

We will study the dynamics of supervised learning with gradient descent, with data

$$\mathcal { D } & = \{ ( x _ { \alpha }, y _ { \alpha } ) \} _ { \alpha = 1 } ^ { | \mathcal { D } | }, & ( 7 5 ) \quad \text{ is t}$$

and loss function

$$\mathcal { L } [ \phi ] & = \frac { 1 } { | \mathcal { D } | } \sum _ { \alpha = 1 } ^ { | \mathcal { D } | } \ell ( \phi ( x _ { \alpha } ), y _ { \alpha } ), & ( 7 6 ) & \quad \bullet$$

We optimize the network parameters θ by gradient descent,

$$\frac { d \theta _ { i } } { d t } = - \eta \nabla _ { \theta _ { i } } \mathcal { L } [ \phi ].$$

It is also convenient to define

$$\Delta ( x ) = - \frac { \delta \ell ( \phi ( x ), y ) } { \delta \phi ( x ) }, \quad \ \ \ \ ( 7 8 ) \quad \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$$

where y is to be understood as the label associated to x , which yields

$$\frac { d \theta _ { i } } { d t } = \frac { \eta } { | \mathcal { D } | } \sum _ { \alpha = 1 } ^ { | \mathcal { D } | } \Delta ( x _ { \alpha } ) \frac { \partial \phi ( x _ { \alpha } ) } { \partial \theta _ { i } }. & & \text{so-c} \\ \text{i.e.} & & \text{i.e.}$$

as another form of the gradient descent equation, by chain rule. ∆( x ) is the natural object of gradient descent in function space.

Weuse Einstein summation throughout this section unless stated otherwise (which will happen).

## 4.1 Neural Tangent Kernel

We now arrive at a classic dynamical result in ML theory, the neural tangent kernel [48]. We train the network by gradient descent

$$\frac { d \phi ( x ) } { d t } = \frac { \partial \phi ( x ) } { \partial \theta _ { i } } \frac { d \theta _ { i } } { d t }$$

$$= \frac { \eta } { | \mathcal { D } | } \sum _ { \alpha = 1 } ^ { \ell } \Delta ( x _ { \alpha } ) \, \Theta ( x, x _ { \alpha } ),$$

where

$$\Theta ( x, x _ { \alpha } ) = \frac { \partial \phi ( x ) } { \partial \theta _ { i } } \frac { \partial \phi ( x _ { \alpha } ) } { \partial \theta _ { i } }$$

is the neural tangent kernel (NTK).

Given the short derivation, this is clearly a fundamental object, but it seems terrible to work with, because it is:

- · Parameter-dependent. For modern NNs, there are billions of parameters to sum over.
- · Time-dependent. Of course, the learning trajectory is θ t ( ), and therefore the NTK time evolves.
- · Stochastic. Since θ t ( ) begins at θ (0) sampled at initialization, the NTK inherits the randomness.

It's also non-local, communicating information about the loss at train points x α to the test point x . In summary, the NTK is unwieldy.

The reason it is a classic result, however, is that it simplifies in the N → ∞ limit. In this limit, neural network training is in the so-called

$$\text{Lazy regime} \colon \quad | \theta ( t ) - \theta ( 0 ) | \ll 1,$$

i.e. the number of parameters is large but the evolution keeps them in a local neighborhood. In such a regime the network is approximately a linear-in-parameters model [48, 49]

$$\lim _ { N \to \infty } \phi ( x ) \simeq \phi _ { \ln } ( x ) \coloneqq \phi _ { \theta _ { 0 } } ( x ) + ( \theta - \theta _ { 0 } ) _ { i } \frac { \partial \phi ( x ) } { \partial \theta _ { i } } \Big | _ { \theta _ { 0 } }, \quad ( 8 4 )$$

and we have

$$\lim _ { N \to \infty } \Theta ( x, x ^ { \prime } ) \simeq \Theta ( x, x ^ { \prime } ) \Big | _ { \theta _ { 0 } }.$$

That is, the infinite-width NTK is the NTK at initialization, provided that the network evolves as a linear model. Furthermore, in the same limit the law of large numbers often allows a sum to be replaced by an expectation value, e.g.,

$$\lim _ { N \to \infty } \Theta ( x, x ^ { \prime } ) | _ { \theta _ { 0 } } = \langle \beta _ { \theta } ( x, x ^ { \prime } ) \rangle = \colon \bar { \Theta } ( x, x ^ { \prime } ),$$

for computable β x, x ( ′ ), yielding network dynamics governed by

$$\frac { d \phi ( x ) } { d t } = - \frac { \eta } { | \mathcal { D } | } \sum _ { \alpha = 1 } ^ { | \mathcal { D } | } \frac { \delta l ( \phi ( x _ { \alpha } ), y _ { \alpha } ) } { \delta \phi ( x _ { \alpha } ) } \ \bar { \Theta } ( x, x _ { \alpha } ), \quad \quad \quad ( 8 7 ) \quad \dots.$$

where Θ is the so-called ¯ frozen NTK , a kernel that may be computed at initialization and fixed once-and-for-all. This is a dramatic simplification of the dynamics.

However, you should also complain.

Complaint: The dynamics in (87) simply interpolates between information at train points x α and test point x , according to a fixed function Θ. ¯ This isn't 'learning' in the usual NN sense, and there are zero parameters. In particular, since the NN only affects (87) through Θ, which is fixed, nothing happening ¯ dynamically in the NN is affecting the evolution. We say that in this limit the NN does not learn features in the hidden dimensions (intermediate layers), since their non-trivial evolution would cause the NTK to evolve.

Example. Let's compute the frozen NTK for a single-layer network, to get the idea. The architecture is

$$\phi ( x ) = \frac { 1 } { \sqrt { N } } \sum _ { i = 1 } ^ { N } \sum _ { j = 1 } ^ { d } w _ { i } ^ { ( 1 ) } \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } ).$$

We make the sums explicit here because one is very important. The NTK is

$$\mathbf i = \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbfi \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf j \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf k \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf l \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf  \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf f \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf I \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf r \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf u \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf n \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf e \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf v \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf t \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf } \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf | \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf { \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf i \mathbf!}$$

$$= \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \Big ( \sum _ { j, l = 1 } ^ { d } \sigma ( w _ { i j } ^ { ( 0 ) } x _ { j } ) \sigma ( w _ { i l } ^ { ( 0 ) } x _ { l } ^ { \prime } )$$

$$+ \sum _ { j = 1 } ^ { d } x _ { j } x _ { j } ^ { \prime } \, w _ { i } ^ { ( 1 ) } w _ { i } ^ { ( 1 ) } \, \sigma ^ { \prime } ( w _ { i j } ^ { ( 0 ) } x _ { j } ) \sigma ^ { \prime } ( w _ { i j } ^ { ( 0 ) } x _ { j } ^ { \prime } ) \Big ) \quad ( 9 1 )$$

$$= \colon \frac { 1 } { N } \sum _ { i } ^ { \ell } \beta _ { i } ( x, x ^ { \prime } ).$$

If you squint a little, you'll see that the i -sum is a sum over the same type of object, β i ( x, x ′ ), whose i dependence comes from all these i.i.d. parameter draws in the i -direction. By the law of large numbers, we have that in the N →∞ limit

$$\bar { \Theta } ( x, x ^ { \prime } ) = \langle \beta _ { i } ( x, x ^ { \prime } ) \rangle,$$

with no sum on i . We emphasize

Observation: The NTK in the N → ∞ limit is deterministic (parameter-independent), depending only on P θ ( ).

Sometimes, the expectation may be computed exactly, and one knows the NTK that governs the dynamics once and for all.

## 4.2 An Exactly Solvable Model

Let us consider a special case of frozen-NTK dynamics with MSE loss,

$$\ell ( \phi ( x ), y ) = \frac { 1 } { 2 } ( \phi ( x ) - y ) ^ { 2 }.$$

Then the dynamics (87) becomes

$$\frac { d \phi ( x ) } { d t } = - \frac { \eta } { | \mathcal { D } | } \sum _ { \alpha = 1 } ^ { | \mathcal { D } | } ( \phi ( x _ { \alpha } ) - y _ { \alpha } ) \bar { \Theta } ( x, x _ { \alpha } ).$$

The solution to this ODE is

$$\phi _ { t } ( x ) = \phi _ { 0 } ( x ) + \frac { 1 } { | \mathcal { D } | } \bar { \Theta } ( x, x _ { \alpha } ) \bar { \Theta } ( x _ { \alpha }, x _ { \beta } ) ^ { - 1 } \left ( \mathbb { 1 } - e ^ { - \eta \bar { \Theta } t } \right ) _ { \beta \gamma } \left ( y _ { \gamma } - \phi _ { 0 } ( x _ { \gamma } ) \right ), \quad \text{$N$-scalini} \\ \text{where computational difficulty is that $\bar{ }\Theta(x,x_{\alpha})$ is a $|\mathcal{D}|\times|\mathcal{D}|$ matrix} \quad \text{$nite tim} \\.$$

where computational difficulty is that Θ( ¯ x, x α ) is a |D| × |D| matrix and takes O ( |D| 3 ) time to invert. The solution defines a trajectory through function space from ϕ 0 to ϕ ∞ . The converged network is

$$\phi _ { \infty } ( x ) = \phi _ { 0 } ( x ) + \bar { \Theta } ( x, x _ { \alpha } ) \bar { \Theta } ( x _ { \alpha }, x _ { \beta } ) ^ { - 1 } \left ( y _ { \beta } - \phi _ { 0 } ( x _ { \beta } ) \right ). \quad \left ( 9 7 \right ) \quad \text{lectur} \,.$$

This is known as kernel regression , a classic technique in ML. In general kernel regression, one chooses the kernel. In our case, gradient descent training in the N → ∞ limit is kernel regression, with respect to a specific kernel determined by the NN, the NTK Θ. ¯

On train points we have memorization

$$\phi _ { \infty } ( x _ { \alpha } ) = y _ { \alpha } \quad \forall \alpha. \quad \text{(98)} \quad \text{(no)}$$

On test points x , the converged network is performing an interpolation, communicating residuals R β on train points β through a fixed kernel Θ to test points ¯ x . The prediction depends on ϕ 0 , but may be averaged over to obtain

$$\mu _ { \infty } ( x ) \coloneqq \langle \phi _ { \infty } ( x ) \rangle = \bar { \Theta } ( x, x _ { \alpha } ) \bar { \Theta } ( x _ { \alpha }, x _ { \beta } ) ^ { - 1 } y _ { \beta },$$

provided that ⟨ ϕ 0 ⟩ = 0, as in many initializations for the parameters. Let's put some English on the remarkable facts ,

- · µ ∞ ( x ) is the mean prediction of an ∞ number of ∞ -wide NNs trained to ∞ time.
- · If ϕ 0 is drawn from a GP, then ϕ ∞ is as well. The mean is precisely µ ∞ ( x ), see [49] for the two-point function and covariance.

## 4.3 Feature Learning

The frozen NTK is a tractable toy model, but it has a major drawback: it does not learn features. In this section we perform a more general study of learning dynamics, with a focus on choosing wise N -scaling such that features are non-trivially learned during gradient descent. To do this we will engineer three properties: that features (pre-activations) are finite at initialization, predictions evolve in finite time, and features evolve in finite time.

This section is denser than the others, so I encourage the reader to remember that we are aiming to achieve these three principles if they become overwhelmed with details. Throughout, I am following lecture notes of Pehlevan and Bordelon [50] with some changes in notation to match the rest of the lectures; see those lectures for more details, [51, 52] for original literature from those lectures that I utilize, and [53, 54] for related work on feature learning.

We study a deep feedforward network with L layers and width N , which in all is a map

$$\phi \colon \mathbb { R } ^ { D } \rightarrow \mathbb { R }$$

(note the input dimension D d ; is reserved for below) defined recursively as

$$\phi ( x ) = \frac { 1 } { \underset { \bullet } { \gamma _ { 0 } N ^ { d } } } z ^ { ( L ) } ( x )$$

$$z ^ { ( L ) } ( x ) = \frac { \ddot { 1 } } { N _ { \mathfrak { I } } ^ { a _ { L } } } w _ { i } ^ { ( L ) } \, \sigma ( z _ { i } ^ { ( L - 1 ) } ( x ) )$$

$$z _ { i } ^ { ( \ell ) } ( x ) = \frac { \ddot { 1 } } { N ^ { a _ { \ell } } } W _ { i j } ^ { ( \ell ) } \sigma ( z _ { j } ^ { ( \ell - 1 ) } ( x ) )$$

$$z _ { i } ^ { ( 1 ) } ( x ) = \frac { \cdot \cdot } { N ^ { a _ { 1 } } \sqrt { D } } W _ { i j } ^ { ( 1 ) } x _ { j }$$

where Einstein summation is implied throughout this section (unless stated otherwise) and all Latin indices run from { 1 , . . . , N } except in the j -index in the first layer , when they are { 1 , . . . , D } . The parameters are drawn

$$w _ { i } ^ { ( \ell ) } \sim \mathcal { N } \left ( 0, \frac { 1 } { N ^ { b _ { L } } } \right ) \quad W _ { i j } ^ { ( \ell ) } \sim \mathcal { N } \left ( 0, \frac { 1 } { N ^ { b _ { \ell } } } \right ). \quad \ \ ( 1 0 5 )$$

We scale the learning rate as

$$\eta = \eta _ { 0 } \gamma _ { 0 } ^ { 2 } N ^ { 2 d - c }$$

with γ , η 0 0 O (1) constants. We use a parameterization that will be convenient where d has already been introduced but c is a new parameter. For notational brevity we will sometimes use a Greek index subscript in place of inputs, e.g. z ( ℓ ) α := z ( ℓ ) ( x α ). The z 's are known as the pre-activations, as they are the inputs to the activation functions σ .

We have a standard MLP but have parameterized our ignorance of N -scaling, governed by parameters ( a , b , c, d ℓ ℓ ). We will use this freedom to set some reasonable goals :

- · Finite Initialization Pre-activations. z ( ℓ ) ∼ O N (1) ∀ l .
- · Learning in Finite Time. dϕ x /dt ( ) ∼ O N (1).
- · Feature Learning in Finite Time. dz ( ℓ ) /dt ∼ O N (1) ∀ l .

These constraints have a one-parameter family of solutions, which becomes completely fixed under an additional learning rate assumption. We take each constraint in turn.

Finite Pre-activations. Since the weights are zero mean, trivially

$$\langle z _ { \alpha } ^ { ( \ell ) } \rangle = 0 \quad \forall l. \quad \quad ( 1 0 7 ) \quad \text{ w }$$

We must also compute the covariance. For the first pre-activation, we have

$$\langle z _ { i \alpha } ^ { ( 1 ) } z _ { j \beta } ^ { ( 1 ) } \rangle = \frac { 1 } { D N ^ { 2 a _ { 1 } } } \langle w _ { i m } ^ { ( 1 ) } w _ { j n } ^ { ( 1 ) } \rangle \, x _ { m \alpha } x _ { n \beta } = \delta _ { i j } \frac { 1 } { D N ^ { 2 a _ { 1 } + b _ { 1 } } } x _ { m \alpha } x _ { m \beta }. \ ( 1 0 8 ) \quad \ A \text{ short} \ \text{ferent} \ \text{t}$$

A similar calculation for higher layers l gives

$$\Phi _ { \Omega \Omega } \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \sin \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \cos \tan \Omega ^ { \prime } } \\ \langle z _ { i \alpha } ^ { ( \ell ) } z _ { j \beta } ^ { ( \ell ) } \rangle & = \frac { 1 } { N ^ { 2 a _ { \ell } + b _ { \ell } - 1 } } \langle w _ { i m } ^ { ( 1 ) } w _ { j n } ^ { ( 1 ) } \rangle \langle \sigma ( z _ { m \alpha } ^ { ( \ell - 1 ) } ) \sigma ( z _ { m \beta } ^ { ( \ell - 1 ) } ) \rangle \quad & = ( 1 1 1 0 ) \\ & = \delta _ { i j } \frac { 1 } { N ^ { 2 a _ { \ell } + b _ { \ell } - 1 } } \langle \Phi _ { \alpha \beta } ^ { ( \ell - 1 ) } \rangle, \quad & = ( 1 1 1 1 ) \\ & \text{where}$$

where

$$\Phi _ { \alpha \beta } ^ { ( \ell ) } \coloneqq \frac { 1 } { N } \sigma ( z _ { m \alpha } ^ { ( \ell ) } ) \sigma ( z _ { m \beta } ^ { ( \ell ) } )$$

is a feature kernel . We are constructing a proof-by-induction that the pre-activations are O N (1), so at this stage we may assume that the pre-activations z ( ℓ -1) ∼ O N (1) and therefore Φ ( ℓ -1) ∼ O N (1) since it is the average of N O N (1) quantities σ z ( ( ℓ -1) mα ). With this in hand,

$$2 a _ { 1 } + b _ { 1 } = 0 \quad 2 a _ { \ell } + b _ { \ell } = 1 \ \forall l > 1, \quad \quad ( 1 1 3 )$$

ensures that the pre-activations z ( ℓ ) are O N (1), as is empirically required for well-behaved training.

As an aside: in the N →∞ limit feature kernels asymptote to deterministic objects, akin to the frozen NTK behavior we have already seen, and intermediate layer pre-activations z ( ℓ ) α are also Gaussian distributed. Therefore in that limit, the statistics of a randomly initialized neural network is described by a sequence of generalized free field theories where correlations are propagated down the network according to a recursion relation; see, e.g., [55, 49].

Learning in Finite Time. Similar to our NTK derivation, we have

$$\frac { d \phi ( x ) } { d t } = \frac { \eta } { | \mathcal { D } | } \sum _ { \alpha = 1 } ^ { | \mathcal { D } | } \Delta ( x _ { \alpha } ) \frac { \partial \phi ( x _ { \alpha } ) } { \partial \theta _ { i } } \frac { \partial \phi ( x ) } { \partial \theta _ { i } },$$

We have that

$$\frac { d \phi ( x ) } { d t } \sim O _ { N } ( 1 ) \ \leftrightarrow \ \frac { \gamma _ { 0 } ^ { 2 } N ^ { 2 d } } { N ^ { c } } \frac { \partial \phi ( x _ { \alpha } ) } { \partial \theta _ { i } } \frac { \partial \phi ( x ) } { \partial \theta _ { i } } \sim O _ { N } ( 1 ). \quad \ ( 1 1 5 )$$

A short calculation involving a chain rule, keeping track of the different types of layers, and tedium yields

$$\text{item types on layers, and use sum } \frac { \eta _ { 0 } \gamma _ { 0 } ^ { 2 } N ^ { 2 d } } { N ^ { c } } \frac { \partial \phi ( x _ { \alpha } ) } { \partial \theta _ { i } } \frac { \partial \phi ( x ) } { \partial \theta _ { i } } & = \frac { 1 } { N ^ { c } } \left [ \frac { 1 } { N ^ { 2 a _ { L } - 1 } } \Phi _ { \mu \nu } ^ { ( L - 1 ) } \\ & + \sum _ { \ell = 2 } ^ { L - 1 } \frac { 1 } { N ^ { 2 a _ { \ell } - 1 } } G _ { \alpha x } ^ { ( \ell ) } \Phi _ { \alpha x } ^ { ( \ell - 1 ) } + \frac { 1 } { N ^ { 2 a _ { 1 } } } G _ { \alpha x } ^ { ( 1 ) } \Phi _ { \alpha x } ^ { ( 0 ) } \right ] \\ & \text{--} \i \dots$$

where

$$G _ { \mu \nu } ^ { ( \ell ) } = \frac { 1 } { N } g _ { i \mu } ^ { ( \ell ) } \, g _ { i \nu } ^ { ( \ell ) }, \quad g _ { i \mu } ^ { ( \ell ) } = \sqrt { N } \, \frac { \partial z _ { \mu } ^ { ( L ) } } { \partial z _ { i \mu } ^ { ( \ell ) } } \, \quad \quad ( 1 1 7 )$$

arises naturally when doing a chain rule through the layers and x in the subscript is a stand-in for an arbitrary input x . Some additional work [50] shows that g, G ∼ O N (1). Since we've shown that the feature kernels are also O N (1), then if

$$2 a _ { 1 } + c = 0, \quad 2 a _ { \ell } + c = 1 \ \forall l > 1, \quad \quad ( 1 1 8 )$$

we have that dϕ x ( ) dt ∼ O N (1), i.e., predictions evolve in finite time, and therefore learning happens in finite time.

Features Evolve in Finite Time. Finally, we need the features to evolve. For the first layer we compute

$$\frac { d z _ { i \mu } ^ { ( 1 ) } } { d t } = \frac { 1 } { N ^ { a _ { 1 } } \sqrt { D } } \frac { d W _ { i j } } { d t } x _ { j \mu } = \frac { 1 } { N ^ { 2 a _ { 1 } + c - d + 1 / 2 } } \frac { \eta _ { 0 } \gamma _ { 0 } } { | \mathcal { D } | } \sum _ { \nu = 1 } ^ { | \mathcal { D } | } \Delta _ { \nu } g _ { i \nu } ^ { ( 1 ) } \Phi _ { \mu \nu } ^ { ( 0 ) }, \\ \prod _ { \dots }$$

where the only N -dependence arises from the exponent. Given (118),

$$d = \frac { 1 } { 2 } & & ( 1 2 0 ) & & w \\ & & & \text{in}$$

is required to have dz (1) /dt ∼ O N (1), a constraint that in fact persists for all dz ( ℓ ) /dt . We note that we have

## No feature learning: if d &lt; 1 2 ,

which applies in particular to the NTK regime d = 0.

Summarizing the Constraints . Putting it all together, by enforcing finite pre-activations and that predictions and features evolve in finite time, we have constraints given by

$$2 a _ { 1 } + b _ { 1 } & = 0 & ( 1 2 1 )$$

$$2 a _ { \ell } + b _ { \ell } = 1 \quad \forall l > 1 & & ( 1 2 2 ) & & \text{Yot}$$

$$2 a _ { 1 } + c & = 0 & ( 1 2 3 ) & \quad \text{req}$$

$$2 a _ { \ell } + c = 1 \quad \forall l > 1$$

$$d = \frac { 1 } { 2 }.$$

These constraints are solves by a one-parameter family depending on a ∈ R

$$( a _ { \ell }, b _ { \ell }, c _ { \ell } ) = ( a, 1 - 2 a, 1 - 2 a ) \quad \forall l > 1 \quad \quad \ \ ( 1 2 6 )$$

$$( a _ { 1 }, b _ { 1 }, c _ { 1 } ) = ( a - \frac { 1 } { 2 }, 1 - 2 a, 1 - 2 a ).$$

If one makes the addition demands that η ∼ O N ( N 2 d -c ) is O N (1), so that you don't have to change the learning rate as you scale up, then c = 1 is fixed and there is a unique solution. This scaling is known as the maximal update parameterization , or µP [51].

## 5 NN-FT Correspondence

Understanding the statistics and dynamics of NNs has led us naturally to objects that we are used to from field theory. The idea has been to understand ML theory, but one can also ask the converse, whether ML theory gives new insights into field theory. With that in mind, we ask

## Question: What is a field theory?

At the very least, a field theory needs

- · Fields , functions from an appropriate function space, or sections of an appropriate bundle, more generally.
- · Correlation Functions of fields, here expressed as scalars

$$G ^ { ( n ) } ( x _ { 1 }, \dots, x _ { n } ) = \langle \phi ( x _ { 1 } ) \dots \phi ( x _ { n } ) \rangle. \text{ \quad \ \ } ( 1 2 8 )$$

You might already be wanting to add more beyond these minimal requirements - we'll discuss that in a second. For now, we have

Answer: a FT is an ensemble of functions with a way to compute their correlators.

In the Euclidean case, when the expectation is a statistical expectation, one my say

Euclidean Answer: a FT is a statistical ensemble of functions.

Our minimal requirements get us a partition function

$$Z [ J ] = \langle e ^ { \int d ^ { d } x J ( x ) \phi ( x ) } \rangle & & ( 1 2 9 ) \quad \text{it $l$}$$

that we can use to compute correlators, where at this stage we are agnostic about the definition of ⟨·⟩ . In normal field theory, the ⟨·⟩ is defined by the Feynman path integral

$$Z [ J ] & = \int \mathcal { D } \phi \, e ^ { - S [ \phi ] + \int d ^ { d } x J ( x ) \phi ( x ) }, & ( 1 3 0 ) & \quad \text{for} \, \quad \text{a}$$

which requires specifying an action S ϕ [ ] that determines a density on functions exp( -S ϕ [ ]). But that's not the data we specify when we specify a NN. The NN data ( ϕ , P θ ( θ )) instead defines

$$Z [ J ] & = \int d \theta P ( \theta ) e ^ { \int d ^ { d } x J ( x ) \phi _ { \theta } ( x ) }. & ( 1 3 1 ) & \quad \text{We}.$$

These are two different ways of defining a field theory, and indeed given ( ϕ , P θ ( θ )) one can try to work out the associated action, in which case we have dual description of the same field theory, as in the NNGP correspondence. The parameter space description is already quite useful, though, as it enables the computation of correlation functions even if the action isn't known. In certain cases it enables the computation of exact correlators in interacting theories.

Okay, you get it, this is a different way to do field theory. Now I'll let you complain about my definition. You're asking

Question: Shouldn't my definition of field theory include X ?

I'm writing this before I give the lecture, and my guess is you already asked about a set of X 's, e.g.

X ∈ { Quantum , Lagrangian , Symmetries , Locality , . . . } . (132)

The problem is that with any such X , there's usually some community of physicists that doesn't care. For instance, not all statistical field theories are Wick rotations of quantum theories; not all field theories have a known Lagrangian; not all field theories have symmetry; not all field theories are local. So I'm going to stick with my definition, because at a minimum I want fields and correlators.

Instead, if your X isn't included in the definition of field theory, it becomes an engineering problem. Whether you're defining your specific theory by S ϕ [ ], ( ϕ , P θ ( θ )), or something else, you can ask

Question: Can I engineer my defining data to get FT + X ?

For X = Symmetries you've already seen ways to do this at the level of actions in QFT1 and at the level of ( ϕ , P θ ( θ )) in these lectures.

For a current account of recent progress in NN-FT, see the rather long Introduction of [37] and associated references, as well as results.

## 5.1 Quantum Field Theory

We've been on Euclidean space the whole time , so it's natural to 1 wonder in what sense these field theories are quantum . In a course on field theory, we first learn to canonically quantize and then at some later point learn about Wick rotation, and how it can define Euclidean correlators. The theory is manifestly quantum.

But given a Euclidean theory, can it be continued to a well-behaved quantum theory in Lorentzian signature, e.g. with unitary time evolution and a Hilbert space without negative norm states? If we have a nice-enough local action, it's possible, but what if we don't have an action? We ask:

Question: Given Euclidean correlators, can the theory be continued to a well-behaved Lorentzian quantum theory?

This is a central question in axiomatic quantum field theory, and the answer is that it depends on the properties of the correlators. The

1 This can be relaxed, see e.g. for a recent paper defining an equivariant network in Lorentzian signature [56].

Osterwalder-Schrader (OS) theorem [57] gives a set of conditions on the Euclidean correlators that ensure that the theory can be continued to a unitary Lorentzian theory that satisfies the Wightman axioms. The conditions of the theorem include

- · Euclidean Invariance . The correlators are invariant under the Euclidean group, which after continuation to Lorentzian signature becomes the Poincar´ group. e
- · Permutation Invariance of the correlators G ( n ) ( x , . . . , x 1 n ) under any permutation of the x , . . . , x 1 n .
- · Reflection Positivity . Having time in Lorentzian signature requires picking a Euclidean time direction τ . Let R x ( ) be the reflection of x in the τ = 0 plane. Then reflection positivity requires that

$$G ^ { ( 2 n ) } ( x _ { 1 }, \dots, x _ { n }, R ( x _ { 1 } ), \dots, R ( x _ { n } ) ) \geq 0. \quad \ \ ( 1 3 3 ) \quad \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$$

Technically, this is necessary but not sufficient. An accessible elaboration can be found in notes [58] from a previous TASI.

- · Cluster Decomposition occurs when the connected correlators vanish when any points are infinitely far apart.

If all of these are satisfied, then the pair ( ϕ , P θ ( θ )) that defines the NN-FT actually defines a neural network quantum field theory [47]. In NN-FT, permutation invariance is essentially automatic and Euclidean invariance may be engineered as described in Section 3.3. Cluster decomposition and reflection positivity hold in some examples [47, 37], but systematizing their construction is an important direction for future work.

There is at least one straightforward way to obtain an interacting NN-QFT. Notably, if ( ϕ , P θ ( θ )) is a NNGP that satisfies the OS axioms (this is much easier [47]) with Gaussian partition function

$$Z _ { G } [ J ] & = \int d \theta P ( \theta ) e ^ { \int d ^ { d } x J ( x ) \phi _ { \theta } ( x ) }, & ( 1 3 4 ) & \quad \text{the}$$

then one may insert an operator associated to any local potential V ( ϕ ), which deforms the action in the expected way and the NN-FT to

$$Z [ J ] = \int d \theta P ( \theta ) e ^ { \int d ^ { d } x V ( \phi _ { \theta } ( x ) ) } e ^ { \int d ^ { d } x J ( x ) \phi _ { \theta } ( x ) }$$

$$= \colon \int d \theta \tilde { P } ( \theta ) e ^ { \int d ^ { d } x J ( x ) \phi _ { \theta } ( x ) },$$

where the architecture equation ϕ θ ( x ) lets us sub out the abstract expression for a concrete function of parameters, defining a new density on parameters ˜ ( P θ ) in the process. The interactions in V ( ϕ ) break Gaussianity of the NNGP that was ensured by a CLT. This means a CLT assumption must be violated: it is the breaking of statistical independence in ˜ ( P θ ). The theory Z J [ ] defined by ( ϕ , P θ ˜ ( θ )) is an interacting NN-QFT, since local potentials that deformed Gaussian QFTs still satisfy reflection positivity and cluster decomposition.

## 5.2 ϕ 4 Theory

With this discussion of operator insertions, it's clear now how to get ϕ 4 theory. We just insert the operator

$$e ^ { \int d ^ { d } x \phi _ { \theta } ( x ) ^ { 4 } }$$

into the partition function associated to the free scalar of Section 3.3; this operator with the architecture (72) technically requires an IR cutoff, though other architectures realizing the free scalar may not. The operator insertion deforms the parameter densities in (73) and breaks their statistical independence, explaining the origin of interactions in the NN-QFT. See [37] for a thorough presentation.

## 5.3 Open Questions

In this section we've discussed a neural network approach to field theory in which the partition function is an integral over probability densities of parameters, and the fields (networks) are functions of these parameters. We have summarized some essential results, but there are many outstanding questions:

- · Reflection Positivity . Is there a systematic way to engineer NN-FTs ( ϕ , P θ ( θ )) that satisfy reflection positivity?
- · Cluster Decomposition . Can systematically understand the conditions under which cluster decomposition holds in NN-FT?
- · Engineering Actions . How generally can we define an NN-FT that is equivalent to a field theory with a fixed action?
- · Locality in the action can be realized at infiniteN , but is there a fundamental obstruction at finiteN ?

On the other hand, an NN-FT approach to CFT and to Grassmann fields is well underway and should appear in 2024.

## 6 Recap and Outlook

Neural networks are the backbone of recent progress in ML. In these lectures we took the perspective that to understand ML, we must understand neural networks, and built our study around three pillars: the expressivity, statistics, and dynamics of neural networks.

Let's recap the essentials and then provide some outlook. In Section 2 on expressivity, we asked 'How powerful is a NN?' We presented the Universal Approximation Theorem (UAT) and gave a picture demonstrating how it works. We also presented the KolmogorovArnold Representation Theorem (KART), which recently motivated a new architecture for deep learning where activations are learned and live on the edges. We wonder:

Outlook: Cybenko's UAT was around for over 20 years before the empirical breakthroughs of the 2010's. Existence of good approximators wasn't enough, we needed better compute and optimization schemes to find them dynamically. However, given tremendous progress in dynamics, should we systematically return to the approximation theory literature, to help motivate new architectures, as e.g., in KART and KAN?

In Section 3 on statistics, I reminded the reader that a randomly initialized NN is no more fundamental than a single role of the dice. It is a random function with parameters that is drawn from a statistical ensemble of NNs, and we asked 'What characterizes the statistics of the NN ensemble?' I reviewed a classic result of Neal from the 90's that demonstrated that under common assumptions a widthN feedforward network is drawn from a Gaussian Process - a Gaussian density on functions - in the N →∞ limit. I explained that work from the last decade has demonstrated that this result generalizes to many different architectures, as a result of the Central Limit Theorem. Non-Gaussianities therefore arise by violating an assumption of the Central Limit Theorem, such as N → ∞ or statistical independence, and by violating them weakly the non-Gaussianities can be made parametrically small. In field theory language, NNGPs are generalized free field theories and NN Non-Gaussian processes are interacting field theories. I also introduced a mechanism for global symmetries and exemplified many of the phenomena in the section.

In Section 4 I presented some essential results from ML theory on NN dynamics, asking 'How does a NN evolve under gradient descent?' When trained with full-batch gradient descent and a particular normalization, the network dynamics are governed by the Neural Tangent Kernel (NTK) that in general is an intractable object. However, in N →∞ limits it becomes a deterministic function and the NTK at initialization governs the dynamics for all time. An exactly solvable model with mean-squared error loss is presented that includes the mean prediction of an infinite number of infinitely wide neural networks trained to infinite time. The mean network prediction is equivalent to kernel regression, and the kernel communicates information from train points to test points in order to make predictions. However, from this description of the NTK a problem is already clear: nothing is being learned, and in particular latetime features in the hidden dimensions are in a local neighborhood of their initial values. I showed how a detailed N -scaling analysis allows one to demand that network features and predictions update non-trivially, leading to richer learning regimes known as dynamical mean field theory or the maximal update parameterization.

Outlook: These recent theories of NN statistics and dynamics sometimes realize interesting toy models, but with known shortcomings from a learning perspective, though the N -scaling analysis in the feature learning section is promising. Surely there is still much to learn overall, e.g., we have said very little in these lectures about architecture design principles. For instance, some architectures, such as the Transformers [59] central to LLMs, are motivated by structural principles, whereas others are motivated by theoretical guarantees.

What are the missing principles that combines statistics, dynamics, and architecture design to achieve optimal learning?

Finally, in Section 5 I explained how neural networks provide a new way to define a field theory, so that one might use ML theory for physics and not just physics for ML theory. This NN-FT correspondence is a rethink of field theory from an ML perspective, and I tried to state clearly about what is and isn't known about obtaining cherished field theory properties in that context. For example, I explained how by engineering a desired NNGP, such as the free scalar, one may do an operator insertion in the path integral and interpret the associated interactions as breaking the statistical independence necessary for the CLT. By such a mechanism, one may engineer ϕ 4 theory in an ensemble of infinite width neural networks.

Outlook: Can NN-FTs motivate new interesting physics theories or provide useful tools for studying known theories?

Our discussion in this Section is directly correlated with the topics of these lectures. It reviews recent theoretical progress, but the careful reader surely has a sense that theory is significantly behind experiment and there is still much to do. It is a great time to enter the field, and to that end I recommend carefully reading the literature that I've cited, as well as the book Geometric Deep Learning [60] that covers many current topics that will be natural to a physicist, including grids, groups, graphs, geodesics, and gauges. Many aspects of that book are related to principled architecture design, which complements the statistical and dynamical approach that I've taken in these lectures. I also recommend the book Deep Learning [61] for a more comprehensive introduction to the field.

I end with a final analogy between history and the current situation in ML. We are living in an ML era akin to the pre-PC era in classical computing. Current large language models (LLMs) or other deep networks are by now very powerful, but are the analogs of roomsized computers that can only be fully utilized by the privileged. Whereas harnessing the power of those computers in the 60's required access to government facilities or large laboratories, only billion dollar companies have sufficient funds and compute to train today's LLMs from scratch. Just as the PC revolution brought computing power to the masses in the 80's, a central question now is whether we can do the analog in ML by learning how to train equally powerful small models with limited resources. Doing so likely requires a deeper understanding of theory, especially with respect to sparse networks.

Acknowledgements: I would like to thank the students and organizers of TASI for an inspiring scientific environment and many excellent questions. I am grateful for the papers of and discussions with friends whose works have contributed significantly to these lectures, especially Yasaman Bahri, Cengiz Pehlevan, and Greg Yang. I'd also like to thank my collaborators on related matters, including Mehmet Demirtas, Anindita Maiti, Fabian Ruehle, Matt Schwartz, and Keegan Stoner. I would like to thank Sam Frank, Yikun Jiang, and Sneh Pandya for correcting typos in a draft. Finally, thanks to GitHub Copilot for its help in writing these notes, including the correct auto-completion of equations and creation of tikz figures! Two-column landscape mode was chosen to facilitate boardwork, but I think it also makes a pleasant read, HT @ [62]. I am supported by the National Science Foundation under CAREER grant PHY1848089 and Cooperative Agreement PHY-2019786 (The NSF AI Institute for Artificial Intelligence and Fundamental Interactions).

Disclaimers: In an effort to post these notes shortly after TASI 2024, there are more typos and fewer references than is ideal. Other

references and topics may be added in the future to round out the content that was presented in real-time. I also struck a playful tone throughout, because lectures are supposed to be fun, but may have overdone it at times. I welcome suggestions on the above, but updates will still aim for clarity and brevity, targeted at HET students.

## A Central Limit Theorem

Let us recall a simple derivation of the Central Limit Theorem (CLT), in order to better understand the statistics of neural networks. Consider a sum of random variables

$$\phi = \frac { 1 } { \sqrt { N } } \sum _ { i = 1 } ^ { N } X _ { i }, \quad \quad ( 1 3 8 ) \quad \$$

with ⟨ X i ⟩ = 0. The moments µ r and cumulants κ r are determined by the moment generating function (partition function) Z J [ ] = ⟨ e Jϕ ⟩ and cumulant generating function W J [ ] = log Z J [ ], respectively, as

$$\mu _ { r } = \underset { \tau \ \,, \ \, \times \ r } { \left ( \frac { d } { d J } \right ) } ^ { r } Z [ J ] \Big | _ { J = 0 } \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \ \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \cdots \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \col. \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \col. \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colon \, \colots \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \,
 \quad \quad \quad$$

$$\kappa _ { r } = \left ( \frac { \dots } { d J } \right ) ^ { r } W [ J ] \Big | _ { J = 0 } ^ { \vdots _ { J = 0 } }.$$

If the X i are independent random variables, then the partition function factorizes Z ∑ i X i [ J ] = ∏ i Z X i [ J ], and the cumulant generating function of the sum is the sum of the cumulant generating functions, yielding

$$W _ { \Sigma _ { i } \, X _ { i } } [ J ] = \sum _ { i } W _ { X _ { i } } [ J ] & & ( 1 4 1 ) & & [ 4 ]$$

$$\kappa _ { r } ^ { \sum X _ { i } } = \sum _ { i } \kappa _ { r } ^ { X _ { i } }.$$

If the X i are identically distributed, then the cumulants κ X i r are the same for all i and we account for the 1 / √ N appropriately, we obtain

$$\kappa _ { r } ^ { \phi } = \frac { \kappa _ { r } ^ { X _ { i } } } { N ^ { r / 2 - 1 } }.$$

This yields

$$\lim _ { N \to \infty } \kappa _ { r > 2 } ^ { \phi } = 0,$$

which is sufficient to show that ϕ is Gaussian in the largeN limit. In physics language, cumulants are connected correlators, and (144) means that Gaussian (free) theories have no connected correlators.

In neural networks we will be interested in studying certain Gaussian limits. From this CLT derivation, we see two potential origins of non-Gaussianity:

- · 1 /N -corrections from appearance in κ ϕ r .
- · Independence breaking since the proof relied on (141).

## References

- [1] W. Isaacson, The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution . Simon &amp; Schuster, New York, first simon &amp; schuster hardcover edition ed., 2014. On Shelf.
- [2] D. Silver, J. Schrittwieser, et al. , 'Mastering the game of go without human knowledge,' Nature 550 no. 7676, (Oct, 2017) 354-359. https://doi.org/10.1038/nature24270 .
- [3] D. Silver, T. Hubert, et al. , 'Mastering chess and shogi by self-play with a general reinforcement learning algorithm,' arXiv preprint arXiv:1712.01815 (2017) .
- [4] B. LeMoine, 'How the artificial intelligence program alphazero mastered its games,' The New Yorker (Jan, 2023) . https:// www.newyorker.com/science/elements/how-the-artificia l-intelligence-program-alphazero-mastered-its-games .
- [5] J. Sohl-Dickstein, E. Weiss, N. Maheswaranathan, and S. Ganguli, 'Deep unsupervised learning using nonequilibrium thermodynamics,' in International conference on machine learning , pp. 2256-2265, PMLR. 2015.

- [6] Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, and B. Poole, 'Score-based generative modeling through stochastic differential equations,' arXiv preprint arXiv:2011.13456 (2020) .
- [7] A. Ananthaswamy, 'The physics principle that inspired modern ai art,' Quanta Magazine (Jan, 2023) . https://www.quantamagazine.org/the-physics-principle -that-inspired-modern-ai-art-20230105/ .
- [8] T. Brown, B. Mann, et al. , 'Language models are few-shot learners,' in Advances in Neural Information Processing Systems , H. Larochelle, M. Ranzato, R. Hadsell, M. Balcan, and H. Lin, eds., vol. 33, pp. 1877-1901. Curran Associates, Inc., 2020. https://proceedings.neurips.cc/paper\_files/paper/202 0/file/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf .
- [9] K. Roose, 'The brilliance and weirdness of chatgpt,' The New York Times (Dec, 2022) . https://www.nytimes.com/2022/1 2/05/technology/chatgpt-ai-twitter.html .
- [10] A. Bhatia, 'Watch an a.i. learn to write by reading nothing but shakespeare,' The New York Times (Apr, 2023) . https://www.nytimes.com/interactive/2023/04/26/upsho t/gpt-from-scratch.html .
- [11] S. Bubeck, V. Chandrasekaran, et al. , 'Sparks of artificial general intelligence: Early experiments with gpt-4,' arXiv preprint arXiv:2303.12712 (2023) .
- [12] J. Jumper, R. Evans, et al. , 'Highly accurate protein structure prediction with alphafold,' Nature 596 no. 7873, (Aug, 2021) 583-589. https://doi.org/10.1038/s41586-021-03819-2 .
- [13] G. Carleo and M. Troyer, 'Solving the quantum many-body problem with artificial neural networks,' Science 355 no. 6325, (2017) 602-606.
- [14] J. Carrasquilla and R. G. Melko, 'Machine learning phases of matter,' Nature Physics 13 no. 5, (2017) 431-434.
- [15] L. B. Anderson, M. Gerdes, J. Gray, S. Krippendorf, N. Raghuram, and F. Ruehle, 'Moduli-dependent Calabi-Yau and SU(3)-structure metrics from Machine Learning,' JHEP 05 (2021) 013, arXiv:2012.04656 [hep-th] .
- [16] M. R. Douglas, S. Lakshminarasimhan, and Y. Qi, 'Numerical Calabi-Yau metrics from holomorphic networks,' arXiv:2012.04797 [hep-th] .
- [17] V. Jejjala, D. K. Mayorga Pena, and C. Mishra, 'Neural network approximations for Calabi-Yau metrics,' JHEP 08 (2022) 105, arXiv:2012.15821 [hep-th] .
- [18] S. Gukov, J. Halverson, and F. Ruehle, 'Rigor with machine learning from field theory to the poincar´ conjecture,' e Nature Reviews Physics (2024) 1-10.
- [19] 'Iaifi summer workshop 2023,' IAIFI - Institute for Artificial Intelligence and Fundamental Interactions. 2023. https://iaifi.org/events/summer\_workshop\_2023.html .
- [20] 'Machine learning and the physical sciences,' in Proceedings of the Neural Information Processing Systems (NeurIPS) Workshop on Machine Learning and the Physical Sciences . Neural Information Processing Systems Foundation, Inc., 2023. https://ml4physicalsciences.github.io/2023/ .
- [21] G. Carleo, I. Cirac, K. Cranmer, L. Daudet, M. Schuld, N. Tishby, L. Vogt-Maranto, and L. Zdeborov´, 'Machine a learning and the physical sciences,' Rev. Mod. Phys. 91 no. 4, (2019) 045002, arXiv:1903.10563 [physics.comp-ph] .
- [22] 'Tasi 2024: Frontiers in particle theory.' 2024. https://www.colorado.edu/physics/events/summer-inten sive-programs/theoretical-advanced-study-institute-e

- lementary-particle-physics-current . Summer Intensive Programs, University of Colorado Boulder.
- [23] H. Robbins and S. Monro, 'A Stochastic Approximation Method,' The Annals of Mathematical Statistics 22 no. 3, (1951) 400 - 407. https://doi.org/10.1214/aoms/1177729586 .
- [24] F. Rosenblatt, 'The perceptron: a probabilistic model for information storage and organization in the brain.' Psychological review 65 6 (1958) 386-408. https://api.semanticscholar.org/CorpusID:12781225 .
- [25] D. P. Kingma and J. Ba, 'Adam: A method for stochastic optimization.' 2017. https://arxiv.org/abs/1412.6980 .
- [26] G. B. De Luca and E. Silverstein, 'Born-infeld (bi) for ai: Energy-conserving descent (ecd) for optimization,' in International Conference on Machine Learning , pp. 4918-4936, PMLR. 2022.
- [27] G. B. De Luca, A. Gatti, and E. Silverstein, 'Improving energy conserving descent for machine learning: Theory and practice,' arXiv preprint arXiv:2306.00352 (2023) .
- [28] G. Cybenko, 'Approximation by superpositions of a sigmoidal function,' Mathematics of Control, Signals and Systems 2 no. 4, (1989) 303-314.
- [29] K. Hornik, M. Stinchcombe, and H. White, 'Approximation capabilities of multilayer feedforward networks,' Neural Networks 4 no. 2, (1991) 251-257.
- [30] A. N. Kolmogorov, 'On the representation of continuous functions of several variables by superpositions of continuous functions of one variable and addition,' Doklady Akademii Nauk SSSR 114 (1957) 953-956.
- [31] V. I. Arnold, 'On functions of three variables,' Doklady Akademii Nauk SSSR 114 (1957) 679-681.
- [32] Z. Liu, Y. Wang, S. Vaidya, F. Ruehle, J. Halverson, M. Soljaˇi´, T. Y. Hou, and M. Tegmark, 'KAN: c c Kolmogorov-Arnold Networks,' arXiv:2404.19756 [cs.LG] .
- [33] R. M. Neal, 'Bayesian learning for neural networks,' Lecture Notes in Statistics 118 (1996) .
- [34] C. K. Williams, 'Computing with infinite networks,' Advances in neural information processing systems (1997) .
- [35] A. Krizhevsky, I. Sutskever, and G. E. Hinton, 'Imagenet classification with deep convolutional neural networks,' in Advances in Neural Information Processing Systems , F. Pereira, C. Burges, L. Bottou, and K. Weinberger, eds., vol. 25. Curran Associates, Inc., 2012. https://proceedings.neurips.cc/paper\_files/paper/201 2/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf .
- [36] G. Yang, 'Wide feedforward or recurrent neural networks of any architecture are gaussian processes,' Advances in Neural Information Processing Systems 32 (2019) .
- [37] M. Demirtas, J. Halverson, A. Maiti, M. D. Schwartz, and K. Stoner, 'Neural network field theories: non-Gaussianity, actions, and locality,' Mach. Learn. Sci. Tech. 5 no. 1, (2024) 015002, arXiv:2307.03223 [hep-th] .
- [38] S. Yaida, 'Non-gaussian processes and neural networks at finite widths,' in Mathematical and Scientific Machine Learning , pp. 165-192, PMLR. 2020.
- [39] T. Cohen and M. Welling, 'Group equivariant convolutional networks,' in Proceedings of The 33rd International Conference on Machine Learning , M. F. Balcan and K. Q. Weinberger, eds., vol. 48 of Proceedings of Machine Learning Research , pp. 2990-2999. PMLR, New York, New York, USA,

- 20-22 jun, 2016. https://proceedings.mlr.press/v48/cohenc16.html .
- [40] M. Winkels and T. S. Cohen, '3d g-cnns for pulmonary nodule detection,' arXiv preprint arXiv:1804.04656 (2018) .
- [41] J. Kaplan, S. McCandlish, T. Henighan, T. B. Brown, B. Chess, R. Child, S. Gray, A. Radford, J. Wu, and D. Amodei, 'Scaling laws for neural language models,' arXiv preprint arXiv:2001.08361 (2020) .

[42]

S. Batzner, A. Musaelian, L. Sun, M. Geiger, J. P. Mailoa,

M. Kornbluth, N. Molinari, T. E. Smidt, and B. Kozinsky,

'E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials,'

Nature Communications

13

no. 1, (May, 2022) 2453.

https://doi.org/10.1038/s41467-022-29939-5

.

- [43] N. Frey, R. Soklaski, S. Axelrod, S. Samsi, R. Gomez-Bombarelli, C. Coley, et al. , 'Neural scaling of deep chemical models,' ChemRxiv (2022) . This content is a preprint and has not been peer-reviewed.
- [44] D. Boyda, G. Kanwar, S. Racani` ere, D. J. Rezende, M. S. Albergo, K. Cranmer, D. C. Hackett, and P. E. Shanahan, 'Sampling using su (n) gauge equivariant flows,' Physical Review D 103 no. 7, (2021) 074504.
- [45] A. Maiti, K. Stoner, and J. Halverson, 'Symmetry-via-Duality: Invariant Neural Network Densities from Parameter-Space Correlators,' arXiv:2106.00694 [cs.LG] .
- [46] J. Halverson, A. Maiti, and K. Stoner, 'Neural Networks and Quantum Field Theory,' Mach. Learn. Sci. Tech. 2 no. 3, (2021) 035002, arXiv:2008.08601 [cs.LG] .
- [47] J. Halverson, 'Building Quantum Field Theories Out of Neurons,' arXiv:2112.04527 [hep-th] .
- [48] A. Jacot, F. Gabriel, and C. Hongler, 'Neural tangent kernel: Convergence and generalization in neural networks,' in Advances in Neural Information Processing Systems , S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, eds., vol. 31. Curran Associates, Inc., 2018. https://proceedings.neurips.cc/paper\_files/paper/201 8/file/5a4be1fa34e62bb8a6ec6b91d2462f5a-Paper.pdf .
- [49] J. Lee, L. Xiao, S. Schoenholz, Y. Bahri, R. Novak, J. Sohl-Dickstein, and J. Pennington, 'Wide neural networks of any depth evolve as linear models under gradient descent,' Advances in neural information processing systems 32 (2019) .
- [50] C. Pehlevan and B. Bordelon, 'Lecture notes on infinite-width limits of neural networks.' August, 2024. https://mlschool.princeton.edu/events/2023/pehlevan . Princeton Machine Learning Theory Summer School, August 6 - 15, 2024.
- [51] G. Yang and E. J. Hu, 'Feature learning in infinite-width neural networks,' arXiv preprint arXiv:2011.14522 (2020) .
- [52] B. Bordelon and C. Pehlevan, 'Self-consistent dynamical field theory of kernel evolution in wide neural networks,' Advances in Neural Information Processing Systems 35 (2022) 32240-32256.
- [53] D. A. Roberts, S. Yaida, and B. Hanin, The principles of deep learning theory , vol. 46. Cambridge University Press Cambridge, MA, USA, 2022.
- [54] S. Yaida, 'Meta-principled family of hyperparameter scaling strategies,' arXiv preprint arXiv:2210.04909 (2022) .
- [55] S. S. Schoenholz, J. Gilmer, S. Ganguli, and J. Sohl-Dickstein, 'Deep information propagation,' arXiv preprint arXiv:1611.01232 (2016) .

- [56] M. Zhdanov, D. Ruhe, M. Weiler, A. Lucic, J. Brandstetter, and P. Forr´, 'Clifford-steerable convolutional neural e networks,' arXiv preprint arXiv:2402.14730 (2024) .
- [57] K. Osterwalder and R. Schrader, 'AXIOMS FOR EUCLIDEAN GREEN'S FUNCTIONS,' Commun. Math. Phys. 31 (1973) 83-112.
- [58] D. Simmons-Duffin, 'The Conformal Bootstrap,' in Theoretical Advanced Study Institute in Elementary Particle Physics: New Frontiers in Fields and Strings , pp. 1-74. 2017. arXiv:1602.07982 [hep-th] .
- [59] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, glyph[suppress] L. Kaiser, and I. Polosukhin, 'Attention is all you need,' Advances in neural information processing systems 30 (2017) .
- [60] M. M. Bronstein, J. Bruna, T. Cohen, and P. Veliˇkovi´, c c 'Geometric deep learning: Grids, groups, graphs, geodesics, and gauges,' arXiv preprint arXiv:2104.13478 (2021) .
- [61] I. J. Goodfellow, Y. Bengio, and A. Courville, Deep Learning . MIT Press, Cambridge, MA, USA, 2016. http://www.deeplearningbook.org .
- [62] P. Ginsparg, 'Applied conformal field theory,' arXiv preprint hep-th/9108028 (1988) .
Jim Halverson
TASI Lectures on Physics for Machine Learning
These notes are based on lectures I gave at TASI 2024 on Physics for Machine
Learning. The focus is on neural network theory, organized according to network
expressivity, statistics, and dynamics. I present classic results such as the
universal approximation theorem and neural network / Gaussian process
correspondence, and also more recent results such as the neural tangent kernel,
feature learning with the maximal update parameterization, and
Kolmogorov-Arnold networks. The exposition on neural network theory emphasizes
a field theoretic perspective familiar to theoretical physicists. I elaborate
on connections between the two, including a neural network approach to field
theory.