Abstract
These lecture notes provide a rigorous theoretical bridge between the "lazy learning" regime—where neural networks behave like Gaussian Processes—and the more complex "feature learning" regime, where networks adapt their internal representations to the data. By leveraging tools from statistical physics and Bayesian inference, the authors offer a unified framework for understanding how deep and recurrent networks generalize from finite data. The notes develop the necessary theoretical tools, including large deviation theory and generating functions, to characterize collective network behavior in the limit of large parameter counts.
Introduction: The Search for a Thermodynamics of Neural Networks
Despite the ubiquity of Artificial Neural Networks (ANNs), the field lacks a comprehensive "thermodynamics"—a predictive theory that allows researchers to determine performance based on architecture and data statistics before training begins. A central challenge in AI theory is the gap between two distinct operational regimes:
- The Lazy Learning Regime (NNGP/NTK): In the limit of infinite width ($N \to \infty$) with a fixed number of data points ($P$), networks are "stiff." Their internal representations remain largely unchanged during training, and they effectively act as linear regressors using a fixed "kernel."
- The Feature Learning Regime: This is the regime characteristic of modern deep learning, where the network learns to identify specific patterns (features) relevant to the task.
These notes address how to move beyond the lazy limit to a theory that captures representation learning, specifically when the amount of data scales proportionally with the network's width ($P/N = \alpha$).
Theoretical Framework: Bayesian Inference and Large Deviations
The authors treat neural network training as a problem of Bayesian Inference. Rather than seeking a single optimal set of weights, the framework focuses on the posterior distribution of weights given the training data. To make this tractable in high-dimensional systems, several techniques from statistical physics are employed:
- Generating Functions: Moment and cumulant-generating functions are used to describe the statistics of neuron activity across layers.
- Large Deviation Theory: The Gärtner-Ellis Theorem serves as the core engine, allowing for the approximation of probability distributions in the limit of many neurons. This captures how the system "concentrates" around its most likely state (the saddle point).
- Field Theory and Auxiliary Fields: Borrowing from many-body physics, the authors introduce auxiliary fields to transform complex interactions between thousands of neurons into manageable "order parameters," such as the kernel matrix $C$.
- Fokker-Planck Equation: The notes derive a link between the dynamics of Stochastic Gradient Descent (SGD) and the stationary states of Bayesian inference, proving that Langevin-style training eventually reaches the Bayesian posterior.
From Lazy to Feature Learning
The Neural Network Gaussian Process (NNGP)
In the standard infinite-width limit, the network's internal representation is label-agnostic. The kernel depends solely on the inputs ($x$), meaning the network does not "know" the specific task it is solving until the final readout layer. This is the Neural Network Gaussian Process (NNGP) limit, which provides a baseline for understanding generalization but fails to capture the adaptive nature of deep learning.
The Emergence of Feature Learning
Feature learning emerges theoretically when the number of training samples ($P$) and the network width ($N$) both go to infinity at the same rate ($P/N = \alpha$). In this regime, the authors demonstrate that the kernel is no longer fixed. They unify two popular views of this process:
- Kernel Scaling: Where the kernel changes in magnitude.
- Kernel Adaptation: Where the kernel changes shape to align with the data.
The notes show these are mathematically linked through the same field-theoretic equations. Specifically, in the feature learning regime, the inverse kernel receives a "rank-one" correction based on the outer product of the training labels, effectively "warping" the network's internal space to better fit the specific task.
Key Insights and Empirical Validation
While primarily theoretical, the notes validate these derivations using benchmarks such as MNIST, CIFAR-10, and synthetic Ising Spin tasks. Key results include:
- Predictor Equivalence: The mean predictor of a Bayesian neural network is shown to be mathematically identical to the result of standard linear regression with $L2$ regularization (weight decay).
- Self-Consistency Equations: The authors derive equations (e.g., Eq. 9.37) that predict the most likely value for readout weight lengths during feature learning, matching numerical simulations with high accuracy.
- The Edge of Chaos: In recurrent networks, the notes identify a phase transition between "regular" behavior (information loss) and "chaotic" behavior (high sensitivity to input). Learning is shown to be most effective near this transition point.
Limitations and Future Directions
The current framework assumes that training and test data are drawn from the same distribution, leaving out-of-distribution (OOD) scenarios and transfer learning for future work. Additionally, the notes focus on "vanilla" feed-forward and recurrent architectures. Extending these statistical physics tools to modern architectures like Transformers (Attention mechanisms) remains an active area of research. Finally, while the mean-field approach is powerful, it ignores certain finite-width fluctuations that may be significant in smaller, practical networks, necessitating future calculations of "finite-$N$ corrections."
Summary updated