Quantitative Gaussian-Process limits of Tensor Programs

Andrea Agazzi, Eloy Mosig García, Dario TrevisanarXiv 2026

TL;DR

This paper provides the first architecture-agnostic framework for calculating explicit finite-width convergence rates of random neural networks to their infinite-width Gaussian Process limits. By leveraging the mathematical framework of tensor programs, the authors prove that the approximation error shrinks at a rate of $O(1/\sqrt{\text{width}})$ in Wasserstein distance. Crucially, this framework successfully accommodates complex modern design elements like weight-sharing in RNNs and attention mechanisms in Transformers.

What Problem Does This Paper Address?

When random neural networks grow infinitely wide, their outputs at initialization converge to a Gaussian Process—a phenomenon known as the Neural Network Gaussian Process (NNGP) limit. While this qualitative behavior has been well-established for decades, finding quantitative bounds—exactly how fast a finite-width network approaches this limit—has remained a difficult challenge.

Traditional quantitative proofs rely on independent, layer-by-layer Central Limit Theorems (CLTs). However, these proofs break down when applied to modern architectures. For instance, Recurrent Neural Networks (RNNs) reuse the same weight matrices across multiple time steps (weight-sharing), and Transformers compute non-linear interactions across tokens (attention mechanisms). These design choices introduce intricate statistical dependencies that standard layer-by-layer analyses cannot handle. This paper resolves this gap by providing explicit finite-width error bounds that apply to a highly diverse class of network architectures.

Methods

The authors build their convergence theory on the foundation of Tensor Programs, a theoretical framework pioneered by Greg Yang that translates neural network forward and backward passes into structured, line-by-line algebraic algorithms (known as $\text{Netsor}$ programs).

To capture the nuances of modern architectures, the authors introduce a novel extension called $\text{Netsor}^K$. This extension introduces scalar kernel variables and scalar-parametric nonlinearities, which are mathematically required to model operations like LayerNorm and Softmax inside attention layers.

The core mathematical strategy relies on a line-by-line induction proof over the execution of the program:

  1. Conditional Gaussian Coupling: For every matrix multiplication line, the finite-width execution and its infinite-width Gaussian counterpart are coupled using the exact same underlying Gaussian noise.
  2. Geometric Resolution: The authors demonstrate that conditional means and covariances can be expressed as smooth, finite-dimensional functions of the empirical Gram matrices of previous layers.
  3. Simultaneous Induction: This geometric insight allows them to close the inductive loop, simultaneously proving a quantitative CLT for the network states and a quantitative Law of Large Numbers (LLN) for the network's internal kernels.

The flow of variables through these multi-layer structures is tracked using directed program graphs, as illustrated below:

Deep Feed-Forward Network Program Graph

Datasets

As a foundational theoretical paper, no real-world datasets (like ImageNet or GLUE) were used. Instead, the authors validated their mathematical theorems using synthetic simulations. They generated ensembles of $N = 5000$ independent random networks across various architectures (including MLPs, ResNets, and RNNs) and compared their finite-width outputs against analytical infinite-width baselines computed via deterministic Gauss-Hermite quadrature.

Key Insights and Ideas

  • Breaking the Circularity: A major hurdle in quantitative limit theory is a chicken-and-egg problem: proving the CLT requires knowing that the network's kernels obey the Law of Large Numbers (LLN), but proving the LLN requires controlling the convergence of the states (the CLT). The authors bypass this by analyzing a truncated version of the program up to line $r-1$, establishing kernel control right before evaluating line $r$.
  • Architecture Agnosticism via Graph Topology: Instead of writing custom proofs for every new neural network layer, the paper treats architectures as graph topologies. If a weight matrix is reused (as in RNNs), it simply manifests as multiple edges sharing the same matrix variable label, which is naturally handled by the conditional Gaussian updates.
  • Taming Softmax and Attention: Attention mechanisms are notoriously difficult to bound because the softmax operation introduces non-linear dependencies across the entire sequence. The $\text{Netsor}^K$ framework tames this by enforcing a local Lipschitz condition with linear growth, ensuring that token-dependent fluctuations remain stable in Wasserstein distance.

Key Results

  • Explicit Error Bounds: The primary theoretical results (Theorems 1.2 and 2.4) prove that the Wasserstein distance between a finite-width network execution and its ideal Gaussian Process limit is bounded by $c \sum_{m \in n_{\text{hidd}}} \frac{1}{\sqrt{m}}$, where $m$ represents the hidden layer widths.
  • Experimental Validation: Numerical simulations confirmed this steady convergence across four distinct architectures. By measuring the Sliced Wasserstein-1 ($SW_1$) distance against network width $n$ on a log-log scale, the authors observed empirical convergence slopes strictly below the statistical sampling noise floor of $-1/2$:
  • Shallow MLP: $-0.721$
  • Deep MLP ($L=4$): $-0.916$
  • Residual Network: $-0.797$
  • Time-unrolled RNN: $-0.579$

These empirical slopes suggest that under certain non-degeneracy conditions, the actual convergence rate in practice might be even faster than the proven $O(1/\sqrt{n})$ bound, potentially reaching $O(1/n)$.

Limitations and Future Work

  • Strict Regularity Requirements: The framework requires activation functions and nonlinearities to be Lipschitz continuous (or locally Lipschitz with linear growth for $\text{Netsor}^K$). This excludes highly discontinuous or custom non-differentiable operations.
  • Limited to Initialization: The results apply strictly to the NNGP/NTK regime at or near initialization. It does not cover the feature learning regime (such as Maximal Update Parametrization, or $\mu$P), where training significantly alters the weights and destroys their initial Gaussian structure.
  • Conservative Theoretical Rates: While the proven theoretical rate is $O(1/\sqrt{n})$, the empirical results show faster convergence. Tightening the theoretical bounds to match these practical observations remains an open avenue for future research.

Summary updated

BibTeX
@misc{agazzi2026quantitative,
  author = {Andrea Agazzi and Eloy Mosig García and Dario Trevisan},
  title = {{Quantitative Gaussian-Process limits of Tensor Programs}},
  year = {2026},
  eprint = {2607.06290},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.06290},
}
Figure