Presented at NeurIPS 2022, Support Decomposition Variational Inference (SDVI) introduces a novel framework for inference in probabilistic programs where the model structure—the number and identity of random variables—is itself stochastic.
TL;DR
SDVI addresses the limitations of traditional Variational Inference (VI) in "universal" probabilistic programming systems. By decomposing complex programs into a mixture of simpler, "straight-line" sub-programs, SDVI provides a more accurate and stable alternative to global guide approaches.
The Problem: Stochastic Support
In universal Probabilistic Programming Systems (PPSs) like Pyro or Gen, programs often feature stochastic control flow. This means that the set of random variables can change based on the values of previously sampled variables. This phenomenon is known as stochastic support.
Standard VI typically employs a single "guide" (approximate distribution) to mirror the program's structure. However, when a program branches, this global guide must simultaneously satisfy the requirements of all possible future paths. This often leads to optimization "tug-of-war" scenarios and discontinuities, causing traditional methods like Black-Box Variational Inference (BBVI) to fail in complex models.
Methods: Support Decomposition
The authors propose SDVI to move away from the "one-size-fits-all" guide. The method follows a structured pipeline:
- Decomposition into Straight-Line Programs (SLPs): Any probabilistic program is treated as a mixture of SLPs—execution paths with fixed variable sets and deterministic control flow.
- Local Guide Construction: SDVI automatically builds a separate, simpler "local guide" for each SLP. Since these sub-guides have static support, they can leverage standard, well-optimized VI techniques like normalizing flows.
- Mixture Approximation: The final variational approximation is a mixture of these local guides. Crucially, the authors derive that the optimal mixture weights are the softmax of the local Evidence Lower Bounds (ELBOs).
- Resource Allocation via Successive Halving: To manage programs with many paths, SDVI uses a bandit-style "Successive Halving" algorithm to focus computational resources on the most promising paths (those with the most posterior mass).
- Surrogate Objectives: To ensure smooth gradients across branch boundaries, the authors introduce surrogate target densities.
Key Results
The effectiveness of SDVI was evaluated across several benchmarks, including a branching normal model, an Infinite Gaussian Mixture Model (GMM), and Gaussian Process (GP) kernel inference.
- Superior Accuracy and Stability: In the GMM task, SDVI achieved a Log Posterior Predictive Density (LPPD) of 32.84, while BBVI collapsed to -2217.07. As shown in the performance plots, SDVI consistently achieves lower error and higher ELBOs compared to standard automated VI tools like Pyro’s
AutoGuide. - Effective Path Discovery: In GP kernel inference on real-world airline passenger data, SDVI successfully identified periodic structures that baselines struggled to find in high-dimensional search spaces.
Key Insights and Limitations
SDVI shifts the focus from "variable-wise" inference to "path-wise" inference, recognizing that a variable's role can vary drastically depending on the execution branch. By breaking the problem down, it allows researchers to use powerful "off-the-shelf" VI tools that were previously restricted to static models.
However, challenges remain. If a program contains an explosion of equally likely paths, the overhead of maintaining separate guides may become prohibitive. Additionally, because SDVI currently discovers paths by sampling from the prior, it might miss important posterior regions if they have very low prior probability. Future work may involve integrating MCMC or advanced program analysis to improve path discovery and extending the framework to model parameter learning.
Summary updated