Source-linked AI summary

A Unified Analysis of Stochastic Momentum Methods for Deep Learning

Yan Yan, Tianbao Yang, Zhe Li, Qihang Lin, Yi Yang

arXiv:1808.10396v1cs.LGstat.ML

TL;DR

The convergence and generalization behavior of stochastic momentum methods in deep learning remains under-explored. The paper unifies SG, SHB, and SNAG and analyzes non-convex gradient convergence and generalization using uniform stability. It finds no training-convergence advantage for momentum, but reports improved stability and generalization, with SNAG offering the best stated tradeoff.

  • Problem

    The theoretical convergence and generalization behavior of stochastic momentum methods in deep learning remains under-explored, including how they compare with SG on non-convex problems.

    Source: §1 · p. 1, §3.1 · p. 2
  • Method

    A unified scalar-parameter framework covers SG, SHB, and SNAG, with non-convex gradient-norm convergence analysis and uniform-stability analysis of generalization.

    Source: §1 · p. 1, §5 · p. 4, §5.2 · p. 5
  • Results

    SHB and SNAG have no clear advantage over SG in training-error convergence speed, but offer better generalization through greater stability; SNAG usually has the best speed–stability tradeoff.

    Source: §1 · p. 2, §7 · p. 6
  • Takeaways & Limitations

    In the analyzed setting, momentum helps generalization performance but does not speed up training.

    Source: §7 · p. 6

    The analysis assumes a non-convex loss that is G-Lipschitz continuous and L-smooth in x, with Ω = R^d.

    Source: §3.1 · p. 3

Abstract

from arXiv · show

Stochastic momentum methods have been widely adopted in training deep neural networks. However, their theoretical analysis of convergence of the training objective and the generalization error for prediction is still under-explored. This paper aims to bridge the gap between practice and theory by analyzing the stochastic gradient (SG) method, and the stochastic momentum methods including two famous variants, i.e., the stochastic heavy-ball (SHB) method and the stochastic variant of Nesterov's accelerated gradient (SNAG) method. We propose a framework that unifies the three variants. We then derive the convergence rates of the norm of gradient for the non-convex optimization problem, and analyze the generalization performance through the uniform stability approach. Particularly, the convergence analysis of the training objective exhibits that SHB and SNAG have no advantage over SG. However, the stability analysis shows that the momentum term can improve the stability of the learned model and hence improve the generalization performance. These theoretical insights verify the common wisdom and are also corroborated by our empirical analysis on deep learning.

1 Introduction

The paper addresses unanswered questions about stochastic momentum methods in deep learning by unifying SG, SHB, and SNAG. Its analysis finds no clear training-convergence advantage for momentum methods, while their stability and generalization can improve; SNAG offers the best stated tradeoff.

Background

  • Momentum methods originated as approaches to accelerate convex optimization; Polyak’s heavy-ball method and Nesterov’s accelerated gradient method are prominent examples.The cited Nesterov method achieves an optimal O(1/t^2) rate for convex smooth optimization, versus O(1/t) for standard gradient descent.Source: §1 · p. 1

Motivation

  • The paper asks whether stochastic momentum methods converge faster than SG on non-convex deep-learning problems, what advantage they offer, and why SNAG often improves over SHB.Prior analysis and arguments about these methods were mostly restricted to convex problems.Source: §1 · p. 1

Contributions

  • A unified framework parameterized by a free scalar reduces to SHB, SNAG, or SG under three different parameter settings.The paper analyzes gradient-norm convergence for non-convex optimization and generalization through uniform stability.Source: §1 · p. 1

Results

  • SHB and SNAG show no clear advantage over SG in training-error convergence speed, while their advantage lies in better generalization through greater stability.SNAG usually achieves the best tradeoff between training-error convergence speed and testing-error stability among the three methods.Source: §1 · p. 2

2 More Related Work

Prior work established results for deterministic momentum and some stochastic non-convex methods, but left stochastic HB and NAG and momentum’s generalization properties less understood. This paper addresses those gaps with unified convergence and stability analyses.

Convergence analysis

  • Stochastic HB and NAG remained theoretically under-explored for non-convex optimization, despite their widespread use in neural-network training.Existing non-convex accelerated-gradient analysis covered a different variant, was not applicable to SHB, and was not widely used for neural-network optimization.Source: §2 · p. 2
  • The unified analysis finds SHB and SNAG have the same order of convergence rate as SG for stochastic non-convex optimization.Earlier results covered SG and a different accelerated-gradient variant, but not SHB.Source: §2 · p. 2

