Second-Order Stochastic Optimization for Machine Learning in Linear Time

Naman Agarwal, Brian Bullins, Elad Hazan

TL;DR

This paper introduces LiSSA, a novel second-order optimization algorithm for machine learning that achieves the same per-iteration cost as first-order methods while offering faster convergence. It's particularly effective for large-scale, sparse datasets and can even outperform existing methods in certain scenarios.

What Problem Does This Paper Address?

Training machine learning models often involves optimizing a complex objective function. While first-order methods (like gradient descent) are computationally efficient per step, they can require many iterations to converge, especially for large datasets. Second-order methods, which use curvature information (the Hessian), can converge much faster but are traditionally too computationally expensive for large-scale problems due to the cost of computing and inverting the Hessian. This paper aims to bridge this gap by developing second-order methods that are both computationally feasible and offer faster convergence for large-scale machine learning.

Methods

The core contribution is the development of LiSSA (Linear time Stochastic Second-Order Algorithm) and its variants. LiSSA uses an approximate Newton update, but crucially, it employs a novel, unbiased estimator for the Hessian inverse. This estimator is derived from a Taylor expansion and can be computed efficiently. The key innovation lies in how this estimator is constructed and used, allowing for a per-iteration cost that matches first-order methods.

Specifically, LiSSA has two phases:

  1. Initial Phase: A standard first-order method is used for a limited number of steps to reach a region where linear convergence is guaranteed.
  2. Newton Phase: LiSSA takes approximate Newton steps using the novel Hessian inverse estimator. The algorithm cleverly averages multiple estimates of the Hessian inverse to improve concentration and uses parameters $S_1$ and $S_2$ to control the trade-off between accuracy and computational cost.

A variant, LiSSA-Sample, further improves runtime by leveraging matrix sampling techniques, especially when the number of training examples ($m$) is much larger than the dimensionality ($d$).

Datasets

The paper evaluates LiSSA on four datasets for logistic regression with L2 regularization:

  • MNIST (4-9)
  • Mushrooms
  • CoverType
  • RealSim

Key Insights and Ideas

  • Bridging the Gap: The paper demonstrates that second-order optimization doesn't have to be prohibitively expensive for large-scale machine learning. By carefully designing a Hessian inverse estimator, they achieve linear-time per-iteration costs.
  • Sparsity is Key: For Generalized Linear Models (GLMs), the Hessian-vector product can be computed in time linear in the sparsity of the input data. This makes LiSSA particularly well-suited for high-dimensional, sparse datasets common in machine learning.
  • Faster Convergence in Practice: While theory often focuses on worst-case scenarios, LiSSA's experimental results show it can outperform popular first-order methods, especially in achieving very high accuracy.
  • Condition Number Independence: For self-concordant functions, LiSSA can achieve linear convergence with a runtime independent of the condition number, a significant theoretical advantage.

Key Results

  • LiSSA: Achieves convergence rates comparable to first-order methods with linear per-iteration time complexity. For GLM functions, the per-iteration time is linear in input sparsity.
  • LiSSA-Sample: Offers improved theoretical running times for the regime where $m \gg d$, outperforming existing accelerated first-order methods.
  • Experimental Performance: LiSSA shows competitive or superior performance compared to SVRG and SAGA in terms of log-error achieved per epoch across various datasets and regularization parameters. In terms of time, LiSSA often has a significant advantage over methods like NewSamp and standard Newton's method, especially when high accuracy is required.

Limitations and Future Work

  • Variance of Estimator: The paper notes that the bound on the variance of their Hessian inverse estimator might be pessimistic and could potentially be improved.
  • Warm Start: While LiSSA generally converges well, the proofs rely on a warm start, though experiments suggest this is not a significant practical issue. Improving the warm-start procedure is suggested for future work.
  • High Accuracy Regime: The benefits of LiSSA and other second-order methods become most apparent in the very high accuracy regime, which might not always be the primary goal in all applications.
  • Accelerated Methods for Low Condition Numbers: For very low condition numbers, accelerated first-order methods like APCG can outperform LiSSA. The authors suggest that LiSSA-Sample variants could potentially address this.
  • Non-Convex Optimization: The current work focuses on convex optimization. Extending these ideas to non-convex settings is a promising future direction.

Summary updated

BibTeX
@article{agarwal2017second,
  author = {Naman Agarwal and Brian Bullins and Elad Hazan},
  title = {{Second-Order Stochastic Optimization for Machine Learning in Linear Time}},
  journal = {J. Mach. Learn. Res.},
  year = {2017},
  url = {https://openreview.net/forum?id=HAxbMMzbKlq},
}
Figure