Stochastic Nested Variance Reduction for Nonconvex Optimization

Dongruo Zhou, Pan Xu, Quanquan Gu

Introduction

In modern machine learning, optimization often involves minimizing a "finite-sum" objective function $F(x) = \frac{1}{n} \sum_{i=1}^n f_i(x)$, where $n$ is the number of data points. For nonconvex objectives like deep neural networks, finding a global minimum is typically intractable. Instead, the goal is to efficiently find an $\epsilon$-approximate stationary point, where $\|\nabla F(x)\| \leq \epsilon$.

While Stochastic Gradient Descent (SGD) is the standard workhorse, its high variance necessitates small step sizes and slow convergence. Variance-reduction techniques like SVRG and SCSG have improved upon SGD by using periodic full-gradient snapshots to correct noisy stochastic estimates. However, these methods still exhibit significant dependencies on the sample size $n$ or the target accuracy $\epsilon$. This paper introduces SNVRG (Stochastic Nested Variance-Reduced Gradient), which utilizes a nested hierarchy of reference points to achieve superior theoretical complexity and empirical performance.

Methodology: Stochastic Nested Variance Reduction

The core innovation of SNVRG is the use of $K+1$ nested reference points rather than the single snapshot used in SVRG.

Hierarchical Snapshots

SNVRG operates through a series of nested loops. The outermost loop computes a full gradient snapshot, which is accurate but computationally expensive. Inner loops compute "mini-snapshots" more frequently. This hierarchy allows the variance of the stochastic gradient estimate to decay much faster than in traditional methods.

Algorithm Structure

The algorithm is structured into epochs. In each iteration, it constructs a semi-stochastic gradient using the $K+1$ nested points. Theoretically, the optimal number of levels $K$ is approximately $\log \log n$, ensuring that the memory overhead remains manageable at $O(Kd)$, where $d$ is the parameter dimension. The authors also propose SNVRG-PL, a variant designed for functions satisfying the Polyak-Łojasiewicz (PL) condition, enabling convergence to a global minimum.

Theoretical Complexity

SNVRG sets a new theoretical benchmark for nonconvex finite-sum optimization. By leveraging nested variance reduction, it breaks the $O(n^{2/3}\epsilon^{-2})$ barrier established by previous state-of-the-art methods like SVRG.

Table 1: Comparison of gradient complexity across various optimization algorithms for nonconvex and gradient-dominant functions.

As shown in the table above, SNVRG achieves a gradient complexity of $\tilde{O}(n \wedge \epsilon^{-2} + \epsilon^{-3} \wedge n^{1/2}\epsilon^{-2})$. For large-scale datasets where $n$ is very large, SNVRG improves upon SCSG by a factor of $n^{1/6}$, reducing the dependency on $n$ from $n^{2/3}$ to $n^{1/2}$ in specific regimes.

Visualizing the Complexity Gain

The advantage of SNVRG becomes particularly clear when examining the relationship between gradient complexity and the number of samples $n$.

Figure 1: Gradient complexity as a function of $n$. SNVRG (red) demonstrates a significantly lower complexity compared to SVRG (green) and SCSG (blue) as $n$ increases.

The nested structure allows for larger step sizes or fewer total gradient evaluations, making it highly efficient for massive datasets.

Empirical Performance

The authors evaluated SNVRG on standard deep learning benchmarks, including MNIST, CIFAR-10, and SVHN, using a LeNet architecture. SNVRG was compared against SGD, SGD with Momentum, ADAM, and SCSG.

Key empirical findings include:

  • Faster Convergence: SNVRG consistently reached lower training loss and test error faster than competing optimizers.
  • Practical Simplicity: While theory suggests many nested levels, the authors found that just $K=2$ (three reference points) was sufficient to outperform sophisticated optimizers like ADAM in practice.
  • Robustness: The algorithm showed strong performance both with and without standard learning rate decay schedules, indicating that the variance reduction mechanism itself provides significant stability.

Conclusion

SNVRG represents a significant advancement in first-order optimization for nonconvex problems. By introducing a nested hierarchy of gradient snapshots, it achieves near-optimal theoretical complexity and demonstrates superior performance on practical deep learning tasks. While the $O(Kd)$ memory overhead is a consideration for extremely high-dimensional models, the efficiency gains in gradient evaluations make it a powerful tool for large-scale machine learning.

Summary updated

BibTeX
@article{zhou2020stochastic,
  author = {Dongruo Zhou and Pan Xu and Quanquan Gu},
  title = {{Stochastic Nested Variance Reduction for Nonconvex Optimization}},
  journal = {J. Mach. Learn. Res.},
  year = {2020},
  url = {https://openreview.net/forum?id=GBn5sa8cmDO},
}
Figure