Stochastic Conjugate Gradient Algorithm With Variance Reduction

Xiao-Bo Jin, Xu-Yao Zhang, Kaizhu Huang, Guang-Gang Geng · DOI

Abstract

Large-scale Empirical Risk Minimization (ERM) is a cornerstone of modern machine learning. While first-order stochastic methods like SGD are widely used, they suffer from high variance in gradient estimates, leading to slow convergence. Variance reduction techniques like SVRG improve stability but introduce sensitivity to hyperparameters like learning rates. This paper introduces CGVR (Stochastic Conjugate Gradient with Variance Reduction), an algorithm that bridges the gap between simple first-order methods and complex second-order methods. By combining the efficiency of Conjugate Gradient (CG) with variance reduction and an automated line search, CGVR achieves faster convergence and superior robustness compared to state-of-the-art solvers.

Introduction

In the context of massive datasets, optimization algorithms must balance computational efficiency with convergence speed. Stochastic Gradient Descent (SGD) is the standard for large-scale Empirical Risk Minimization (ERM), yet its inherent noise necessitates careful tuning and often results in sub-optimal convergence rates.

Existing improvements generally fall into two categories: variance reduction (e.g., SVRG) and quasi-Newton methods (e.g., L-BFGS). SVRG reduces noise through periodic full-gradient snapshots but remains highly sensitive to the choice of learning rate and inner loop length. Conversely, stochastic variants of L-BFGS utilize curvature information for faster convergence but are memory-intensive and difficult to implement. The authors propose the Conjugate Gradient (CG) method as a "missing middle"—faster than standard gradient descent but significantly simpler and more memory-efficient than second-order methods.

The CGVR Algorithm

The proposed CGVR algorithm integrates the classic Conjugate Gradient framework into a stochastic, variance-reduced setting. It operates through a nested loop structure:

  1. Variance-Reduced Gradient: Similar to SVRG, CGVR maintains an outer loop to compute a full gradient snapshot. The inner loop uses minibatches to estimate the gradient, correcting for noise using the snapshot.
  2. Conjugate Search Directions: Rather than following the steepest descent, CGVR calculates search directions conjugate to previous steps. This allows the algorithm to navigate narrow valleys in the loss landscape more effectively.
  3. Automated Step-Sizing: To eliminate the need for manual learning rate tuning, CGVR incorporates an inexact Wolfe line search performed on a subsample of the data.
  4. Update Rules: The framework supports both Fletcher-Reeves (FR) and Polak-Ribière (PR+) formulas for determining conjugate steps, providing flexibility between theoretical guarantees and practical performance.

Experimental Evaluation

The authors evaluated CGVR across six large-scale binary classification datasets from the LIBSVM repository, ranging from 32,000 samples (a9a) to 11 million samples (HIGGS). The performance was compared against SGD, SVRG, standard CG, and stochastic L-BFGS (SLBFGS) across four loss functions: Ridge, Logistic, Hinge, and Squared Hinge.

Convergence comparison of CGVR against baseline stochastic and conjugate gradient methods across multiple datasets and loss functions.

Key Insights and Results

Superior Convergence and Accuracy

Experimental results demonstrate that CGVR consistently outperforms SVRG, SGD, and SLBFGS in terms of both convergence speed and final optimization accuracy. As shown in the multi-dataset comparison, CGVR (represented by the solid blue line) reaches lower loss values faster than its counterparts across almost all tested scenarios.

Robustness to Hyperparameters

A significant advantage of CGVR is its robustness to the inner loop length ($m$), a parameter that often requires extensive tuning in SVRG. While baseline methods like SVRG show high sensitivity to $m$, CGVR maintains rapid convergence even with very small inner loop sizes.

Impact of inner loop length ($m$) on loss and computation time. CGVR demonstrates remarkable stability across different values of $m$ compared to SVRG and SLBFGS.

Efficiency on Massive Data

On the largest datasets, SUSY and HIGGS, CGVR achieved optimal performance faster than the highly optimized LIBLINEAR C++ library. This efficiency is partly due to the automated line search, which removes the overhead of manual "learning rate sweeps" typically required for SGD-based methods. Furthermore, CGVR's memory footprint is minimal, requiring only the storage of the last gradient vector.

Conclusion and Future Work

CGVR provides a theoretically sound and practically efficient optimization framework for large-scale machine learning. It achieves linear convergence for strongly convex functions and demonstrates superior empirical performance and robustness.

Future research directions include bridging the theoretical gap for the PR+ update rule, which often performs better in practice than the FR rule used in current proofs. Additionally, the authors suggest extending CGVR to non-convex problems such as sparse dictionary learning and low-rank matrix approximation, where the benefits of conjugate directions could be further realized.

Summary updated

BibTeX
@article{jin2017stochastic,
  author = {Xiao-Bo Jin and Xu-Yao Zhang and Kaizhu Huang and Guang-Gang Geng},
  title = {{Stochastic Conjugate Gradient Algorithm With Variance Reduction}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2017},
  doi = {10.1109/tnnls.2018.2868835},
}
Figure