Sound probabilistic inference via guide types
Di Wang, Jan Hoffmann, Thomas W. Reps
Abstract
Probabilistic programming languages aim to describe and automate Bayesian modeling and inference. Modern languages support programmable inference, which allows users to customize inference algorithms by incorporating guide programs to improve inference performance. For Bayesian inference to be sound, guide programs must be compatible with model programs. One pervasive but challenging condition for model-guide compatibility is absolute continuity, which requires that the model and guide programs define probability distributions with the same support.
This paper presents a new probabilistic programming language that guarantees absolute continuity, and features general programming constructs, such as branching and recursion. Model and guide programs are implemented as coroutines that communicate with each other to synchronize the set of random variables they sample during their execution. Novel guide types describe and enforce communication protocols between coroutines. If the model and guide are well-typed using the same protocol, then they are guaranteed to enjoy absolute continuity. An efficient algorithm infers guide types from code so that users do not have to specify the types. The new programming language is evaluated with an implementation that includes the type-inference algorithm and a prototype compiler that targets Pyro. Experiments show that our language is capable of expressing a variety of probabilistic models with nontrivial control flow and recursion, and that the coroutine-based computation does not introduce significant overhead in actual Bayesian inference.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b38c5ea9-d911-4526-a4de-64c9f533b607Cited by top-tier papers8
- Probabilistic Programming with Stochastic ProbabilitiesAlexander K. Lew, Matin Ghavamizadeh, Martin C. Rinard, Vikash K. MansinghkaPLDI 2023 · 9 citations
- Probabilistic Programming with Programmable Variational InferenceMcCoy R. Becker, Alexander K. Lew, Xiaoyan Wang, Matin Ghavami et al.PLDI 2024 · 8 citations
- Smoothness Analysis for Probabilistic Programs with Application to Optimised Variational InferenceWonyeol Lee, Xavier Rival, Hongseok YangPOPL 2023 · 8 citations
- Type-Preserving, Dependence-Aware Guide Generation for Sound, Effective Amortized Probabilistic InferenceJianlin Li, Leni Aniva, Pengyuan Shi, Yizhou ZhangPOPL 2023 · 7 citations
- Compiling Probabilistic Programs for Variable Elimination with Information FlowJianlin Li, Eric Wang, Yizhou ZhangPLDI 2024 · 6 citations
Builds on3
- Trace types and denotational semantics for sound programmable inference in probabilistic languagesAlexander K. Lew, Marco F. Cusumano-Towner, Benjamin Sherman, Michael Carbin et al.POPL 2020 · 30 citations
- Towards verified stochastic variational inference for probabilistic programsWonyeol Lee, Hangyeol Yu, Xavier Rival, Hongseok YangPOPL 2020 · 22 citations
- Label-dependent session typesPeter Thiemann, Vasco T. VasconcelosPOPL 2020 · 14 citations
Related papers
- Programmable MCMC with Soundly Composed Guide ProgramsLong Pham, Di Wang, Feras A. Saad, Jan HoffmannOOPSLA 2024 · 1 citation
- Deterministic stream-sampling for probabilistic programming: semantics and verificationFredrik Dahlqvist, Alexandra Silva, William SmithLICS 2023 · 4 citations
- Exact Recursive Probabilistic ProgrammingDavid Chiang, Colin McDonald, Chung-chieh ShanOOPSLA 2023 · 12 citations
- Compiling Stan to generative probabilistic languages and extension to deep probabilistic programmingGuillaume Baudart, Javier Burroni, Martin Hirzel, Louis Mandel et al.PLDI 2021 · 13 citations
- Higher Order Bayesian Networks, ExactlyClaudia Faggian, Daniele Pautasso, Gabriele VanoniPOPL 2024 · 4 citations
