Asymptotically Optimal Exact Minibatch Metropolis-Hastings
Introduction
Scaling Bayesian inference to massive datasets is a fundamental challenge in machine learning. Metropolis-Hastings (MH), a cornerstone of Markov chain Monte Carlo (MCMC) methods, requires evaluating the entire dataset to compute acceptance probabilities at every step. For datasets with millions of entries, this becomes a computational bottleneck. Researchers have traditionally navigated a trade-off between "exact" methods, which are slow but correct, and "inexact" minibatch methods, which are fast but introduce bias. This paper introduces TunaMH, an exact minibatch MH algorithm that is theoretically proven to be asymptotically optimal, offering a tunable mechanism to balance efficiency and convergence without compromising accuracy.
The Perils of Inexact Minibatches
Inexact minibatch methods use stochastic approximations of the full log-likelihood. While computationally appealing, they introduce a persistent bias. The authors demonstrate that even a seemingly negligible approximation error at each step can accumulate, causing the stationary distribution of the Markov chain to diverge significantly from the true posterior.
As shown in Figure 3, methods like AustereMH and MHminibatch exhibit high Total Variation (TV) distances that increase with the number of states, leading to "disastrously wrong" results in high-stakes inference scenarios.
TunaMH: A Tunable, Exact Approach
TunaMH (named for its "tuning" capability and its use of a Poisson variable) addresses these issues by maintaining the exact target distribution while operating on minibatches. Its core innovations include:
- Poisson Batch Sizing: Instead of a fixed batch size, TunaMH samples a batch size $B$ from a Poisson distribution at each iteration.
- The $\chi$ Hyperparameter: This "dial" allows users to trade off batch size for convergence speed. A larger $\chi$ increases the average batch size but yields a convergence rate closer to standard MH.
- Statelessness and Local Bounds: Unlike stateful algorithms like FlyMC, TunaMH does not require memory of previous steps. It relies on "local" bounds of energy functions, a milder and more practical assumption than the global bounds required by earlier exact methods.
Theoretical Optimality
The paper establishes a fundamental theoretical floor for stateless exact minibatch MH algorithms. Theorem 3 proves a lower bound on the average batch size required to maintain a specific convergence speed. Crucially, the authors show that TunaMH achieves this lower bound, making it asymptotically optimal. This implies that, under the given assumptions, no more efficient stateless exact minibatch algorithm can exist.
Empirical Performance
TunaMH was evaluated against state-of-the-art baselines across various tasks, including robust linear regression and MNIST classification.
In robust linear regression experiments, TunaMH achieved the highest Effective Sample Size (ESS) per second. As illustrated in Figure 6, its average batch size was approximately 35 times smaller than that of FlyMC, the previous state-of-the-art exact method. On the MNIST dataset, TunaMH reached peak test accuracy faster than competitors, utilizing a batch size four times smaller than FlyMC while maintaining superior convergence rates.
Conclusion
TunaMH represents a significant advancement in scalable MCMC. By hitting the theoretical limit of efficiency for stateless exact minibatch methods, it provides a robust and mathematically grounded tool for large-scale Bayesian inference. Future work may explore whether stateful algorithms can bypass the established lower bounds, though TunaMH currently offers the best-in-class performance for stateless implementations.
Summary updated