Abstract
Recent work has suggested using Monte Carlo methods based on piecewise deterministic Markov processes (PDMPs) to sample from target distributions of interest. PDMPs are non-reversible continuous-time processes endowed with momentum, and hence can mix better than standard reversible MCMC samplers. Furthermore, they can incorporate exact sub-sampling schemes which only require access to a single (randomly selected) data point at each iteration, yet without introducing bias to the algorithm's stationary distribution. However, the range of models for which PDMPs can be used, particularly with sub-sampling, is limited. We propose approximate simulation of PDMPs with sub-sampling for scalable sampling from posterior distributions. The approximation takes the form of an Euler approximation to the true PDMP dynamics, and involves using an estimate of the gradient of the log-posterior based on a data sub-sample. We thus call this class of algorithms stochastic-gradient PDMPs. Importantly, the trajectories of stochastic-gradient PDMPs are continuous and can leverage recent ideas for sampling from measures with continuous and atomic components. We show these methods are easy to implement, present results on their approximation error and demonstrate numerically that this class of algorithms has similar efficiency to, but is more robust than, stochastic gradient Langevin dynamics.
Introduction
Bayesian inference on massive datasets presents a significant computational challenge. Traditional Markov chain Monte Carlo (MCMC) methods require evaluating the log-posterior gradient over the entire dataset at every iteration—an $O(N)$ operation that becomes prohibitive as $N$ grows into the millions. While Stochastic Gradient MCMC (SG-MCMC) methods like Stochastic Gradient Langevin Dynamics (SGLD) address this by using mini-batches, they are notoriously sensitive to step-size parameters and can diverge or "explode" in high-dimensional settings.
This paper introduces Stochastic Gradient Piecewise Deterministic Monte Carlo (SG-PDMP) samplers, a new class of scalable algorithms that bridge the gap between high-mixing PDMP dynamics and the computational efficiency of stochastic gradients.
Background: The Promise of PDMPs
Piecewise Deterministic Markov Processes (PDMPs), such as the Zig-Zag and Bouncy Particle Samplers, offer a promising alternative to standard MCMC. These are non-reversible, continuous-time processes that incorporate momentum, allowing them to explore the parameter space without the "backtracking" typical of reversible samplers.
While PDMPs can theoretically use exact subsampling, doing so requires finding global bounds on the gradient. This requirement is often mathematically intractable or computationally expensive for complex models. SG-PDMPs circumvent this by using an approximate simulation approach.
The SG-PDMP Framework
Instead of exact simulation, SG-PDMPs employ an Euler-like discretization. The algorithm divides time into small intervals of length $\epsilon$. In each interval, the process follows the deterministic path of the PDMP (e.g., a particle moving at constant velocity) and uses a local stochastic gradient—estimated from a single randomly selected data point—to decide when the particle should "bounce" or "flip."
Two primary variants are developed:
- SG-ZZ (Stochastic Gradient Zig-Zag): Where individual components of the velocity vector flip sign based on the stochastic gradient.
- SG-BPS (Stochastic Gradient Bouncy Particle Sampler): Where the entire velocity vector reflects off a "contour" of the estimated posterior.
Additionally, the authors introduce a "Sticky" SG-SZZ variant. By leveraging the continuous trajectories of PDMPs, this sampler can handle "spike-and-slab" priors naturally, allowing parameters to "stick" to zero for high-dimensional variable selection.
Experimental Evaluation and Results
The proposed methods were evaluated on synthetic and real-world datasets (UCI benchmarks) using Bayesian Logistic Regression and two-layer Bayesian Neural Networks (BNNs).
Superior Stability and Efficiency
A key finding is the robustness of SG-PDMPs compared to SGLD. Because PDMPs have fixed or bounded velocities, the simulation does not diverge even if the gradient estimate is noisy or the step size is large. In high-dimensional tests ($d=100$), SG-ZZ and SG-BPS remained stable and accurate where SGLD returned NaN values.
As illustrated in Figure 1, SG-BPS demonstrates exceptional efficiency. While previous stochastic PDMP variants (like SBPS) required large mini-batches to be effective, SG-PDMPs work remarkably well with a mini-batch size of just one. The autocorrelation for SG-BPS drops to zero much faster than for other variants, leading to massive gains in computational efficiency for a fixed CPU budget.
Variable Selection
The "Sticky" SG-SZZ sampler successfully identified sparse parameters in over-parameterized logistic regression. By allowing the sampler to spend time exactly at zero, it effectively performs sparse Bayesian modeling, outperforming standard SGLD in mean squared error relative to true parameters.
Conclusion
SG-PDMPs provide a robust and scalable framework for Bayesian inference. While the stochastic gradient approximation introduces an $O(\epsilon)$ bias similar to SGLD, the gains in stability and mixing efficiency are substantial. Future research will focus on variance reduction techniques, such as control variates, and adaptive pre-conditioning to further refine these samplers. The continuous nature of these trajectories also suggests potential applications in turning these samplers into stochastic optimization tools.
Summary updated