SVRG meets SAGA: k-SVRG - A Tale of Limited Memory

Anant Raj, Sebastian U. SticharXiv 2018

Abstract

Variance reduced stochastic gradient (SGD) methods converge significantly faster than the vanilla SGD counterpart. However, these methods are not very practical on large scale problems, as they either i) require frequent passes over the full data to recompute gradients—without making any progress during this time (like for SVRG), or ii) they require additional memory that can surpass the size of the input problem (like for SAGA). In this work, we propose $k$-SVRG that addresses these issues by making best use of the available memory and minimizes the stalling phases without progress. We prove linear convergence of $k$-SVRG on strongly convex problems and convergence to stationary points on non-convex problems. Numerical experiments show the effectiveness of our method.

The Memory Gap in Variance Reduction

In large-scale machine learning, Empirical Risk Minimization (ERM) is typically solved using Stochastic Gradient Descent (SGD). While SGD is computationally efficient per iteration, its inherent variance slows convergence to the exact optimum. Variance-reduced methods like SVRG and SAGA were developed to address this, but they introduce significant practical overheads:

  1. SVRG (Stochastic Variance Reduced Gradient): Periodically stops to compute a full gradient of the entire dataset. During this "snapshot" phase, the algorithm makes no progress, leading to long "stalling" periods that waste resources.
  2. SAGA: Stores a table of the most recent gradient for every data point, requiring $O(dn)$ memory. For massive datasets, this memory footprint often exceeds available RAM.

Most modern hardware systems exist in a "memory gap": they have more memory than SVRG's minimal $O(d)$ requirement but far less than SAGA's $O(dn)$. $k$-SVRG is designed to bridge this gap by utilizing whatever memory is available to minimize stalling.

Comparison of optimization methods across complexity, memory, and pass requirements.

Methods: Bridging SVRG and SAGA

The core innovation of $k$-SVRG is maintaining a limited set of $k$ "snapshot points" instead of just one (as in SVRG) or $n$ (as in SAGA). The parameter $k$ acts as a tunable "knob" for the user to trade available memory for smoother convergence.

The paper introduces three main variants:

  • $k$-SVRG-V1: Updates snapshot points based on indices randomly selected during inner loop iterations.
  • $k$-SVRG-V2: Samples a fresh set of $q$ indices at the end of each outer loop to update, facilitating easier theoretical analysis for non-convex problems.
  • $k_2$-SVRG (Heuristic): A practical version that processes data in blocks using random permutations, strictly limiting memory to $2k$ vectors.

Furthermore, the authors provide a refined analysis of SVRG, proving it converges even with shorter, more frequent updates than previously theorized.

Key Insights and Results

The authors evaluated $k$-SVRG on $\ell_2$-regularized logistic regression tasks using the covtype and MNIST datasets.

Theoretical and Empirical Performance

$k$-SVRG achieves linear convergence rates on strongly convex problems, matching SVRG and SAGA. Crucially, it also converges to stationary points in non-convex settings, making it applicable to modern deep learning.

Empirically, $k$-SVRG variants consistently outperform vanilla SVRG. By breaking the full gradient computation into $k$ smaller chunks, the optimization progress becomes significantly smoother. Instead of the "jumpy" behavior seen in SVRG—where progress stops entirely during full passes—$k$-SVRG distributes these updates, leading to shorter stalling phases and more consistent progress.

Performance comparison on the covtype dataset showing k-SVRG's reduced stalling compared to vanilla SVRG.

Robustness to Memory Constraints

A key finding is that even a small amount of extra memory (small $k$) provides significant benefits over vanilla SVRG. This makes $k$-SVRG a robust choice for systems where memory is a constrained but not strictly minimal resource.

Limitations and Future Work

While $k$-SVRG is more memory-efficient than SAGA, the $O(kd)$ overhead may still be challenging for extremely high-dimensional models. Additionally, the current theory for non-convex problems imposes constraints on the inner loop size.

Future research directions include exploring the use of inexact gradients at snapshot points to further reduce computation time and providing a full theoretical proof for the $k_2$ heuristic, which showed the best practical performance in experiments.

Summary updated

BibTeX
@misc{raj2018svrg,
  author = {Anant Raj and Sebastian U. Stich},
  title = {{SVRG meets SAGA: k-SVRG - A Tale of Limited Memory}},
  year = {2018},
  eprint = {1805.00982},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1805.00982},
}
Figure