Asynchronous parallel stochastic Quasi-Newton methods

Qianqian Tong, Guannan Liang, Xingyu Cai, Chunjiang Zhu, Jinbo Bi · DOI

TL;DR

Researchers have developed AsySQN, the first asynchronous parallel stochastic L-BFGS algorithm that offers both a theoretical convergence guarantee and significant practical speedups. By combining variance reduction with a lock-free shared-memory architecture, the method achieves a linear convergence rate and handles "ill-conditioned" optimization problems far more effectively than standard first-order methods like SGD.

What Problem Does This Paper Address?

In machine learning, we usually use first-order methods like Stochastic Gradient Descent (SGD) because they are simple and scale well to massive datasets. However, SGD has a major weakness: it struggles with ill-conditioned problems. Imagine a narrow, steep-sided valley; SGD tends to "zigzag" back and forth across the walls rather than sliding down the floor toward the minimum.

Second-order methods (like L-BFGS) solve this by using "curvature" information to straighten the path. While powerful, these methods are notoriously difficult to parallelize in a stochastic setting. Previous attempts either only parallelized small parts of the math or failed to provide a guarantee that the algorithm would actually converge when multiple processors updated the model simultaneously without synchronization.

Methods

The authors introduce AsySQN (Asynchronous Parallel Stochastic Quasi-Newton). The architecture relies on several key components:

  1. Asynchronous Parallelism: Multiple threads read the current model state from shared memory, calculate updates independently, and write them back without waiting for one another. This eliminates the "idle time" seen in synchronous systems.
  2. Variance Reduction (VR): Stochastic methods are "noisy." AsySQN uses a variance reduction technique (similar to SVRG) to periodically calculate a full gradient, which helps "anchor" the noisy stochastic updates and allows the algorithm to converge at a linear rate.
  3. L-BFGS Two-Loop Recursion: Instead of storing a massive Hessian matrix (which represents curvature), the algorithm uses a "limited memory" approach, storing only a few recent model changes to approximate the curvature on the fly.
  4. Handling Delays: The core theoretical contribution is proving that the algorithm still works even when a thread's update is based on an "old" version of the model (a common occurrence in asynchronous systems).

Datasets

The authors evaluated AsySQN using both controlled simulations and standard machine learning benchmarks:

  • Synthetic Datasets: Least squares problems with varying degrees of "ill-conditioning" (from well-behaved to extreme).
  • Real-world Datasets:
    • Real_sim: 72,309 data points, 20,958 features.
  • MNIST: The classic handwritten digit dataset (60,000 images).
  • RCV1: A large-scale text dataset (677,399 data points, 47,236 features).

Key Insights and Ideas

  • Stability under Asynchrony: One of the most interesting findings is that second-order methods are naturally more stable than first-order methods in an asynchronous environment. While asynchronous SGD (like Hogwild!) can "jump" wildly around the optimum, AsySQN’s use of curvature information acts as a stabilizer, leading to smoother convergence.
  • Affine Invariance: Unlike SGD, which is highly sensitive to how features are scaled, AsySQN maintains "affine invariance." This means it performs consistently well even if the data hasn't been perfectly normalized.
  • The "Sweet Spot" for Threads: The paper notes that speedup isn't infinite. Due to communication overhead and "lock" contention in memory, they found that using roughly 6 cores provided the best balance of speed and efficiency for their implementation.

Key Results

  • Linear Convergence: The authors mathematically proved and empirically demonstrated that AsySQN maintains a linear convergence rate, matching the best non-parallel stochastic quasi-Newton methods.
  • Significant Speedup: In tests on the RCV1 dataset, AsySQN achieved nearly a 3x speedup using 8 cores compared to its sequential counterpart.
  • Superiority in Tough Terrain: On "extreme ill-conditioned" synthetic problems, AsySQN reached high-precision solutions in a fraction of the time it took for first-order methods (AsySVRG and AsySGD) to even begin to converge.

Limitations and Future Work

  • Strong Convexity: The current theoretical proof requires the objective function to be "strongly convex." Many modern deep learning problems are non-convex, so extending these guarantees to more complex neural network landscapes is a primary goal for future research.
  • Shared Memory Limits: The current implementation is designed for a single machine with multiple cores (shared memory). Scaling this to a distributed cluster (many machines communicating over a network) introduces much higher "delays," which would require further refinement of the convergence proofs.
  • Subsample Size: The performance is somewhat sensitive to the size of the "Hessian subsample" (the data used to calculate curvature). The authors suggest a rule of thumb (10x the gradient batch size), but more automated tuning could be beneficial.

Summary updated

BibTeX
@article{tong2021asynchronous,
  author = {Qianqian Tong and Guannan Liang and Xingyu Cai and Chunjiang Zhu and Jinbo Bi},
  title = {{Asynchronous parallel stochastic Quasi-Newton methods}},
  journal = {Parallel Comput.},
  year = {2021},
  doi = {10.1016/j.parco.2020.102721},
}
Figure