Abstract
Stochastic gradient MCMC (SGMCMC) offers a scalable alternative to traditional MCMC by constructing an unbiased estimate of the gradient of the log-posterior with a small, uniformly-weighted subsample. However, uniform sampling often leads to high variance in gradient estimates, hindering convergence. This paper introduces preferential subsampling techniques that prioritize informative data points, significantly reducing gradient noise and improving computational efficiency without compromising accuracy.
Introduction
Bayesian inference often relies on Markov Chain Monte Carlo (MCMC) to sample from complex posterior distributions. However, traditional MCMC methods are computationally prohibitive for large datasets as they require a full scan of the data at every iteration. Stochastic Gradient Langevin Dynamics (SGLD) addresses this by using small, random mini-batches to estimate the gradient. While efficient, the uniform sampling used in standard SGLD introduces significant noise, leading to poor convergence. Existing solutions like control variates help but do not address the inherent inefficiency of treating all data points as equally informative.
Methodology
The authors propose three primary enhancements to the SGLD framework to mitigate gradient variance:
- Preferential Subsampling (SGLD-PS): Instead of uniform sampling, data points are selected according to a non-uniform probability distribution. The optimal sampling probability for a data point is proportional to its gradient magnitude. To maintain computational efficiency, these probabilities are approximated using gradients at the posterior mode, calculated once during a preprocessing step.
- SGLD-CV-PS: This method integrates preferential subsampling with Control Variates (CV). By using a fixed "anchor" point (the posterior mode) to steady the gradient estimate, and a novel weighting scheme derived from the Hessian matrix, the algorithm further reduces estimation noise.
- Adaptive Subsampling (ASGLD-CV-PS): This dynamic approach automatically adjusts the subsample size at each iteration. The batch size increases in regions where the gradient is difficult to estimate and decreases in "well-behaved" regions near the mode, optimizing the computational budget.
Experimental Setup
The proposed methods were evaluated on several benchmarks:
- Synthetic Models: Bivariate Gaussian distributions and logistic regression on both balanced and imbalanced datasets.
- Covertype Dataset: A large-scale dataset (581,012 instances) for forest cover type prediction.
- CASP Dataset: A protein structure dataset (45,730 instances) used for linear regression tasks.
Key Results
The experimental results highlight the efficiency of the preferential sampling approach:
- Variance Reduction: The SGLD-PS and SGLD-CV-PS schemes consistently demonstrated lower pseudo-variance compared to uniform sampling. This effect is particularly pronounced in imbalanced datasets where a small subset of data points carries most of the gradient information.
- Sample Quality: Accuracy was measured using Kernel Stein Discrepancy (KSD). The SGLD-CV-PS method outperformed standard benchmarks, achieving higher fidelity to the target posterior.
- Data Efficiency: The adaptive ASGLD-CV-PS algorithm maintained high accuracy while processing significantly less data. In logistic regression tests, it achieved comparable KSD to fixed-batch methods while requiring only a fraction of the total data passes.
Discussion and Limitations
The study demonstrates that focusing computational resources on "informative" data points significantly improves SGMCMC performance. Using the posterior mode as an anchor provides a cheap yet effective proxy for importance sampling.
However, some limitations remain. The preprocessing overhead for the Hessian-based weights in CV-PS scales as $O(Nd^3)$, making it less suitable for very high-dimensional models (typically $d > 60$). Additionally, the adaptive batch sizing requires knowledge of Lipschitz constants, which may be difficult to determine for complex architectures like deep neural networks. Future work may involve using Multi-Armed Bandits to learn optimal sampling weights online, potentially eliminating the need for expensive preprocessing.
Summary updated