Extended Stochastic Gradient MCMC for Large-Scale Bayesian Variable Selection

Qifan Song, Yan Sun, Mao Ye, Faming Liang

Abstract

Stochastic Gradient MCMC (SGMCMC) has emerged as a highly efficient framework for Bayesian inference on massive datasets. However, traditional SGMCMC algorithms are limited to fixed-dimension parameter spaces and differentiable posteriors, making them unsuitable for "dimension-jumping" problems such as variable selection or handling missing data. This paper introduces Extended Stochastic Gradient Langevin Dynamics (eSGLD), which utilizes a latent variable framework to smoothly handle varying dimensions. By decoupling parameters into continuous and discrete components and performing mini-batch updates, eSGLD achieves up to 50x speedups over traditional MCMC methods while maintaining superior accuracy and convergence properties.

Introduction

In Bayesian statistics, Markov chain Monte Carlo (MCMC) is the gold standard for estimating posterior distributions. However, traditional MCMC requires scanning the entire dataset at every iteration, which is computationally prohibitive for modern big data applications. Stochastic Gradient MCMC (SGMCMC) addresses this by using mini-batches to estimate gradients, but it traditionally fails when a model's dimensions change during training—a common occurrence in variable selection where the algorithm must decide which features to include.

Existing workarounds for these discrete or jumping problems often scale poorly or require complex mathematical bounds. This research proposes a novel "extended" SGMCMC algorithm that uses latent variables to bridge the gap between continuous gradient updates and discrete dimension changes.

Methodology

The core innovation of Extended Stochastic Gradient Langevin Dynamics (eSGLD) is a mathematical identity that allows the algorithm to compute the gradient of the log-posterior by integrating over latent variables. To address variable selection, the authors decouple the parameters: instead of jumping between different sizes of a sparse parameter vector $\beta$, they introduce a dense, fixed-dimension continuous variable $\theta$ and a discrete binary indicator $\gamma$ (the latent variable), where $\beta = \theta \odot \gamma$.

The algorithm proceeds in three main steps per iteration:

  1. Mini-batching: A small random subset of the data is selected.
  2. Latent Variable Simulation: A short Reversible Jump MCMC chain is run specifically on the mini-batch to update the binary mask $\gamma$, effectively selecting features locally.
  3. Gradient Update: The continuous parameter $\theta$ is updated using standard SGLD based on the mini-batch gradient, conditioned on the current state of $\gamma$.

This framework is also extended to handle missing data by treating missing values as latent variables that are imputed on-the-fly within the mini-batch updates.

Experimental Results

The authors evaluated eSGLD against several benchmarks, including Reversible Jump MCMC (RJMH), Shotgun Stochastic Search (SaM), and Bayesian Lasso (B-Lasso), across synthetic and real-world datasets.

Performance on Synthetic Data

In simulated linear regression tasks ($N=50,000$, $p=2,000$), eSGLD demonstrated remarkable efficiency and precision. As shown in the table below, eSGLD achieved perfect recovery of the true model (0% False Selection Rate and 0% Negative Selection Rate) in a fraction of the time required by traditional methods.

Table 1: Performance comparison on simulated linear regression data. eSGLD shows superior speed and accuracy compared to RJMH and SaM.

Specifically, eSGLD completed the task in just 3.3 minutes, representing a ~54x speedup over standard RJMH (180.1 minutes). While B-Lasso also achieved high accuracy, it was significantly slower (32.8 minutes) than the proposed eSGLD method.

Large-Scale Real-World Benchmarks

On the Pascal Challenge (epsilon) dataset ($N=500,000$, $p=2,000$), eSGLD outperformed the popular Lasso algorithm, finishing in 17.4 minutes compared to Lasso's 21.2 minutes, while achieving a lower prediction error (0.1422 vs 0.1644). Furthermore, on the MovieLens 10M dataset, eSGLD reached convergence approximately 7 times faster than a standard data-augmentation Gibbs sampler when handling missing data in mixed-effects models.

Discussion and Future Work

The eSGLD framework successfully sidesteps the "dimension jumping" roadblock that previously limited SGMCMC's utility in variable selection. By restricting discrete search steps to mini-batches, the algorithm provides an unbiased gradient estimator that is both fast and theoretically guaranteed to converge to the true posterior.

While the current implementation relies on standard SGLD, the framework is modular. Future work could involve integrating more advanced stochastic gradient variants, such as Stochastic Gradient Hamiltonian Monte Carlo (SGHMC) or preconditioned SGLD, to further accelerate convergence. Additionally, the authors see promising applications for this framework in sparse deep learning, hidden Markov models, and model-based clustering.

Summary updated

BibTeX
@misc{song2020extended,
  author = {Qifan Song and Yan Sun and Mao Ye and Faming Liang},
  title = {{Extended Stochastic Gradient MCMC for Large-Scale Bayesian Variable Selection}},
  year = {2020},
  eprint = {2002.02919},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.02919},
}
Figure