Massively Parallel Expectation Maximization For Approximate Posteriors
Thomas Heap, Sam Bowyer, Laurence Aitchison
TL;DR
This work tackles scalable Bayesian inference for large hierarchical models by introducing QEM, a gradient-free EM-like procedure that learns an approximate posterior from massively parallel posterior moments. The E-step uses massively parallel importance weighting (MPIW) to estimate true posterior moments, and the M-step updates simple exponential-family posteriors to match those moments, stabilized by an exponential moving average. QEM is shown to outperform gradient-based massively parallel VI and RWS in ELBO, predictive log-likelihood, and moment accuracy, while also being invariant to reparameterizations. The approach enables fast, robust inference on diverse datasets and suggests a path toward gradient-free, scalable probabilistic programming.
Abstract
Bayesian inference for hierarchical models can be very challenging. MCMC methods have difficulty scaling to large models with many observations and latent variables. While variational inference (VI) and reweighted wake-sleep (RWS) can be more scalable, they are gradient-based methods and so often require many iterations to converge. Our key insight was that modern massively parallel importance weighting methods (Bowyer et al., 2024) give fast and accurate posterior moment estimates, and we can use these moment estimates to rapidly learn an approximate posterior. Specifically, we propose using expectation maximization to fit the approximate posterior, which we call QEM. The expectation step involves computing the posterior moments using high-quality massively parallel estimates from Bowyer et al. (2024). The maximization step involves fitting the approximate posterior using these moments, which can be done straightforwardly for simple approximate posteriors such as Gaussian, Gamma, Beta, Dirichlet, Binomial, Multinomial, Categorical, etc. (or combinations thereof). We show that QEM is faster than state-of-the-art, massively parallel variants of RWS and VI, and is invariant to reparameterizations of the model that dramatically slow down gradient based methods.