Generalization analysis

  • How momentum affects generalization remained an open theoretical question, although better performance had been observed in deep-learning practice.Prior multiple-pass uniform-stability analysis addressed SG, while this work extends the analysis to SG and stochastic momentum methods.Source: §2 · p. 2

Roadmap

  • The paper’s roadmap proceeds from method descriptions and a unified view to convergence and generalization analyses, then empirical comparisons and conclusions.Source: §2 · p. 2

3 Momentum Methods And Their Stochastic Variants

The paper frames learning as empirical-risk minimization and evaluates both optimization progress and generalization. It introduces the stochastic-gradient setup and describes SHB, SNAG, and SG as the methods considered for analysis.

3.1 Notations and Setup

  • For non-convex empirical-risk optimization, the paper studies convergence to a critical point, where the gradient is zero, rather than finding a global optimum.Finding a global optimum for a general non-convex problem is NP-hard.Source: §3.1 · p. 2
  • The setup distinguishes optimization speed from generalization, measured through population risk and the difference between population and empirical risk.Expected population risk accounts for randomness in both the training samples and the optimization algorithm.Source: §3.1 · p. 2
  • The analysis assumes a non-convex loss that is G-Lipschitz continuous and L-smooth in x, with hypothesis class Ω = R^d.The smoothness inequality used in the setup does not imply convexity.Source: §3.1 · pp. 2–3

3.2 Stochastic Momentum Methods

  • The stochastic gradient is an unbiased estimate of the objective gradient, and in empirical-risk learning it is the gradient of a randomly sampled example’s loss.Source: §3.2 · p. 3
  • The section presents SHB and SNAG updates alongside traditional SG, then motivates a unified view beyond treating their gradient-evaluation points as the sole difference.The supplied text describes SHB and SNAG update steps and notes that their convex convergence has been established.Source: §3.2 · p. 3

4 A Unified View of Stochastic Momentum Methods

The section casts SG, SHB, and SNAG as special cases of SUM, then derives recursions and cumulative updates for their unified analysis.

4 A Unified View of Stochastic Momentum Methods

  • Setting s=1/(1−β), 0, and 1 makes SUM reduce to SG, SHB, and SNAG, respectively.The section also presents a recursion implied by the SUM update for use in the unified analysis.Source: §4 · p. 3
  • SG has effective gradient step size α/(1−β), larger than SHB's and SNAG's; setting SG's step size to SNAG's yields worse training-error convergence in experiments.The paper identifies this effective step-size difference as important when comparing convergence.Source: §4 · p. 3
  • The recursion for v_k is key to non-convex convergence analysis, while allowing any s lets the framework analyze SHB, SNAG, and SG together.The paper contrasts this with a similar recursion previously used for deterministic convex optimization with s=0 and s=1.Source: §4 · p. 3
  • SHB and SNAG use smaller step sizes for each stochastic gradient, which the paper identifies as the main reason for their greater stability and better generalization.A cumulative-update lemma is presented as useful for the generalization-error analysis; its cases correspond to SHB, SNAG, and SG.Source: §4 · pp. 3–4

5 Convergence Analysis of SUM

The analysis compares convergence of the training objective with generalization under a unified stochastic framework. It finds similar-order convergence bounds across variants, while stability analysis favors momentum methods for generalization.

5.1 Main results

  • The theorem uses a common step size across variants, while a separate bound allows potentially larger initial step sizes for SG and SNAG than for SHB.The empirical studies are said to confirm this possibility.Source: §5.1 · p. 4
  • The three methods have gradient-square-norm convergence bounds of the same order, O(1/t), and SHB and SNAG have no empirical-risk-minimization advantage over SG.The bound differences depend on ((1 −β)s −1)²; the analysis notes that this term’s effect becomes marginal when β is large.Source: §5.1 · p. 4

5.2 Generalization Error Analysis of SUM

  • The analysis bounds the generalization error of the finite-iteration model using uniform stability, following an approach inspired by Hardt et al. [2016].Uniform stability measures how much a model’s prediction on a sample changes when one training example is replaced.Source: §5.2 · p. 4
  • Uniform stability analysis finds SHB and SNAG more stable than SG, implying potentially smaller generalization error after the same number of iterations.The generalization error is bounded, up to a constant, by the growth of the iterate difference between runs on datasets differing in one example.Source: §5.2 · p. 5
  • The authors suggest SNAG may attain lower population risk than SHB if its optimization error decreases faster than its generalization error increases, but they do not rigorously analyze this comparison.They identify non-convexity as making a rigorous optimization-error analysis complicated.Source: §5.2 · p. 5

6 Empirical Studies

On CIFAR-10 and CIFAR-100, the three methods show similar training-error convergence but different generalization behavior. SNAG has the best testing performance on CIFAR-100, while the CIFAR-100 comparison across framework variants shows decreasing generalization error from SG toward SHB.

