The Implicit Bias of Gradient Descent on Separable Data

Daniel Soudry, Elad Hoffer, Mor Shpigel Nacson, Suriya Gunasekar, Nathan Srebro

TL;DR

This paper provides a theoretical foundation for why unregularized gradient descent generalizes so well in classification tasks: on linearly separable data, it implicitly converges toward the maximum-margin (hard-margin SVM) solution. This "implicit bias" explains why training long after reaching zero training error continues to improve model performance, even as validation loss starts to climb.

What Problem Does This Paper Address?

In modern deep learning, we often train "overparameterized" models—models with far more parameters than training examples. Mathematically, these models have infinitely many ways to fit the training data perfectly (global minima), yet gradient descent (GD) consistently finds solutions that generalize well to new data.

Why does this happen without explicit regularization like weight decay? For squared loss, it's known that GD starting from zero converges to the minimum-norm solution. However, for classification losses like logistic or cross-entropy, there is no finite minimum on separable data; to get zero loss, the weights must grow to infinity. The authors set out to characterize the direction in which these weights grow and determine if GD is "biased" toward a specific, desirable type of solution.

Methods

The authors analyze the iterates of standard Gradient Descent with a fixed learning rate on unregularized logistic regression. They focus on linearly separable datasets and a class of monotone decreasing loss functions with exponential tails (like logistic and exp-loss).

By decomposing the weight vector $w(t)$ as it grows, they rigorously prove that the direction of the weights converges to the solution of the $L_2$ hard-margin Support Vector Machine (SVM). They further extend this analysis to:

  • Multi-class classification using cross-entropy loss.
  • Restricted deep networks, specifically cases where only one weight layer is optimized while others are fixed, or after activations have "settled."

Datasets

The paper employs both synthetic and real-world data to validate its theories:

  • Synthetic 2D Datasets: Used to visualize the convergence of GD and compare it with other algorithms like ADAM (see Figure 1 and Figure 3).
  • CIFAR-10: Used to demonstrate that the predicted phenomena—increasing weight norms and the "validation loss paradox"—occur in practical convolutional neural networks (CNNs).

Key Insights and Ideas

  • GD as an Implicit SVM Solver: Even without an explicit margin constraint or penalty, the geometry of the loss function and the dynamics of GD force the model to maximize the classification margin.
  • The Logarithmic Crawl: The convergence to the max-margin direction is incredibly slow—specifically $O(1/\log t)$. This explains why "training longer" is often better; the decision boundary is still being refined long after the training loss has become negligible.
  • The Validation Loss Paradox: The authors explain a common observation in deep learning: validation loss often starts increasing while validation error (accuracy) continues to improve. As the weight norm grows to infinity to minimize training loss, the loss on even a single misclassified validation point grows logarithmically, driving up the total loss even as the boundary gets better (see Figure 2).
  • Algorithm Matters: This specific $L_2$ margin bias is a property of Gradient Descent. Adaptive methods like ADAM exhibit a different implicit bias and do not necessarily converge to the $L_2$ max-margin solution, as shown in Figure 3.
Visualization of GD converging to the max-margin solution on a synthetic dataset. The norm (B) grows logarithmically while the angle gap (D) and margin gap (E) slowly vanish.

Key Results

  • Directional Convergence: The main result (Theorem 3) shows that for any separable dataset, the GD iterates behave as $w(t) = \hat{w} \log t + \rho(t)$, where $\hat{w}$ is the $L_2$ max-margin vector and $\rho(t)$ is a bounded residual.
  • Quantitative Rates: The normalized weight vector $w(t)/\|w(t)\|$ converges to the max-margin direction at a rate of $O(1/\log t)$ for almost all datasets.
  • CNN Verification: Experiments on CIFAR-10 (Figure 2) confirm that the weight norm of the final layer grows logarithmically and the training loss decays as $1/t$, matching the theoretical predictions for linear models.
Training a CNN on CIFAR-10. Note how the validation error (blue dots in A, bottom row in Table 1) continues to improve even as validation loss (red line in A, middle row in Table 1) increases.

Limitations and Future Work

  • Linearity: The core proof relies on linear predictors. While the authors provide a "bridge" to deep networks via Corollary 8, it only covers specific, simplified settings.
  • Separability: The analysis assumes the data is linearly separable. While common in overparameterized regimes, it doesn't cover noisy or overlapping data distributions.
  • Non-GD Optimizers: While the paper briefly shows that ADAM behaves differently (Figure 3), a full characterization of the implicit bias for the wide variety of modern optimizers remains an open area of research.

The authors suggest that their methodology provides a template for understanding implicit regularization in more complex architectures and with different optimization techniques.

Summary updated

Abstract

We examine gradient descent on unregularized logistic regression problems, with homogeneous linear predictors on linearly separable datasets. We show the predictor converges to the direction of the max-margin (hard margin SVM) solution. The result also generalizes to other monotone decreasing loss functions with an infimum at infinity, to multi-class problems, and to training a weight layer in a deep network in a certain restricted setting. Furthermore, we show this convergence is very slow, and only logarithmic in the convergence of the loss itself. This can help explain the benefit of continuing to optimize the logistic or cross-entropy loss even after the training error is zero and the training loss is extremely small, and, as we show, even if the validation loss increases. Our methodology can also aid in understanding implicit regularization n more complex models and with other optimization methods.
BibTeX
@inproceedings{soudry2018implicit,
  author = {Daniel Soudry and Elad Hoffer and Mor Shpigel Nacson and Suriya Gunasekar and Nathan Srebro},
  title = {{The Implicit Bias of Gradient Descent on Separable Data}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=r1q7n9gAb},
}
Figure