A Comparative Analysis of the Optimization and Generalization Property of Two-layer Neural Network and Random Feature Models Under Gradient Descent Dynamics

Weinan E, Chao Ma, Lei WuarXiv 2019

Abstract

Modern deep learning relies on massively over-parameterized architectures that, despite their capacity to memorize random noise, often generalize well to unseen data. This paper investigates the Gradient Descent (GD) dynamics of two-layer neural networks to determine whether implicit regularization is sufficient for generalization. We demonstrate that in the heavily over-parameterized regime, neural networks converge to a "lazy training" state where they behave as linear models over random features. Consequently, these models suffer from the curse of dimensionality, failing to learn complex features unless aided by early stopping or explicit regularization.

Introduction

A central mystery in machine learning is why neural networks with far more parameters than training examples do not succumb to catastrophic overfitting. While traditional theory suggests these models should generalize poorly, empirical evidence shows they achieve zero training error and high test accuracy. A common hypothesis is that Gradient Descent (GD) provides an implicit regularization that biases the optimization toward "simple" solutions. This study provides a rigorous theoretical comparison between two-layer neural networks and Random Feature (RF) models to test the limits of this hypothesis.

Theoretical Framework and Methodology

The authors analyze a two-layer ReLU neural network where both the input and output layers are updated via continuous-time GD. The analysis is bifurcated into two distinct regimes:

  1. Heavily Over-parameterized Regime ($m \gg n$): Where the number of hidden units $m$ significantly exceeds the number of data points $n$. The study tracks the evolution of the Gram matrix—a representation of how data points interact through the network's weights—and bounds the movement of weights from their initial state.
  2. General Regime ($m > n$): A more relaxed setting where Lyapunov functions and Rademacher complexity are employed to establish bounds on empirical and population risk over time.

The study utilizes Barron spaces and Reproducing Kernel Hilbert Spaces (RKHS) to quantify the complexity of target functions and evaluate the learnability of the models.

The "Lazy Training" Trap

A key finding of the research is the identification of the "lazy training" phenomenon. In the limit of infinite width, the weights of a neural network move infinitesimally from their random initialization. Mathematically, the network's predictions become equivalent to those of a Random Feature model—a kernel method where only the final layer is trained.

The authors prove that the difference between the predictions of a fully trained wide neural network and an RF model is bounded by $\mathcal{O}(1/\sqrt{m})$. As $m \to \infty$, the neural network loses its ability to perform feature learning, instead acting as a fixed-kernel linear predictor.

The Curse of Dimensionality

The equivalence to kernel methods has significant implications for generalization. Because the ultra-wide network behaves like a random basis expansion, it inherits the "curse of dimensionality." Unless the target function is exceptionally well-aligned with the specific kernel generated at initialization, the model requires an exponential number of samples to generalize.

The paper establishes a strict lower bound for target functions within the Barron space, showing that the generalization error of the GD solution scales poorly with the input dimension $d$:

$$\text{Error} \ge \frac{\kappa Q}{d(n+1)^{1/d}}$$

This result suggests that implicit regularization by GD is insufficient to overcome the dimensionality barrier in the heavily over-parameterized limit.

Optimization vs. Generalization

The research highlights a "double-edged sword" effect of over-parameterization:

  • Optimization: Massive width ensures the Gram matrix remains positive definite, allowing GD to reach a global minimum (zero training loss) exponentially fast, even on random labels.
  • Generalization: This same width leads to the lazy regime where the model fails to learn the underlying structure of the data, merely memorizing points via its high-dimensional random basis.

However, the authors demonstrate that early stopping can serve as a remedy. For networks of moderate width, stopping GD at a specific time ($t = \sqrt{n}/m$) can yield a population risk bounded by $\mathcal{O}(1/m + 1/\sqrt{n})$, effectively balancing the trade-off between fitting the data and maintaining generalization.

Empirical Validation

The theoretical claims were validated using synthetic datasets on a $d$-dimensional unit sphere. In experiments fitting a "one-neuron function" $f^*(x) = \sigma(e_1^T x)$, narrow networks ($m=4$) demonstrated successful generalization. Conversely, massive networks ($m=1000$) failed to generalize effectively, confirming that unregularized, highly over-parameterized networks are prone to the curse of dimensionality.

Conclusion and Future Work

This analysis clarifies the relationship between network width, optimization, and generalization. While over-parameterization simplifies the loss landscape, it risks pushing the model into a "lazy" regime where it behaves like a suboptimal kernel method.

The authors note that these findings are sensitive to the scaling of the initialization. Future research should investigate the "mean-field" scaling regime, where the output is scaled by $1/m$. In this regime, weights move significantly, potentially allowing the network to escape the lazy training trap and perform the feature learning necessary to overcome the curse of dimensionality.

Summary updated

BibTeX
@misc{e2019comparative,
  author = {Weinan E and Chao Ma and Lei Wu},
  title = {{A Comparative Analysis of the Optimization and Generalization Property of Two-layer Neural Network and Random Feature Models Under Gradient Descent Dynamics}},
  year = {2019},
  eprint = {1904.04326},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.04326},
}
Figure