Connecting NTK and NNGP: A Unified Theoretical Framework for Neural Network Learning Dynamics in the Kernel Regime

Yehonatan Avidan, Qianyi Li, Haim SompolinskySubmission to ICLR 2024 · Rejected

TL;DR

In the infinite-width limit, deep learning theory has been split between two paradigms: deterministic gradient descent described by the Neural Tangent Kernel (NTK) and Bayesian inference described by the Neural Network Gaussian Process (NNGP). This paper unifies both frameworks under Langevin dynamics (gradient descent with small noise) via a novel two-time Neural Dynamical Kernel (NDK). The authors show that learning naturally separates into an initial gradient-driven NTK phase followed by a slow, diffusive sampling phase that eventually converges to the NNGP posterior.

What Problem Does This Paper Address?

Over-parameterized, infinitely wide neural networks are tractable models for studying deep learning, yet our theoretical understanding of them has long been divided:

  1. The NTK perspective: Networks trained with gradient descent follow linearized, deterministic dynamics around initialization.
  2. The NNGP perspective: Networks are viewed as Bayesian models where an i.i.d. Gaussian parameter prior yields a tractable Gaussian Process posterior over network outputs.

These two theories make fundamentally different assumptions about optimization and regularization, and they often yield different generalization predictions on real datasets. Prior work lacked a single continuous dynamical model that bridged the two. Furthermore, standard theories couldn't explain how networks navigate the degenerate manifold of zero training loss—a regime crucial for understanding phenomena like post-zero-loss early stopping and biological representational drift.

Methods

The authors model an $L$-hidden-layer fully connected network trained via continuous-time Langevin dynamics (gradient descent on an empirical squared-error loss with $L_2$ weight regularization, driven by thermal white noise of temperature $T$).

Key technical elements include:

  • Path-Integral / Generating Functional Formulation: Using a Markov proximal framework, the authors derive the moment-generating function for the network predictor in the infinite-width limit ($N \to \infty$).
  • The Neural Dynamical Kernel (NDK): A newly defined two-time kernel, $K^{d,L}(t, t', \mathbf{x}, \mathbf{x}')$, which captures parameter derivatives across different points in time and generalizes both the NTK and NNGP.
  • Exact Mean Predictor Evolution: The mean predictor over training trajectories satisfies a closed Volterra-type integral equation governed entirely by the NDK.
  • Asymptotic Analysis:
  • For short times ($t \sim \mathcal{O}(1)$ at low temperature $T$), the NDK reduces to the static NTK, yielding deterministic gradient descent dynamics.
  • At long times ($t \gg T^{-1}$), the time-integrated NDK converges to the static NNGP kernel, recovering the Bayesian posterior mean.

Datasets

The theoretical framework is validated using:

  • Synthetic Orthogonal Dataset: Mutually orthogonal training inputs with binary labels $y \in \{\pm 1\}$ and test inputs having controlled overlaps with training samples.
  • MNIST: Binary classification tasks comparing distinct digit pairs (specifically 0 vs. 1 and 4 vs. 9).
  • CIFAR-10: Binary classification task (cats vs. dogs).

Key Insights and Ideas

  • Two Distinct Dynamical Phases: Learning splits across two time scales:
  • Gradient-driven phase ($t \sim \mathcal{O}(1)$): Loss gradients dominate, rapidly dragging the network into the zero-loss subspace along deterministic NTK trajectories.
  • Diffusive learning phase ($t \sim \mathcal{O}(T^{-1})$): The loss gradient becomes $\mathcal{O}(T)$, putting it on equal footing with $L_2$ regularization and thermal noise. The parameters drift along the manifold of zero training error, sampling the Bayesian posterior.
  • Early Stopping in the Diffusive Regime: When the initialization variance ($\sigma_0^2$) is small relative to the prior variance ($\sigma^2$), the predictor exhibits non-monotonic dynamics during the diffusive phase, overshooting the NNGP equilibrium. Generalization error reaches an optimum long after achieving zero training error, offering a novel theoretical mechanism for post-convergence early stopping.
  • Resolving the Paradox of Representational Drift: In neuroscience, neural representations drift continuously without degrading learned behavior. The authors show that continuous error signals dynamically realign the readout weights $a(t)$ to track drifting hidden representations $W(t)$.
  • Drift-Invariant Features: If the readout weights are frozen at $t_0$, performance decays as hidden weights drift. However, for nonlinearities like ReLU, the limiting "mean kernel" retains input norm information. Tasks that rely on norm differences remain robust even under complete representation decorrelation.

