Abstract
We develop a parallel variational inference (VI) procedure for use in data-distributed settings, where each machine only has access to a subset of data and runs VI independently, without communicating with other machines. This type of "embarrassingly parallel" procedure has recently been developed for MCMC inference algorithms; however, in many cases it is not possible to directly extend this procedure to VI methods without requiring certain restrictive exponential family conditions on the form of the model. Furthermore, most existing (nonparallel) VI methods are restricted to use on conditionally conjugate models, which limits their applicability. To combat these issues, we make use of the recently proposed nonparametric VI to facilitate an embarrassingly parallel VI procedure that can be applied to a wider scope of models, including to nonconjugate models. We derive our embarrassingly parallel VI algorithm, analyze our method theoretically, and demonstrate our method empirically on a few nonconjugate models.
Introduction
As datasets grow too large for a single machine, or are inherently distributed across multiple sensors or institutions, there is a critical need for inference algorithms that can operate on isolated subsets of data. "Embarrassingly parallel" algorithms represent the holy grail of distributed computing: each machine processes its local data independently, and the results are combined exactly once at the end. This paradigm minimizes communication overhead, which is often the primary bottleneck in large-scale systems.
While embarrassingly parallel methods have been successfully developed for Markov Chain Monte Carlo (MCMC), applying this paradigm to Variational Inference (VI) has been notoriously difficult. Existing parallel VI methods typically require frequent, slow synchronization between machines or are strictly limited to "conditionally conjugate" exponential family models. When dealing with complex, nonconjugate models—such as nonlinear matrix factorization or deep Bayesian models—standard parallel VI methods break down because combining their local approximations mathematically results in intractable equations. This paper introduces an Embarrassingly Parallel VI (EPVI) algorithm that overcomes these hurdles for general, nonconjugate Bayesian models.
Methodology
The proposed EPVI framework leverages Nonparametric Variational Inference (NVI) to bridge the gap between parallel MCMC and VI. The core innovation lies in using a variational family that remains tractable under multiplication. The process follows four key steps:
- Distributed Subposteriors: The global dataset is partitioned across $M$ machines. Each machine computes a "subposterior" using its local data and an underweighted fraction of the global prior ($p( heta)^{1/M}$).
- Local NVI Approximation: Instead of standard mean-field VI, each machine uses NVI to approximate its subposterior as a uniformly weighted mixture of $K$ Gaussians. This choice is crucial because the product of multiple Gaussian mixtures is analytically another Gaussian mixture.
- The Product Mixture: The global posterior is approximated by taking the product of the $M$ local NVI approximations. This mathematically mirrors the "subposterior product" trick used in parallel MCMC.
- The Sampling Bypass (Algorithm 2): Multiplying $M$ mixtures, each with $K$ components, creates a massive global mixture with $K^M$ components. To avoid this exponential computational explosion, the authors introduce a Metropolis-within-Gibbs Markov chain that samples directly from the product mixture. This allows for the computation of expectations and posterior samples without ever explicitly calculating the weights of all $K^M$ components.
Experimental Evaluation
The authors evaluated EPVI on several nonconjugate models to demonstrate its accuracy and scalability:
- Toy 2D Dataset: Used to visually confirm that the combined subposteriors accurately reconstruct a Bayesian logistic regression posterior.
- SUSY Particles Dataset: A real-world physics dataset with 5,000,000 observations used for binary classification. EPVI achieved massive speedups—over an order of magnitude faster than single-machine NVI—while maintaining high classification accuracy (~78.65%) even when split across $M=200$ independent machines.
- Topographic Latent Source Analysis (TLSA): A synthetic dataset ($N=1,000$, $V=50$) used to test the method on a highly nonconjugate, nonlinear matrix factorization model, proving the method's versatility beyond simple regression.
Key Insights and Results
- Efficiency at Scale: The sampling bypass (
EPVI_sample) achieves the exact same test log-likelihoods as computing the full $K^M$ product mixture but does so in a fraction of the time, particularly as the number of machines ($M$) or components ($K$) increases. - Low Communication Overhead: The entire protocol requires transmitting only $MK(d+2)$ scalars (means, variances, and weights) across the network exactly once, making it highly efficient for distributed systems compared to iterative methods.
- Limitations: The method is currently restricted to continuous parameters and may struggle with posteriors that have highly correlated dimensions or multimodal models that suffer from "label switching." It is not appropriate for discrete models or continuous posteriors defined over a simplex (e.g., Dirichlet distributions).
Conclusion
EPVI provides a robust, communication-efficient framework for scaling variational inference to large, distributed datasets without sacrificing the ability to handle complex, nonconjugate models. By combining nonparametric approximations with a clever sampling strategy, it offers a practical alternative to both standard VI and parallel MCMC in modern data-distributed environments.
Summary updated