Skip to Main content Skip to Navigation
Journal articles

Towards Verified Stochastic Variational Inference for Probabilistic Programs

Wonyeol Lee 1 Hangyeol Yu 1 Xavier Rival 2 Hongseok Yang 1
2 ANTIQUE - Analyse Statique par Interprétation Abstraite
DI-ENS - Département d'informatique de l'École normale supérieure, Inria de Paris
Abstract : 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, which led to the development of so called deep probabilistic programming languages, such as Pyro, Edward and ProbTorch. 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 a form of gradient ascent or descent. In this paper, we analyse one of the most fundamental and versatile variational inference algorithms, called score estimator or REINFORCE, 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 on the models. 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, such as integrability of functions defined in terms of programs' denotations, by conditions involving differentiation or boundedness, which are much easier to prove automatically (and manually). Following our general methodology, we have developed a static program analysis for the Pyro programming language that aims at discharging the assumption about what we call model-guide support match. Our analysis is applied to the eight representative model-guide pairs from the Pyro webpage, which include sophisticated neural network models such as AIR. It finds a bug in one of these cases, reveals a non-standard use of an inference engine in another, and shows that the assumptions are met in the remaining six cases.
Document type :
Journal articles
Complete list of metadatas

Cited literature [68 references]  Display  Hide  Download

https://hal.archives-ouvertes.fr/hal-02399922
Contributor : Xavier Rival <>
Submitted on : Monday, December 9, 2019 - 11:58:26 AM
Last modification on : Tuesday, August 4, 2020 - 3:48:34 AM
Document(s) archivé(s) le : Tuesday, March 10, 2020 - 5:05:29 PM

File

paper.pdf
Files produced by the author(s)

Identifiers

Collections

Citation

Wonyeol Lee, Hangyeol Yu, Xavier Rival, Hongseok Yang. Towards Verified Stochastic Variational Inference for Probabilistic Programs. Proceedings of the ACM on Programming Languages, ACM, In press, 16, ⟨10.1145/3371084⟩. ⟨hal-02399922⟩

Share

Metrics

Record views

68

Files downloads

108