Abstract
Wide neural networks with random weights and biases are Gaussian processes (GPs), a correspondence previously proven for specific architectures like deep fully-connected or convolutional networks. This work demonstrates that this correspondence extends to virtually all modern feedforward or recurrent neural networks, including those with LSTMs, GRUs, attention, and batch normalization. By introducing Tensor Programs and the NETSOR language, we provide a unified framework to derive GP kernels for any expressible architecture, shifting the theoretical burden from individual proofs to a single universal Master Theorem.
The Quest for a Grand Unified Theory of Infinite Width
Since the 1990s, the "NN-GP correspondence" has provided a bridge between deep learning and Bayesian inference. However, as deep learning evolved, theorists found themselves in a game of "whack-a-mole": every new architectural innovation—from Transformers to Batch Normalization—required a bespoke, complex proof to establish its infinite-width behavior.
Weight-sharing in RNNs and coordinate-dependent operations like BatchNorm presented significant mathematical hurdles, as they break the standard independent and identically distributed (i.i.d.) assumptions used in earlier proofs. This paper addresses these challenges by creating a "Grand Unified Theory" that proves GP convergence is a fundamental property of almost all standard neural architectures.
Methods: The NETSOR Language and Master Theorem
The core of this framework is a new programming language called NETSOR, designed to express neural network computations as a sequence of operations on three types of variables:
- G-vars: Vectors that are asymptotically Gaussian (e.g., pre-activations).
- H-vars: Vectors resulting from coordinate-wise nonlinearities (e.g., activations).
- A-vars: Large random matrices representing weights.
The Master Theorem for Tensor Programs states that for any program written in NETSOR, the empirical distribution of vector coordinates converges to a Gaussian distribution as the width (dimension) goes to infinity. This allows researchers to compute the exact covariance matrix (the GP kernel) for complex architectures using a recursive method called "V-transforms."
Empirical Validation and Key Results
The theoretical framework was validated using datasets like GloVe embeddings for sequence models and CIFAR-10 for feedforward networks with BatchNorm.
Key findings include:
- Universality: Proved convergence for MLPs, RNNs, CNNs, skip connections, attention, and normalization layers.
- Weight Sharing: Demonstrated that RNNs converge to GPs despite the dependencies introduced by reusing weight matrices across time steps.
- Empirical Match: Simulations with width-1000 RNNs showed that the joint distribution of outputs perfectly matches the theoretical GP prediction. The distance between empirical and theoretical kernels was shown to decrease at a rate of $1/\sqrt{width}$, consistent with the Central Limit Theorem.
Limitations and Future Directions
This first installment in the Tensor Programs series focuses on the network at initialization (the "prior"). A current limitation is the exclusion of weight matrix transposes ($W^\top$) within the same forward pass, which prevents the description of the Neural Tangent Kernel (NTK)—the key to understanding training dynamics. Future work will extend the NETSOR language to include these operations, enabling a unified theory of training for any architecture in the infinite-width limit.
Summary updated