Skip to main content
QUICK REVIEW

[Paper Review] SGD Generalizes Better Than GD (And Regularization Doesn't Help)

Idan Amir, Tomer Koren|arXiv (Cornell University)|Jul 7, 2021
Stochastic Gradient Optimization TechniquesComputer Science2 citations
TL;DR

This paper demonstrates a fundamental generalization gap between stochastic gradient descent (SGD) and full-batch gradient descent (GD) in stochastic convex optimization. While SGD achieves $\epsilon$ excess risk in $O(1/\epsilon^2)$ iterations, GD requires $\Omega(1/\epsilon^4)$ iterations to match SGD's generalization performance, even with regularization, highlighting SGD's implicit bias as key to generalization.

ABSTRACT

We give a new separation result between the generalization performance of stochastic gradient descent (SGD) and of full-batch gradient descent (GD) in the fundamental stochastic convex optimization model. While for SGD it is well-known that $O(1/\epsilon^2)$ iterations suffice for obtaining a solution with $\epsilon$ excess expected risk, we show that with the same number of steps GD may overfit and emit a solution with $\Omega(1)$ generalization error. Moreover, we show that in fact $\Omega(1/\epsilon^4)$ iterations are necessary for GD to match the generalization performance of SGD, which is also tight due to recent work by Bassily et al. (2020). We further discuss how regularizing the empirical risk minimized by GD essentially does not change the above result, and revisit the concepts of stability, implicit bias and the role of the learning algorithm in generalization.

Motivation & Objective

  • To establish a theoretical separation in generalization performance between SGD and GD in stochastic convex optimization.
  • To analyze whether regularization can mitigate GD's poor generalization compared to SGD.
  • To investigate the role of algorithmic stability and implicit bias in generalization, particularly in the context of GD versus SGD.
  • To clarify why GD overfits despite minimizing the empirical risk, even with regularization.

Proposed method

  • Analyzes the generalization error of GD and SGD in the stochastic convex optimization model with i.i.d. data.
  • Uses a worst-case construction of the loss function to demonstrate that GD overfits with constant generalization error after $O(1/\epsilon^2)$ steps.
  • Establishes a lower bound of $\Omega(1/\epsilon^4)$ iterations for GD to achieve $\epsilon$ excess risk, matching known upper bounds.
  • Considers regularized empirical risk minimization for GD and shows regularization does not close the generalization gap.
  • Leverages recent results from Bassily et al. (2020) to establish tightness of the $\Omega(1/\epsilon^4)$ lower bound.
  • Revisits concepts of algorithmic stability and implicit bias to explain why SGD generalizes better than GD.

Experimental results

Research questions

  • RQ1Can GD achieve the same generalization performance as SGD within the same number of iterations in stochastic convex optimization?
  • RQ2What is the minimum number of iterations required for GD to match SGD's generalization error of $\epsilon$?
  • RQ3Does regularizing the empirical risk minimize the generalization gap between GD and SGD?
  • RQ4How do algorithmic stability and implicit bias influence the generalization performance of GD versus SGD?
  • RQ5Why does GD overfit even when minimizing the empirical risk, while SGD generalizes well?

Key findings

  • SGD achieves $\epsilon$ excess expected risk in $O(1/\epsilon^2)$ iterations, matching known convergence rates.
  • GD with the same number of iterations ($O(1/\epsilon^2)$) incurs $\Omega(1)$ generalization error, indicating overfitting.
  • GD requires $\Omega(1/\epsilon^4)$ iterations to achieve $\epsilon$ excess risk, which is tight due to recent upper bounds.
  • Regularization of the empirical risk does not improve GD's generalization performance and fails to close the gap with SGD.
  • The generalization gap is attributed to implicit bias in SGD, not just optimization dynamics or stability.
  • The results highlight that algorithmic choice—specifically SGD versus GD—plays a critical role in generalization, independent of explicit regularization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.