Stochastic Gradient Methods with Preconditioned Updates

Abdurakhmon Sadiev, Aleksandr Beznosikov, Abdulla Jasem Almansoori, Dmitry Kamzolov, Rachael Tappenden, Martin Takác

Optimization is the heartbeat of modern machine learning, but not all loss landscapes are created equal. When a problem is "ill-conditioned"—meaning the objective function is much steeper in some directions than others—standard first-order methods like Stochastic Gradient Descent (SGD) can flounder, oscillating wildly or crawling toward a solution.

In their recent paper, Sadiev et al. introduce Scaled SARAH and Scaled L-SVRG, two new algorithms that marry the efficiency of variance-reduced gradient methods with the "curvature-awareness" of second-order preconditioning.

TL;DR

The authors propose new "scaled" versions of the SARAH and L-SVRG algorithms that use a diagonal Hessian approximation (Hutchinson’s method) to adaptively rescale search directions. These methods achieve state-of-the-art theoretical convergence rates for preconditioned non-convex optimization and demonstrate superior practical performance on badly scaled problems compared to popular optimizers like Adam.

What Problem Does This Paper Address?

Most popular optimizers in deep learning are first-order methods. They are computationally cheap but "blind" to the local geometry (curvature) of the loss function. While second-order methods (like Newton's method) use curvature to take more direct paths to the optimum, they are prohibitively expensive for large-scale problems due to the cost of computing and inverting the Hessian matrix.

This paper tackles the challenge of ill-conditioning and bad scaling. In these scenarios, the "steepness" of the loss function varies drastically across different dimensions. First-order methods struggle here because a single learning rate is often too large for steep directions (causing instability) and too small for shallow ones (causing slow progress). The goal is to find a middle ground: a method that uses approximate curvature information to scale the gradient adaptively without the massive overhead of full second-order methods.

Methods

The authors introduce a diagonal preconditioner based on Hutchinson’s approach. Instead of computing the full Hessian, they estimate its diagonal using Hessian-vector products, which can be computed efficiently via backpropagation.

Key components include:

  • Adaptive Diagonal Preconditioning: The preconditioner $D_t$ is updated using a momentum-based formula, similar to how Adam tracks gradient moments, but applied to the Hessian diagonal.
  • Scaled SARAH: A single-loop algorithm that combines the PAGE/SARAH gradient estimator with the new preconditioner.
  • Scaled L-SVRG: A "loopless" variant of the popular SVRG algorithm, modified to include adaptive scaling.

Unlike many existing adaptive methods, these new algorithms are designed to be easier to tune. As shown in Table 1, the authors' preconditioner works well with a wide range of momentum parameters ($\beta_2$), whereas Adam often requires specific, large values to converge.

Table 1: Comparison of scaled methods for non-convex problems.

Datasets

The authors evaluated their algorithms on several standard benchmarks:

  • LibSVM Datasets: a9a, w8a, rcv1, and real-sim. These were used for binary classification tasks using both convex (logistic regression) and non-convex (non-linear least squares) loss functions.
  • MNIST: Used to train a LeNet-5 model to demonstrate the algorithms' applicability to deep neural networks.
  • Synthetic Scaling: The authors intentionally corrupted the feature scales of the LibSVM datasets to test how robust the optimizers were to extreme ill-conditioning.

Key Insights and Ideas

  • Linear Convergence under PL: One of the most significant theoretical contributions is proving that these preconditioned methods achieve a linear rate of convergence when the objective function satisfies the Polyak-Łojasiewicz (PL) condition (a generalization of strong convexity that applies to some non-convex functions). This is a first for preconditioned stochastic methods.
  • Curvature-Based Damping: The preconditioner intuitively amplifies dimensions with low curvature (shallow surfaces) and damps directions with high curvature (sharp surfaces). This allows for a more aggressive and stable descent.
  • Matrix-Free Efficiency: By focusing on a diagonal approximation and using Hessian-vector products, the computational cost per iteration remains low—only about twice the cost of a standard gradient computation.

Key Results

The theoretical complexity results, summarized in Table 2, show that Scaled SARAH and Scaled L-SVRG achieve the best known rates for preconditioned methods in both general non-convex (NC) and PL settings.

Table 2: Summary of complexity results.

In practical experiments:

  • Robustness: The "Scaled" variants consistently outperformed their unscaled counterparts, especially as the problem scaling became more extreme.
  • Competitive with Adam: On the MNIST and LibSVM benchmarks, Scaled L-SVRG and Scaled SARAH were highly competitive with, and often outperformed, the industry-standard Adam optimizer in terms of both convergence speed and final error.
  • Initialization: The authors found that a small "warm-up" (a minibatch of size 100) was sufficient to get a good initial estimate of the Hessian diagonal, ensuring stable convergence from the start.

Limitations and Future Work

While the practical results are impressive, the authors acknowledge a persistent gap in optimization theory: the theoretical bounds for scaled methods are currently no better (and sometimes slightly worse) than those for unscaled methods. Closing this "theory-practice gap"—explaining mathematically why preconditioning helps as much as it does in the real world—remains a major open question.

Additionally, while the methods were tested on LeNet-5, further research is needed to see how these second-order preconditioners scale to massive Transformer-based models or more complex non-convex landscapes found in modern generative AI.

Summary updated

BibTeX
@article{sadiev2024stochastic,
  author = {Abdurakhmon Sadiev and Aleksandr Beznosikov and Abdulla Jasem Almansoori and Dmitry Kamzolov and Rachael Tappenden and Martin Takác},
  title = {{Stochastic Gradient Methods with Preconditioned Updates}},
  journal = {J. Optim. Theory Appl.},
  year = {2024},
  url = {https://openreview.net/forum?id=0Hr98RBaUX},
}
Figure