Key Results

  • Theory vs. Simulation: The analytical predictor dynamics match finite-width neural network Langevin simulations across training and testing sets.
  • Depth and Early Stopping: In the synthetic benchmark, optimal early stopping in the diffusive phase occurred for shallower networks ($L = 1, 2, 3$) when $\sigma_0^2/\sigma^2 < 1$. For deeper networks ($L > 3$), early stopping disappeared because deeper architectures inherently favored the long-time NNGP equilibrium.
  • Decoupled Representational Drift:
  • On MNIST 4 vs. 9 (where class separation does not depend on image norm), freezing readout weights resulted in the predictor distributions overlapping completely, causing accuracy to collapse to chance (50%).
  • On MNIST 0 vs. 1 (where digit norms differ systematically), the network retained an accuracy of ~90% after complete decorrelation, demonstrating task preservation purely through drift-invariant geometric properties.

Limitations and Future Work

  • Lazy / Kernel Regime: The theory operates in the infinite-width "lazy" training regime where hidden representations do not undergo feature learning.
  • Isotropic White Noise: The study assumes uniform Langevin noise rather than the structured, state-dependent gradient noise typical of mini-batch Stochastic Gradient Descent (SGD).
  • Future Directions: The authors aim to extend the framework to non-lazy training regimes (such as mean-field or maximal update parameterizations) and to the proportional limit where sample size scales with network width ($P \propto N$), inducing kernel renormalization.

Summary updated

Abstract

Artificial neural networks (ANNs) have revolutionized machine learning in recent years, but a complete theoretical framework for their learning process is still lacking. Substantial theoretical advances have been achieved for infinitely wide networks. In this regime, two disparate theoretical frameworks have been used, in which the network’s output is described using kernels: one framework is based on the Neural Tangent Kernel (NTK), which assumes linearized gradient descent dynamics, while the Neural Network Gaussian Process (NNGP) kernel assumes a Bayesian framework. However, the relation between these two frameworks and between their underlying sets of assumptions has remained elusive. This work unifies these two distinct theories using gradient descent learning dynamics with an additional small noise in an ensemble of randomly initialized infinitely wide deep networks. We derive an exact analytical expression for the network input-output function during and after learning and introduce a new time-dependent Neural Dynamical Kernel (NDK) from which both NTK and NNGP kernels can be derived. We identify two important learning phases characterized by different time scales: gradient-driven and diffusive learning. In the initial gradient-driven learning phase, the dynamics is dominated by deterministic gradient descent, and is adequately described by the NTK theory. This phase is followed by the slow diffusive learning stage, during which the network parameters sample the solution space, ultimately approaching the equilibrium posterior distribution corresponding to NNGP. Combined with numerical evaluations on synthetic and benchmark datasets, we provide novel insights into the different roles of initialization, regularization, and network depth, as well as phenomena such as early stopping and representational drift. This work closes the gap between the NTK and NNGP theories, providing a comprehensive framework for understanding the learning process of deep neural networks in the infinite width limit.
BibTeX
@misc{avidan2023connecting,
  author = {Yehonatan Avidan and Qianyi Li and Haim Sompolinsky},
  title = {{Connecting NTK and NNGP: A Unified Theoretical Framework for Neural Network Learning Dynamics in the Kernel Regime}},
  year = {2023},
  eprint = {2309.04522},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.04522},
}
Figure