Gradient Descent Quantizes ReLU Network Features

Hartmut Maennel, Olivier Bousquet, Sylvain GellyarXiv 2018

TL;DR

This paper reveals that Gradient Descent (GD) acts as an implicit regularizer in ReLU networks by "quantizing" weight vectors. When trained with small initial weights and learning rates, the network's neurons align themselves with a finite, discrete set of directions determined by the training data, effectively forcing massive, over-parametrized models to behave like much simpler, low-capacity functions.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously over-parametrized, often having millions more parameters than training examples. Theoretically, such models should be able to "memorize" training data with wildly oscillating, complex functions that fail to generalize to new data. Yet, in practice, they generalize remarkably well even without explicit regularization (like weight decay or dropout).

The authors seek to explain this mystery. While previous research focused on the "generalization gap" between Stochastic Gradient Descent (SGD) and plain Gradient Descent (GD), this paper argues that even plain GD possesses an inherent bias toward simplicity. The challenge is to mathematically characterize this bias and show how it leads to "simple" solutions regardless of the network's size.

Methods

The authors analyze a one-hidden-layer feedforward network with ReLU activations. They study the training dynamics under two key idealized assumptions:

  1. Infinitesimal Learning Rate ($\epsilon \to 0$): This turns discrete GD steps into a continuous dynamical system described by differential equations.
  2. Infinitesimal Initialization ($\lambda \to 0$): They look at what happens when weights start extremely close to zero.

To formalize the behavior, they partition the weight space into "sectors" based on which training points activate which neurons. They use the framework of stratified differential equations to track how weight vectors move across these sectors. They also introduce a "Greedy" training algorithm that adds one neuron at a time to simulate the idealized limit where neurons only become "active" when they can significantly reduce the loss.

Datasets

The researchers validated their theoretical model using:

  • 1D Toy Data: Interpolating a small number of points (e.g., 5 or 10) to visualize the "simplicity" of the resulting functions.
  • 2D Toy Data: Approximating values at the corners of a square to observe how contour lines align.
  • MNIST: A standard benchmark for handwritten digit recognition, used to estimate the performance gap between standard GD and their idealized "greedy" model.

Key Insights and Ideas

  • The Quantization Effect: The most striking finding is that weight vectors don't just move randomly; they concentrate into a small number of specific directions. This "quantization" is driven entirely by the geometry of the input data.
  • Two-Phase Training: Training happens in two distinct stages. In the first phase, weights align with these "extremal" directions while the training loss barely changes. Only after this alignment does the second phase—significant loss reduction—begin.
  • Independence of Network Size: Because the number of extremal directions is finite and determined by the data, a network with 1,000 neurons will often converge to the same "simple" function as a network with only 10 neurons. The extra capacity is effectively ignored.
  • Analogy to Linear Interpolation: The authors compare this behavior to linear interpolation (triangulation). Just as there are only finitely many ways to triangulate a set of points, there are only finitely many "simple" functions a ReLU network can represent in this infinitesimal limit.

Key Results

The paper demonstrates that large networks "usually" produce simple, piecewise linear interpolations rather than complex, overfitted ones.

A large network (200 neurons) producing a complex interpolation (left) vs. the "usual" simple linear interpolation (right) when initialized with small weights.

In 2D experiments, the same phenomenon occurs: instead of a complex landscape, the network produces a simple function that could be implemented with just a few neurons.

2D contour plots showing a complex solution (left) vs. the simple, quantized solution (right) found by GD.

On MNIST, the authors found that their "Greedy" model (which uses very few active neurons) achieved test accuracy comparable to a full neural network, especially as the training set size increased. This suggests that the "quantization" observed in toy models is a reasonable approximation of how real-world networks behave.

Limitations and Future Work

  • Single Hidden Layer: The formal proofs are restricted to networks with one hidden layer. While the authors observe similar behavior in deep networks, the mathematical analysis for multiple layers is significantly more complex.
  • Infinitesimal Limits: The theory relies on learning rates and initializations being nearly zero. In practice, these values are small but finite, which can lead to deviations from the "perfect" quantized solution.
  • Generalization Theory: The authors note that these functions don't fit the standard PAC (Probably Approximately Correct) learning framework. They suggest that future work should focus on "non-parametric" approximation properties, similar to how we analyze smooth functions with bounded derivatives.

Summary updated

Abstract

Deep neural networks are often trained in the over-parametrized regime (i.e. with far more parameters than training examples), and understanding why the training converges to solutions that generalize remains an open problem. Several studies have highlighted the fact that the training procedure, i.e. mini-batch Stochastic Gradient Descent (SGD) leads to solutions that have specific properties in the loss landscape. However, even with plain Gradient Descent (GD) the solutions found in the over-parametrized regime are pretty good and this phenomenon is poorly understood. We propose an analysis of this behavior for feedforward networks with a ReLU activation function under the assumption of small initialization and learning rate and uncover a quantization effect: The weight vectors tend to concentrate at a small number of directions determined by the input data. As a consequence, we show that for given input data there are only finitely many, "simple" functions that can be obtained, independent of the network size. This puts these functions in analogy to linear interpolations (for given input data there are finitely many triangulations, which each determine a function by linear interpolation). We ask whether this analogy extends to the generalization properties - while the usual distribution-independent generalization property does not hold, it could be that for e.g. smooth functions with bounded second derivative an approximation property holds which could "explain" generalization of networks (of unbounded size) to unseen inputs.
BibTeX
@misc{maennel2018gradient,
  author = {Hartmut Maennel and Olivier Bousquet and Sylvain Gelly},
  title = {{Gradient Descent Quantizes ReLU Network Features}},
  year = {2018},
  eprint = {1803.08367},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1803.08367},
}

Loading related content...

Figure