When Does Stochastic Gradient Algorithm Work Well?

Lam M. Nguyen, Nam H. Nguyen, Dzung T. Phan, Jayant R. Kalagnanam, Katya ScheinbergarXiv 2018

Abstract

In this paper, we consider a general stochastic optimization problem which is often at the core of supervised learning, such as deep learning and linear classification. We consider a standard stochastic gradient descent (SGD) method with a fixed, large step size and propose a novel assumption on the objective function, under which this method has the improved convergence rates (to a neighborhood of the optimal solutions). We then empirically demonstrate that these assumptions hold for logistic regression and standard deep neural networks on classical data sets. Thus our analysis helps to explain when efficient behavior can be expected from the SGD method in training classification models and deep neural networks.

Introduction

In machine learning, a persistent gap exists between the theoretical understanding and practical application of Stochastic Gradient Descent (SGD). Classical theory suggests that with a fixed learning rate, SGD should "wander" around the optimal solution due to inherent sampling noise. To achieve exact convergence, theory dictates either a decaying learning rate or computationally expensive variance reduction techniques like SVRG.

However, practitioners frequently observe that simple SGD with a fixed, relatively large step size performs remarkably well for training deep neural networks. This paper bridges this gap by identifying specific conditions under which simple SGD converges rapidly to a high-quality neighborhood of the solution.

Theoretical Framework: The Near-Interpolation Property

The authors introduce a framework based on the observation that in successful machine learning models, most individual loss functions ($f_i$) have nearly zero gradients at the global optimum ($w_*$). This is formalized using two metrics:

  1. $p_\epsilon$: The probability that a randomly chosen sample's gradient is smaller than a threshold $\epsilon$ at the solution.
  2. $M_\epsilon$: The average magnitude of the remaining "large" gradients.

When $p_\epsilon$ is high (close to 1), the "stochastic noise" that typically plagues SGD effectively vanishes as the model approaches the optimum. This "near-interpolation" property allows the algorithm to mimic the fast convergence of more complex methods without their overhead.

Convergence Analysis

Under the assumption of high $p_\epsilon$, the authors prove improved convergence rates for three scenarios:

  • Strongly Convex: Linear convergence to a neighborhood of the optimum.
  • Convex: $O(1/t)$ convergence to a neighborhood.
  • Non-convex (Deep Learning): Convergence to a neighborhood of a stationary point, provided the variance of stochastic gradients relates predictably to the true gradient.

Empirical Validation

The theory was validated across various benchmarks, including Logistic Regression on datasets like covtype and a9a, where nearly 100% of individual gradients were smaller than $10^{-3}$ at the solution. For neural networks on MNIST and CIFAR10, over 99% of component functions exhibited negligible gradients at the final solution. Performance comparisons show that SGD often matches or outperforms complex variance-reduction and quasi-Newton methods during the critical early-to-mid stages of training.

Discussion: SGD as Pseudo-GD

The core insight is that because gradients at the solution are mostly small, SGD begins to behave like standard Gradient Descent (GD) as it nears the optimum. This explains why it avoids the wild oscillations predicted by classic theory.

SGD trajectory under the proposed assumptions, showing smooth convergence.

When data is "clean" (high $p_\epsilon$), the reachable neighborhood is extremely small and attained very quickly. However, this behavior depends on data quality; in noisy or under-parameterized settings where the model cannot fit the data well, these improved rates may not apply.

Conclusion

This work provides a theoretical explanation for the practical success of SGD with fixed step sizes. While a fixed step size eventually leads to a performance plateau, the "near-interpolation" property of modern datasets ensures this plateau is reached quickly and at a high level of accuracy. Future work includes refining the analytical calculation of constants for complex non-convex architectures.

Summary updated

BibTeX
@misc{nguyen2018when,
  author = {Lam M. Nguyen and Nam H. Nguyen and Dzung T. Phan and Jayant R. Kalagnanam and Katya Scheinberg},
  title = {{When Does Stochastic Gradient Algorithm Work Well?}},
  year = {2018},
  eprint = {1801.06159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1801.06159},
}
Figure