Stochastic Quasi-Newton Langevin Monte Carlo

Umut Şimşekli, Roland Badeau, Ali Taylan Cemgil, Gaël Richard · DOI

Abstract

Recently, Stochastic Gradient Markov Chain Monte Carlo (SG-MCMC) methods have been proposed for scaling up Monte Carlo computations to large data problems. Whilst these approaches have proven useful in many applications, vanilla SG-MCMC might suffer from poor mixing rates when random variables exhibit strong couplings under the target densities or big scale differences. In this study, we propose a novel SG-MCMC method that takes the local geometry into account by using ideas from Quasi-Newton optimization methods. These second order methods directly approximate the inverse Hessian by using a limited history of samples and their gradients. Our method uses dense approximations of the inverse Hessian while keeping the time and memory complexities linear with the dimension of the problem. We provide a formal theoretical analysis where we show that the proposed method is asymptotically unbiased and consistent with the posterior expectations. We illustrate the effectiveness of the approach on both synthetic and real datasets. Our experiments on two challenging applications show that our method achieves fast convergence rates similar to Riemannian approaches while at the same time having low computational requirements similar to diagonal preconditioning approaches.

Introduction

Stochastic Gradient Markov Chain Monte Carlo (SG-MCMC) methods, such as Stochastic Gradient Langevin Dynamics (SGLD), have become essential for Bayesian inference on large datasets. However, standard SGLD often suffers from slow mixing when the target distribution exhibits strong correlations or varying scales across dimensions. While Riemannian manifold methods address these geometric challenges, they typically incur a prohibitive $O(D^3)$ computational cost. This paper introduces Hessian Approximated MCMC (HAMCMC), a novel approach that leverages Quasi-Newton techniques to achieve Riemannian-level performance with linear computational complexity.

Methodology: The HAMCMC Algorithm

HAMCMC incorporates the local geometry of the posterior distribution by approximating the inverse Hessian matrix using the Limited-memory BFGS (L-BFGS) algorithm. Unlike diagonal preconditioning methods (e.g., PSGLD) that ignore off-diagonal correlations, HAMCMC maintains a dense approximation of the inverse Hessian.

A key technical innovation is the construction of the update rule such that the metric approximation is independent of the current sample. This ensures that the complex "correction term" ($Γ$), which usually requires expensive third-order derivatives in Riemannian Langevin dynamics, mathematically vanishes. Consequently, HAMCMC achieves a time and memory complexity of $O(MD)$, where $D$ is the dimension and $M$ is a small memory constant (typically 2–5), making it highly scalable for high-dimensional problems.

Figure 1: Comparison of sampling behavior on a highly correlated 2D Gaussian distribution. HAMCMC (purple) accurately captures the target geometry compared to SGLD and PSGLD, which struggle with the correlation.

Experimental Evaluation

The authors evaluated HAMCMC against SGLD, Preconditioned SGLD (PSGLD), and Riemannian SGLD (SGRDL) across synthetic and real-world tasks.

Synthetic Gaussian Benchmark

In experiments with highly correlated Gaussian distributions, HAMCMC demonstrated a superior ability to explore the target density. As shown in Figure 1, vanilla SGLD and diagonally preconditioned PSGLD fail to capture the elongated geometry of the correlated distribution. In contrast, HAMCMC's dense approximation allows it to navigate the manifold as effectively as the more expensive SGRDL.

Convergence and Scalability

The efficiency of the algorithm was further tested in 10D and 100D settings.

Figure 2: Convergence rates in terms of iterations and wall-clock time for D=10 and D=100. HAMCMC demonstrates superior efficiency and faster convergence as dimensionality increases.

Figure 2 illustrates that HAMCMC converges to the true posterior mean significantly faster than SGLD and PSGLD. Crucially, when considering wall-clock time, HAMCMC maintains its advantage even as the dimension $D$ increases, highlighting its computational efficiency compared to methods that require more complex geometric calculations.

Real-World Applications

The method was also applied to two challenging real-world scenarios:

  1. Speech Denoising: Using Alpha-Stable Matrix Factorization on real-life noise signals. HAMCMC achieved higher Signal-to-Distortion Ratios (SDR) than competitors, proving its effectiveness in complex, non-Gaussian models.
  2. Recommendation Systems: A Distributed Matrix Factorization task using the MovieLens 1M dataset. In this parallel computing environment, HAMCMC reached a lower Root Mean Squared Error (RMSE) faster than Distributed SGLD.

Conclusion

HAMCMC bridges the gap between simple first-order stochastic samplers and computationally intensive Riemannian methods. By utilizing Quasi-Newton approximations, it provides a scalable, asymptotically unbiased, and geometrically aware sampling framework. While the algorithm introduces new hyperparameters like memory size $M$ and trust-region parameter $λ$, it offers a robust solution for high-dimensional Bayesian inference on large datasets.

Summary updated

BibTeX
@inproceedings{simsekli2016stochastic,
  author = {Umut Şimşekli and Roland Badeau and Ali Taylan Cemgil and Gaël Richard},
  title = {{Stochastic Quasi-Newton Langevin Monte Carlo}},
  booktitle = {International Conference on Machine Learning},
  year = {2016},
  url = {https://openreview.net/forum?id=ryb48sZdbB},
}
Figure