Gradient Descent on Two-layer Nets: Margin Maximization and Simplicity Bias

Kaifeng Lyu, Zhiyuan Li, Runzhe Wang, Sanjeev Arora

TL;DR

This paper proves that for two-layer Leaky ReLU networks trained on symmetric, linearly separable data, gradient descent naturally converges to the simplest possible solution: a linear max-margin classifier. While this confirms a strong "simplicity bias" in neural network training, the authors also demonstrate that this bias is surprisingly fragile and can be easily steered toward suboptimal solutions with just a few extra data points.

What Problem Does This Paper Address?

A central mystery in deep learning is why overparameterized models—which have far more parameters than data points—generalize so well instead of just memorizing the training set. Researchers suspect that the optimization algorithm itself, typically Gradient Descent (GD), has an implicit bias toward "simple" solutions that generalize better.

While this bias is well-understood for linear models (where GD on logistic loss converges to the max-margin SVM solution), proving it for non-linear neural networks is much harder. Previous attempts often relied on the "lazy training" or Neural Tangent Kernel (NTK) regime, where weights hardly move from their initialization, or required the networks to be infinitely wide. This paper tackles the "active" regime (small initialization) for finite-width, two-layer Leaky ReLU networks to see if they truly find globally optimal margin solutions.

Methods

The authors analyze gradient flow (the continuous-time version of GD) using a logistic loss function. To ensure the model actually learns features rather than staying in the "lazy" regime, they use a small initialization for the weights.

The core of their technical contribution is a multi-phase analysis of the training trajectory:

  1. Phase I (Dynamics Near Zero): Early in training, the weights are small. The authors show that the dynamics resemble a "power iteration," where neuron weights begin to align with the mean of the data.
  2. Phase II (Near-Two-Neuron Dynamics): As training progresses, the neurons in a wide network begin to cluster into two main directions. This allows the authors to simplify the analysis of a wide network by comparing it to a much simpler two-neuron network.
  3. Phase III (Convergence): Finally, they use Kurdyka-Łojasiewicz (KL) inequality techniques to prove that the network directionally converges to a specific solution.

Datasets

The paper primarily uses synthetic datasets to provide rigorous proofs:

  • Linearly Separable Data: The labels can be perfectly separated by a single hyperplane.
  • Symmetric Data: For every data point $(x, y)$ in the set, the point $(-x, -y)$ is also included. The authors note that any dataset can be made symmetric through simple data augmentation.
  • "Hinted" Datasets: Introduced in Section 6, these are linearly separable datasets where three specific "hint" points are added to test the fragility of the simplicity bias.

Key Insights and Ideas

  • Symmetry Forces Linearity: A key theoretical "aha moment" is Theorem 4.2, which shows that on symmetric data, the global-max-margin solution for a two-layer Leaky ReLU net must be a linear classifier. This bridges the gap between complex neural nets and simple linear models.
  • The Simplicity Bias is Real: The results provide a theoretical foundation for the empirical observation that neural networks learn simple patterns (like linear relationships) before complex ones. If a linear solution exists that maximizes the margin, GD is highly likely to find it.
  • Fragility of the Bias: Perhaps the most surprising insight is how easily this bias can be subverted. By adding just three points to a dataset, the authors show they can "trick" the network into converging to a linear classifier that has a much worse margin than the true optimal one.
Visualizing different decision boundaries. Left: Symmetric data where GD finds the global max margin. Middle: Non-symmetric data where the linear classifier is found despite a better non-linear one existing. Right: The "hinted" dataset where the network is biased toward a suboptimal linear boundary.

Key Results

  • Global Optimality: For symmetric, linearly separable data, the authors prove that with high probability ($1 - 2^{-(m-1)}$ where $m$ is width), GD converges to the global-max-margin linear classifier.
  • Width Independence: Unlike previous work, this result holds for any network width $m \ge 2$, moving beyond the requirement for infinite or exponential width.
  • Suboptimal Convergence: In the non-symmetric "hinted" case, they prove the network can be led to a solution with a suboptimal margin. This suggests that the "simplicity bias" isn't always beneficial; it can sometimes prevent the network from finding the truly best-generalizing solution.

Limitations and Future Work

  • Linear Separability: The analysis assumes the data is linearly separable. Real-world data is often much more complex, and extending these proofs to non-linearly separable data remains a major challenge.
  • Leaky ReLU Specifics: The proofs rely on the properties of the Leaky ReLU activation. While standard ReLU is a limit case, the non-zero slope for negative inputs is technically important for their current derivation.
  • Architecture Depth: This work is limited to two-layer networks. Understanding how these phases of alignment and simplicity bias evolve in deep (many-layer) networks is the natural next step for this line of research.

Summary updated

BibTeX
@inproceedings{lyu2021gradient,
  author = {Kaifeng Lyu and Zhiyuan Li and Runzhe Wang and Sanjeev Arora},
  title = {{Gradient Descent on Two-layer Nets: Margin Maximization and Simplicity Bias}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=zIaE87N8bfo},
}
Figure