Probabilistic Programming with Programmable Variational Inference (Video, PLDI 2024)
McCoy R. Becker, Alexander K. Lew, Xiaoyan Wang, Matin Ghavami, Mathieu Huot, Martin C. Rinard, and Vikash K. Mansinghka
(Massachusetts Institute of Technology, USA; Massachusetts Institute of Technology, USA; Massachusetts Institute of Technology, USA; Massachusetts Institute of Technology, USA; Massachusetts Institute of Technology, USA; Massachusetts Institute of Technology, USA; Massachusetts Institute of Technology, USA)
Abstract: Compared to the wide array of advanced Monte Carlo methods supported by modern probabilistic programming languages (PPLs), PPL support for variational inference (VI) is less developed: users are typically limited to a predefined selection of variational objectives and gradient estimators, which are implemented monolithically (and without formal correctness arguments) in PPL backends. In this paper, we propose a more modular approach to supporting variational inference in PPLs, based on compositional program transformation. In our approach, variational objectives are expressed as programs, that may employ first-class constructs for computing densities of and expected values under user-defined models and variational families. We then transform these programs systematically into unbiased gradient estimators for optimizing the objectives they define. Our design makes it possible to prove unbiasedness by reasoning modularly about many interacting concerns in PPL implementations of variational inference, including automatic differentiation, density accumulation, tracing, and the application of unbiased gradient estimation strategies. Additionally, relative to existing support for VI in PPLs, our design increases expressiveness along three axes: (1) it supports an open-ended set of user-defined variational objectives, rather than a fixed menu of options; (2) it supports a combinatorial space of gradient estimation strategies, many not automated by today’s PPLs; and (3) it supports a broader class of models and variational families, because it supports constructs for approximate marginalization and normalization (previously introduced for Monte Carlo inference). We implement our approach in an extension to the Gen probabilistic programming system (genjax.vi, implemented in JAX), and evaluate our automation on several deep generative modeling tasks, showing minimal performance overhead vs. hand-coded implementations and performance competitive with well-established open-source PPLs.
Article: [ Ссылка ]
Supplementary archive: [ Ссылка ] (Badges: Artifacts Available, Artifacts Evaluated — Reusable)
Supplementary web page: [ Ссылка ]
ORCID: [ Ссылка ], [ Ссылка ], [ Ссылка ], [ Ссылка ], [ Ссылка ], [ Ссылка ], [ Ссылка ]
Video Tags: probabilistic programming, automatic differentiation, variational inference, semantics, correctness, pldi24main-p861-p, doi:10.1145/3656463, doi:10.5281/zenodo.10935596, orcid:0009-0000-1930-8150, orcid:0000-0002-9262-4392, orcid:0000-0001-7058-4679, orcid:0000-0003-3052-7412, orcid:0000-0002-5294-9088, orcid:0000-0001-8095-8523, orcid:0000-0003-2507-0833, Artifacts Available, Artifacts Evaluated — Reusable
Presentation at the PLDI 2024 conference, June 24–28, 2024, [ Ссылка ]
Sponsored by ACM SIGPLAN,
Ещё видео!