Abstract
Recent theoretical work on neural networks often relies on the "lazy training" regime, where the Neural Tangent Kernel (NTK) remains static. This paper presents an empirical investigation demonstrating that the NTK is, in fact, highly dynamic. We show that the kernel’s top eigenfunctions actively align with the target function during training. This spectral alignment acts as a "neural memory" that facilitates faster convergence and explains why deep networks outperform shallow ones. Our results on benchmarks like MNIST, CIFAR100, and 2D image regression highlight the role of depth and learning rate schedules in driving this adaptive behavior.
Introduction
A central challenge in deep learning theory is understanding how neural networks (NNs) optimize and generalize. The Neural Tangent Kernel (NTK) framework has provided significant insights by linking NNs to kernel methods. However, many of these models assume a "time-invariant" kernel, a condition known as lazy training. This study addresses the limitations of this assumption by empirically exploring the evolution of the NTK’s spectrum—its eigenvalues and eigenvectors—during the training process. We investigate whether the kernel adapts to the task and how this adaptation influences performance.
Methodology
We conducted an extensive spectral analysis of fully-connected networks using the Gramian matrix ($G_t$), which represents the NTK evaluated at training points. Our approach involved:
- Spectral Decomposition: Analyzing the eigenvalues and eigenvectors of $G_t$ to identify the "directions" in function space learned by the network.
- Alignment Metrics: Calculating the cosine similarity between the target labels and the top eigenvectors of the kernel.
- Comparative Analysis: Evaluating the impact of network depth, width, and learning rate schedules on spectral alignment.
- Visualization: Utilizing a 2D regression task (reconstructing the Mona Lisa) to visualize the evolution of eigenfunctions and their correspondence to the target image.
Experiments were performed on MNIST, CIFAR100, and synthetic 2D regression datasets.
Key Findings
The Dynamic Kernel and Neural Memory
Our results indicate that the Gramian is not a static property but evolves to mirror the target function. The top eigenvectors of the kernel change to become the primary "building blocks" of the learned model. We found that the top 20 eigenvectors of the Gramian can contain up to 90% of the target function's energy.
The Advantage of Depth
A critical discovery is that deeper networks exhibit significantly stronger spectrum alignment than shallow, wide networks with an equivalent number of parameters. This suggests that the primary benefit of depth is the ability to adaptively align the kernel with the task, effectively moving important features into the "fast lane" of optimization.
Impact of Learning Rate Decay
Dropping the learning rate triggers a "boost" in eigenvalue growth. As shown in the spectral analysis (panel e in the figure below), the maximum eigenvalue $\lambda_{max}$ scales inversely with the learning rate $\delta_t$. This decay allows information about the target function to spread across a larger number of top eigenvectors, refining the model's accuracy.
Discussion and Conclusion
This study provides strong empirical evidence for the dynamic nature of the NTK. We demonstrate that first-order Taylor approximations account for approximately 90% of the change in network output, yet the underlying kernel structure is far from static. While the top of the spectrum remains stable and captures essential features, the bottom is more susceptible to noise.
Future research should aim to develop a formal mathematical theory for eigenvector alignment beyond first-order expansions and explore these dynamics in more complex architectures like Transformers. Understanding the optimal configurations for maximizing alignment will be key to designing more efficient and expressive neural networks.
Summary updated