Towards Verified Stochastic Variational Inference for Probabilistic Programs
Not on the map. Why?
Abstract (arXiv)
Probabilistic programming is the idea of writing models from statistics and machine learning using program notations and reasoning about these models using generic inference engines. Recently its combination with deep learning has been explored intensely, leading to the development of deep probabilistic programming languages such as Pyro. At the core of this development lie inference engines based on stochastic variational inference algorithms. When asked to find information about the posterior distribution of a model written in such a language, these algorithms convert this posterior-inference query into an optimisation problem and solve it approximately by gradient ascent. In this paper, we analyse one of the most fundamental and versatile variational inference algorithms, called score estimator, using tools from denotational semantics and program analysis. We formally express what this algorithm does on models denoted by programs, and expose implicit assumptions made by the algorithm. The violation of these assumptions may lead to an undefined optimisation objective or the loss of convergence guarantee of the optimisation process. We then describe rules for proving these assumptions, which can be automated by static program analyses. Some of our rules use nontrivial facts from continuous mathematics, and let us replace requirements about integrals in the assumptions, by conditions involving differentiation or boundedness, which are much easier to prove automatically. Following our general methodology, we have developed a static program analysis for Pyro that aims at discharging the assumption about what we call model-guide support match. Applied to the eight representative model-guide pairs from the Pyro webpage, our analysis finds a bug in one of these cases, reveals a non-standard use of an inference engine in another, and shows the assumptions are met in the remaining cases.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). First posted on arXiv 20 Jul 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 2; 2023: 2; 2024: 1; 2025: 0; 2026: 1.
6 papers.
- 2022Smoothness Analysis for Probabilistic Programs with Application to Optimised Variational Inferencecited by 6
- 2024Probabilistic Programming with Programmable Variational Inferencecited by 4
- 2023Fast and Correct Gradient-Based Optimisation for Probabilistic Programming via Smoothingcited by 2
- 2023A Heavy-Tailed Algebra for Probabilistic Programmingcited by 2
- 2026Likelihood Hacking in Probabilistic Program Synthesiscited by 2
- 2022Differentiable Quantum Programming with Unbounded Loopscited by 0
- 2026Likelihood Hacking in Probabilistic Program Synthesis25 Mar 2026
- 2024Probabilistic Programming with Programmable Variational Inference22 Jun 2024
- 2023A Heavy-Tailed Algebra for Probabilistic Programming15 Jun 2023
- 2023Fast and Correct Gradient-Based Optimisation for Probabilistic Programming via Smoothing9 Jan 2023
- 2022Differentiable Quantum Programming with Unbounded Loops8 Nov 2022
- 2022Smoothness Analysis for Probabilistic Programs with Application to Optimised Variational Inference22 Aug 2022