Results on CIFAR-10 and CIFAR-100

  • Similar training-error convergence but differing generalization behavior appears across the three methods on CIFAR-10 and CIFAR-100.Figure 2 compares training error, testing error, and their absolute difference; its legend numbers indicate initial step sizes.Source: Figure 2 · p. 6, §6 · p. 6

Results on CIFAR-10

  • The initial step size is 0.001 for SHB and 0.01 for SNAG and SG; increasing SHB’s initial step size to 0.002 yields a divergent result.Figure 1 plots training and testing error against the number of iterations.Source: §6 · p. 6
  • On CIFAR-10, SG has a larger training–testing error gap than SNAG and SHB when the methods use the same initial step size, 0.001.The gap is used as an estimate of generalization error.Source: §6 · p. 6

Results on CIFAR-100

  • On CIFAR-100, SNAG achieves the best testing-data prediction performance among methods with similar training-error convergence.The comparison uses the same initial step size, 0.002.Source: §6 · p. 6

SUM variants on CIFAR-100

  • On CIFAR-100, generalization error decreases across the tested SUM variants from s = 10 (SG) toward s = 0 (SHB), while training-error convergence is similar.The comparison also includes s = 0.5, 1, and 2; s = 2 is identified as a new variant.Source: §6 · p. 6

7 Conclusion

The conclusion presents SUM as a unified framework for SHB, SNAG, and SG. Its analysis finds no momentum advantage in training speed but a generalization benefit, and the appendix proof verifies the framework’s special cases.

7 Conclusion

  • The paper concludes that momentum improves generalization performance but does not speed up training.Source: §7 · p. 6

A Proof of Proposition 1

  • SUM subsumes SHB, SNAG, and SG as special cases by choosing different values of s.Source: A Proof of Proposition 1 · p. 8
  • The proof identifies s = 0 with HB, s = 1 with NAG, and s = 1/(1 −β) with SG.For SG, the resulting update is the gradient method with step size α/(1 −β).Source: A Proof of Proposition 1 · p. 8

B Proof of Lemma 1

The proof establishes a recurrence for the sum of the iterate and an auxiliary term p_k. It derives the recurrence from the update definitions and states an initialization convention for the induction.

B Proof of Lemma 1

C Proof of Lemma 2

This section restates Lemma 2 for the update in (10) and begins its proof by rewriting that update.

C Proof of Lemma 2

  • The section re-presents Lemma 2 for the update in (10), with a statement applying to any k ≥ 0.The supplied passage does not include the lemma's bound.Source: C Proof of Lemma 2 · p. 9
  • The supplied passages do not show the rewritten update or the bound that Lemma 2 establishes.Source: C Proof of Lemma 2 · p. 9
  • The proof begins from update (10) and rewrites it.Source: C Proof of Lemma 2 · p. 9

D Proof of Theorem 1

The appendix proves Theorem 1 using lemmas for a transformed iterate, then invokes analogous lemmas and analysis to prove Theorem 2.

D Proof of Theorem 1

  • The proof of Theorem 1 introduces two key lemmas before presenting the transformed-iterate analysis.Source: D Proof of Theorem 1 · p. 9
  • Lemma 3 analyzes the transformed iterate z_k = x_k + p_k for SUM, and its proof uses smoothness and the zero-mean stochastic-gradient error.The proof then takes expectations and applies Cauchy–Schwarz.Source: D Proof of Theorem 1 · pp. 9–10
  • Theorem 1 is stated for a nonconvex, L-smooth objective with bounded gradient and bounded stochastic-gradient variance.Source: D Proof of Theorem 1 · p. 10

E Proof of Theorem 2

  • Lemma 5 gives a corresponding bound for z_k = x_k + p_k, and the authors say Lemma 5 and Lemma 4 yield Theorem 2 by similar analysis.Source: E Proof of Theorem 2 · p. 11

F Proof of Proposition 3

The proof of Proposition 3 bounds the separation between SUM iterates trained on datasets differing by one example, using the update relation and sampling probabilities.

F Proof of Proposition 3

  • Proposition 3 assumes a bounded gradient and an L-smooth loss, and considers SUM runs on datasets differing in one example.Source: F Proof of Proposition 3 · p. 11
  • The proof uses Lemma 2's relation to upper-bound the separation between the runs' iterates.Source: F Proof of Proposition 3 · p. 11
  • The proof separates the sampling cases: the differing example is selected with probability 1/n, while a shared example is selected with probability 1 − 1/n.Source: F Proof of Proposition 3 · p. 11
Loading 1808.10396v1…