TL;DR
This paper introduces a novel method for estimating posterior moments, marginals, and samples in Bayesian inference, overcoming the exponential scaling issues of traditional importance sampling. By leveraging automatic differentiation and a "source term trick" from physics, the authors provide a simpler, more efficient way to compute these quantities without manually implementing complex backward traversals.
What Problem Does This Paper Address?
Bayesian inference often involves estimating properties of a posterior distribution over latent variables. Importance sampling is a common technique, but it suffers from a critical scalability problem: as the number of latent variables increases, the number of samples required for accurate estimation grows exponentially. This makes it intractable for complex models. While "massively parallel importance sampling" (MPIS) addresses this by considering all combinations of samples across latent variables, implementing the necessary computations (like posterior expectations) requires intricate, hand-coded backward traversals of the generative model, which are difficult to generalize and optimize.
Methods
The core contribution is a method that avoids manual backward traversals. The authors achieve this by:
- Massively Parallel Importance Sampling (MPIS): Instead of drawing $K$ samples for $n$ latent variables and using them directly, MPIS draws $K$ samples for each latent variable, leading to $K^n$ total combinations. This is combined with exploiting conditional independencies in the model's graphical structure.
- Source Term Trick: This technique, borrowed from physics, allows for computing expectations by differentiating a modified version of a normalizing constant. The authors apply this to a slightly modified marginal likelihood estimator.
- Automatic Differentiation (Autodiff): By formulating the computation as a differentiable function, autodiff automatically handles the backward pass (gradient computation), effectively replacing the need for hand-written backward traversals. This allows for efficient computation of posterior expectations, marginals, and samples.
Datasets
The authors evaluated their method on four real-world datasets:
- NYC Bus Breakdown: Data on bus journey delays.
- Chimpanzee Prosociality: Data from experiments on chimpanzee behavior.
- MovieLens100K: User ratings for movies.
- North American Breeding Bird Survey: Bird sighting data.
They used hierarchical probabilistic graphical models for these datasets and subsampled them for experiments, except for the Chimpanzee Prosociality dataset.
Key Insights and Ideas
- Autodiff as a Generalization Tool: The paper highlights how autodiff can abstract away the complexity of backward traversals in graphical models, making advanced inference techniques more accessible.
- "One-Shot" Efficiency: MPIS, while computationally intensive in terms of combinations, can be very fast for a fixed number of samples ($K^n$) compared to iterative methods that require many updates.
- Scalability Breakthrough: The exponential scaling issue of importance sampling is a major bottleneck. This work offers a principled way to overcome it by leveraging parallelization and autodiff.
- Unified Computation: The source term trick, applied via autodiff, provides a single framework for computing diverse quantities (expectations, marginals, samples), reducing implementation burden.
Key Results
- Improved ELBO and Predictive Log-Likelihood: MPIS consistently outperformed global importance sampling (and iterative methods like VI, IWAE, RWS) in terms of both the Evidence Lower Bound (ELBO) and predictive log-likelihood across all tested datasets, especially for larger values of $K$.
- Speed-Accuracy Tradeoff: While MPIS can be computationally demanding, it offers significant improvements in accuracy for a given time budget compared to iterative methods, filling an important niche in the speed-accuracy spectrum.
- Demonstrated Efficacy: The method was successfully applied to complex hierarchical models on real-world data, showcasing its practical applicability.
Limitations and Future Work
- Memory Consumption: The paper acknowledges that a naive implementation of MPIS can be memory-intensive, though they suggest optimizations using libraries like KeOps could mitigate this.
- Iterative Inference: The current work focuses on a "one-shot" approach. The authors express interest in developing iterative inference algorithms that incorporate MPIS for learning better proposals, similar to VI and RWS.
- Probabilistic Programming: They also aim to extend these contributions to developing a massively parallel probabilistic programming language.
Summary updated