Minimizing finite sums with the stochastic average gradient
Mark SchmidtNicolas Le RouxFrancis Bach
Introduces the stochastic average gradient method, which stores past gradient evaluations to achieve the fast linear convergence of full-batch gradient descent while maintaining the cheap per-iteration cost of stochastic methods for finite-sum convex optimization.
Modern data analysis and machine learning frequently require minimizing functions structured as the average of a massive collection of individual data points. Organizations working with these large datasets face a persistent computational dilemma: standard full gradient algorithms make steady, accurate progress toward the optimal solution but become prohibitively slow because each step requires processing the entire dataset, while standard stochastic gradient algorithms are fast per step because they sample only one data point at a time, but their overall convergence stalls significantly as they approach the solution.
The article introduces and evaluates the stochastic average gradient (SAG) algorithm, demonstrating how maintaining a memory of previously evaluated gradients allows an optimization method to retain the low per-iteration cost of stochastic methods while achieving the fast convergence rates typical of full gradient methods.
To establish these results, the authors combine rigorous mathematical analysis using dynamical system Lyapunov functions with extensive empirical testing. The evaluation benchmarks the proposed method against competitive stochastic gradient, accelerated full gradient, quasi-Newton (L-BFGS), and coordinate descent methods across nine standard benchmark classification datasets containing up to roughly 700,000 data points and over 1.3 million variables.
The findings demonstrate substantial improvements across theoretical and practical benchmarks. First, the method improves the general theoretical convergence rate for convex objectives from sublinear error reduction to an order-of-magnitude faster decay, achieving a linear (exponential) error reduction rate for strongly-convex objectives using constant step sizes. Second, on ill-conditioned problems, the algorithm operates at roughly the speed of full gradient methods per effective pass through data while using iterations that are n times cheaper (where n is the dataset size). Third, empirical tests on logistic regression show that the algorithm tolerates step sizes 100 to 10,000 times larger than its deterministic cyclic predecessor (IAG), preventing divergence and drastically outperforming existing stochastic and deterministic baselines within the critical regime of 1 to 50 passes over the data. Fourth, practical extensions such as non-uniform sampling and mini-batching up to 500 examples maintain rapid convergence while yielding up to 100-fold reductions in storage requirements.
These results demonstrate that organizations can train high-accuracy models on large-scale datasets with significantly less computational infrastructure and runtime. Practitioners no longer need to choose between the rapid early progress of stochastic methods and the long-term precision of batch gradient methods. Furthermore, the algorithm is self-adapting to local geometric curvature and supports an efficient line-search whose per-step cost is entirely independent of the dataset size.
For engineering and data science teams implementing large-scale empirical risk minimization, the article supports adopting the stochastic average gradient method with an adaptive line-search, particularly when model training permits between 2 and 50 data passes. When applied to linearly parameterized models such as logistic and least-squares regression, teams should leverage just-in-time updates to reduce memory storage from large matrices down to linear space proportional to the number of data points, and employ non-uniform sampling proportional to individual Lipschitz constants to further accelerate performance.
Confidence in these findings is high for smooth, convex finite-sum problems, supported by computer-aided formal proofs and consistent experimental benchmarks. However, leaders should note that the base algorithm requires storing past gradient approximations (which requires structural model simplifications to avoid high memory overhead) and that theoretical guarantees assume smooth convex loss functions, meaning application to non-convex models such as deep neural networks requires further validation.
- Paper: Adaptive Subgradient Methods for Online Learning and Stochastic Optimization, John Duchi et al. (2011). Introduces foundational adaptive gradient concepts and convergence principles for online and stochastic optimization that inform memory-based stochastic update strategies.
- Paper: Online Convex Programming and Generalized Infinitesimal Gradient Ascent, Martin A. Zinkevich (2003). Establishes the fundamental theoretical framework and regret bounds for online convex gradient-based optimization.
- Paper: Pegasos: primal estimated sub-gradient solver for SVM, Shai Shalev-Shwartz et al. (2007). Demonstrates the efficiency and sample-size independence of stochastic sub-gradient steps on convex machine learning objectives that SAG builds upon.
- Paper: SAGA: A Fast Incremental Gradient Method With Support for Non-Strongly Convex Composite Objectives, Aaron Defazio et al. (2014). Extends SAG to the SAGA algorithm, enabling unbiased gradient estimates, simpler convergence proofs, and support for non-smooth composite regularizers.
- Paper: Accelerating Stochastic Gradient Descent using Predictive Variance Reduction, Rie Johnson et al. (2013). Develops SVRG, achieving the same fast linear convergence rate as SAG without requiring explicit storage of historical gradients.
- Paper: Optimization Methods for Large-Scale Machine Learning, Léon Bottou et al. (2016). Surveys large-scale optimization methods and contextualizes the theoretical breakthroughs of variance-reduced algorithms like SAG alongside classical stochastic gradient methods.
