Finite-Sum Smooth Optimization with SARAH

Lam M. Nguyen, Marten van Dijk, Dzung T. Phan, Phuong Ha Nguyen, Tsui-Wei Weng, Jayant R. Kalagnanam

TL;DR

This paper provides a rigorous convergence analysis for SARAH, a variance-reduced optimization algorithm, showing it matches the theoretical lower-bound complexity for smooth nonconvex problems. The authors also introduce SARAH++, a new variant for convex optimization that uses a clever inner-loop stopping criterion to avoid redundant computations, and an adaptive version that significantly boosts practical performance.

What Problem Does This Paper Address?

In machine learning, we often need to minimize a "finite-sum" objective function: $F(w) = \frac{1}{n} \sum_{i=1}^n f_i(w)$. When the number of data points $n$ is massive, classical Gradient Descent (GD) becomes prohibitively expensive because it requires a full gradient computation at every step.

Stochastic Gradient Descent (SGD) solves this by using a single random sample to estimate the gradient, but this introduces high variance, slowing down convergence. "Variance reduction" methods like SVRG and SARAH were developed to bridge this gap. However, a key theoretical question remained: can these algorithms reach the absolute mathematical limit of efficiency (the "lower bound") for nonconvex problems? Furthermore, while SARAH worked well in practice for convex problems, it lacked the robust theoretical guarantees and stopping criteria seen in other state-of-the-art methods.

Methods

The authors focus on the SARAH (Stochastic Recursive Gradient Algorithm) framework. Unlike many other methods that use unbiased gradient estimators, SARAH uses a biased recursive update: $$v_t^{(s)} = \nabla f_{i_t}(w_t^{(s)}) - \nabla f_{i_t}(w_{t-1}^{(s)}) + v_{t-1}^{(s)}$$

The paper introduces three key algorithmic contributions:

  1. Modified SARAH (Nonconvex): They prove that by simply taking the last point of the inner loop as the starting point for the next outer loop (rather than a random point), SARAH matches the best-known theoretical complexity for nonconvex optimization.
  2. SARAH++ (Convex): They introduce a new stopping criterion for the inner loop. Instead of running for a fixed number of steps, the inner loop terminates as soon as the current gradient estimate becomes significantly smaller than the initial gradient of that loop ($\|v_{t-1}^{(s)}\|^2 \leq \gamma \|v_0^{(s)}\|^2$).
  3. SARAH Adaptive: A practical variant where the learning rate $\eta$ is adjusted dynamically based on the progress made within the inner loop, further reducing the need for manual hyperparameter tuning.

Datasets

The authors evaluated their algorithms using $\ell_2$-regularized logistic regression on several standard large-scale datasets from the LIBSVM library:

  • covtype: 406,708 training samples.
  • ijcnn1: 91,701 training samples.
  • w8a: 49,749 training samples.
  • phishing: 7,738 training samples.

Key Insights and Ideas

  • Matching the Lower Bound: The most significant theoretical "aha moment" is that SARAH achieves a total complexity of $\mathcal{O}(\frac{\sqrt{n}}{\epsilon} \vee n)$ for nonconvex problems. As shown in Figure 1, this matches the theoretical lower bound, placing it in the same elite class as algorithms like SPIDER and SpiderBoost.
  • The Power of Bias: While many researchers prefer unbiased estimators for their mathematical convenience, this paper reinforces that biased recursive estimators (like SARAH's) can be more efficient in practice and theory.
  • Efficiency via Early Exit: The SARAH++ stopping criterion is a major practical insight. By recognizing when an inner loop has reached "diminishing returns" (when the gradient update becomes too tiny), the algorithm saves significant computational resources by jumping back to a full gradient update sooner.

Key Results

  • Nonconvex Optimality: The paper proves SARAH is optimal for nonconvex smooth functions, matching the $\Omega(\sqrt{n}/\epsilon)$ lower bound when $n \leq \mathcal{O}(\epsilon^{-2})$.
  • Convex Convergence: SARAH++ is proven to have sublinear convergence for general convex problems and linear convergence for strongly convex problems.
  • Empirical Speedup: In numerical experiments, SARAH++ and SARAH Adaptive consistently outperformed the original SARAH algorithm across all tested datasets, reaching lower loss values in fewer "effective passes" (epochs) over the data.
Table 1: Comparison of results on the total complexity for smooth nonconvex optimization

As seen in the table above, SARAH (this paper) achieves the best-known complexity without requiring the "bounded variance" assumption that limits other methods like SCSG or SNVRG.

Limitations and Future Work

The authors identify one major "open question": while they provide iteration complexity for SARAH++, the total complexity (including the cost of full gradient evaluations in the outer loop) remains non-trivial to derive because the inner loop length is now a random variable.

Additionally, while the adaptive version performs exceptionally well in experiments, it currently lacks a formal convergence proof. Bridging the gap between the empirical success of the adaptive method and a rigorous theoretical guarantee is a clear next step for the field.

Summary updated

BibTeX
@article{nguyen2022finite,
  author = {Lam M. Nguyen and Marten van Dijk and Dzung T. Phan and Phuong Ha Nguyen and Tsui-Wei Weng and Jayant R. Kalagnanam},
  title = {{Finite-Sum Smooth Optimization with SARAH}},
  journal = {Comput. Optim. Appl.},
  year = {2022},
  doi = {10.1007/s10589-022-00375-x},
}
Figure