Abstract
Stochastic Gradient Langevin Dynamics (SGLD) is a cornerstone of Bayesian inference for large-scale datasets. However, this study reveals a critical limitation: in the common practical regime of constant step sizes, SGLD fails to capture the true posterior as the dataset size $N$ increases, instead behaving like Stochastic Gradient Descent (SGD). We analyze a "Fixed Point" variant (SGLDFP) that utilizes control variates to mitigate gradient variance, restoring the accuracy of full-scale Markov Chain Monte Carlo (MCMC) at a significantly lower computational cost.
Introduction
Traditional MCMC methods, such as Metropolis-Hastings, are computationally prohibitive for "big data" because they require a full pass over the dataset for every update. SGLD addresses this by using minibatches to estimate gradients. While theoretically sound with a decaying step size, practitioners often use a constant step size for faster convergence. This paper investigates whether SGLD maintains its Bayesian properties in this constant-step-size regime as $N \to \infty$.
The "SGD Trap" and Variance Scaling
The core finding is that as $N$ grows, the variance of the stochastic gradient in standard SGLD scales with $N^2$. This high variance eventually overwhelms the injected Langevin noise, causing the algorithm to settle into an "invariant measure" that remains at a fixed distance from the true posterior mean. Effectively, SGLD becomes indistinguishable from noisy SGD, failing to benefit from the increased precision that a larger dataset should provide.
Methodology: Restoring Accuracy with SGLDFP
To overcome the limitations of SGLD, the authors evaluate four primary algorithms:
- Langevin Monte Carlo (LMC): The full-batch baseline.
- SGLD: The standard minibatch version.
- SGD: Pure optimization without Langevin noise.
- SGLDFP (Fixed Point): A modified SGLD using control variates.
SGLDFP centers the stochastic gradient around a reference point, such as the distribution's mode. This "Fixed Point" approach cancels out the high variance associated with data subsampling, reducing the gradient variance scaling from $O(N^2)$ to $O(N)$.
Empirical Results
Theoretical predictions were validated using simulated Bayesian logistic regression and the real-world Covertype dataset. As shown in Figure 1, the error (measured as the distance to the true posterior mean) for LMC and SGLDFP decreases linearly on a log-log scale as $N$ increases. In contrast, the error for SGLD and SGD increases and then plateaus, confirming the asymptotic bias predicted by the theory.
The Wasserstein distance between SGLDFP and the ideal LMC is shown to be $O(1/\sqrt{N})$, whereas the distance for standard SGLD remains $\Omega(1)$. This demonstrates that SGLDFP achieves sublinear computational complexity per iteration while maintaining statistical consistency.
Conclusion
While SGLD is a powerful tool, its performance in the large-$N$ regime with constant step sizes is fundamentally limited by gradient variance. SGLDFP offers a robust alternative by using control variates to stabilize the gradient. Although SGLDFP requires an initial preprocessing step to find a reference point, it provides a scalable path for accurate Bayesian inference on massive datasets. Future work may extend these findings to non-convex landscapes typical of deep neural networks.
Summary updated