Wide Feedforward or Recurrent Neural Networks of Any Architecture are Gaussian Processes

Greg Yang

Introduction

This paper proves a foundational concept in deep learning theory: almost any modern neural network architecture—including Recurrent Neural Networks (RNNs), Transformers, and networks utilizing Batch Normalization—converges to a Gaussian Process (GP) as its layers become infinitely wide.

For decades, researchers have known that a simple, single-layer neural network with random weights behaves like a Gaussian Process (a collection of random variables where any finite number of them have a joint Gaussian distribution) as it gets wider. This "NN-GP correspondence" is crucial because it allows us to understand the "prior" of a neural network—what it "thinks" before it sees any training data—using exact mathematical formulas rather than relying on black-box simulations.

However, prior to this work, the mathematical proofs were highly fragmented. Researchers had successfully proven this correspondence for Multi-Layer Perceptrons (MLPs) and Convolutional Neural Networks (CNNs). But every time a new architecture emerged, such as the Transformer or Gated Recurrent Unit (GRU), it required a brand-new, complex proof. A major hurdle was weight tying (reusing the same weights across different time steps, as seen in RNNs), which breaks the standard statistical assumptions used in earlier proofs.

Methods: Tensor Programs and the Master Theorem

To unify these fragmented proofs, the author introduces a new mathematical framework called Tensor Programs, driven by two key innovations:

  1. The NETSOR Language: A "straight-line" programming language specifically designed to describe neural network computations. It categorizes network variables into distinct types to track their asymptotic behavior:
  2. G-vars: Vectors that behave like Gaussians in the infinite-width limit.
  3. H-vars: Vectors resulting from nonlinearities (like ReLU or Tanh activations).
  4. A-vars: Random weight matrices.
Example of a NETSOR program defining a 2-layer perceptron.
  1. The Master Theorem: This is the mathematical engine of the paper. It proves that if a neural network's computation can be written in NETSOR, then as the width ($n$) goes to infinity, the network's output must converge to a Gaussian Process. Crucially, this theorem elegantly handles the tricky "weight tying" problem. It demonstrates that even when weights are reused, the high-dimensional nature of the matrices ensures the outputs still settle into a predictable Gaussian distribution.

Key Insights and Results

While this is primarily a theoretical paper, the author validates the math using GloVe embeddings (for testing RNN and Transformer kernels), CIFAR-10 (for feedforward networks with Batch Normalization), and synthetic data.

  • Universality of the GP Limit: The Gaussian Process limit isn't a fluke of simple networks; it is a fundamental property of high-dimensional random linear algebra. If you have enough "width," the specific architecture (skip connections, attention, etc.) merely changes the shape of the Gaussian distribution (the kernel), not the fact that it is Gaussian.
  • The "Architecture-to-Kernel" Pipeline: We can now systematically "translate" any new deep learning architecture into a mathematical kernel. This allows researchers to analytically study the properties of complex models like Transformers or LSTMs.
  • Empirical Match: The theory holds up strongly in practice. The paper shows that an RNN with a width of just 1,000 neurons already behaves almost exactly like the theoretical Gaussian Process.
Theoretical vs. empirical covariance for a random RNN.
  • Convergence Rate: The "error" between a real, finite-width network and the theoretical infinite GP decreases at a predictable rate of $1/\sqrt{\text{width}}$. This confirms that the theory is highly predictive for the large models used in modern practice.

Limitations and Future Work

  • Matrix Transposes: This specific paper—the first in a broader series—does not cover architectures that use both a weight matrix $W$ and its transpose $W^T$ in the same forward pass. The author notes this will be addressed in subsequent "Tensor Programs" papers.
  • The "Prior" vs. Training: This work describes the network at initialization (before training). While this tells us about the "inductive bias" of an architecture, it doesn't describe how the network evolves during gradient descent. The author points toward the Neural Tangent Kernel (NTK) as the natural next step for describing the training dynamics of these wide architectures.
  • Infinite Width vs. Reality: While 1,000 neurons is "wide" enough to see the GP behavior, certain nuanced effects in extremely deep or narrow networks might not be fully captured by the infinite-width limit.

Summary updated

BibTeX
@inproceedings{yang2019wide,
  author = {Greg Yang},
  title = {{Wide Feedforward or Recurrent Neural Networks of Any Architecture are Gaussian Processes}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure