Programmable MCMC with Soundly Composed Guide Programs
Long Pham, Di Wang, Feras A. Saad, Jan Hoffmann
Abstract
Probabilistic programming languages (PPLs) provide language support for expressing flexible probabilistic models and solving Bayesian inference problems. PPLs with programmable inference make it possible for users to obtain improved results by customizing inference engines using guide programs that are tailored to a corresponding model program. However, errors in guide programs can compromise the statistical soundness of the inference. This article introduces a novel coroutine-based framework for verifying the correctness of user-written guide programs for a broad class of Markov chain Monte Carlo (MCMC) inference algorithms. Our approach rests on a novel type system for describing communication protocols between a model program and a sequence of guides that each update only a subset of random variables. We prove that, by translating guide types to context-free processes with finite norms, it is possible to check structural type equality between models and guides in polynomial time. This connection gives rise to an efficient type-inference algorithm for probabilistic programs with flexible constructs such as general recursion and branching. We also contribute a coverage-checking algorithm that verifies the support of sequentially composed guide programs agrees with that of the model program, which is a key soundness condition for MCMC inference with multiple guides. Evaluations on diverse benchmarks show that our type-inference and coverage-checking algorithms efficiently infer types and detect sound and unsound guides for programs that existing static analyses cannot handle.
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 08464e5a-cf53-43ea-81c1-339ee8f77c50Builds on6
- 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
- Sound probabilistic inference via guide typesDi Wang, Jan Hoffmann, Thomas W. RepsPLDI 2021 · 9 citations
- Type-Preserving, Dependence-Aware Guide Generation for Sound, Effective Amortized Probabilistic InferenceJianlin Li, Leni Aniva, Pengyuan Shi, Yizhou ZhangPOPL 2023 · 7 citations
- Verified Density Compilation for a Probabilistic Programming LanguageJoseph Tassarotti, Jean-Baptiste TristanPLDI 2023 · 6 citations
Related papers
- Nonparametric Involutive Markov Chain Monte CarloCarol Mak, Fabian Zaiser, Luke OngICML 2022 · 2 citations
- Nonparametric Hamiltonian Monte CarloCarol Mak, Fabian Zaiser, Luke OngICML 2021 · 7 citations
- Deterministic stream-sampling for probabilistic programming: semantics and verificationFredrik Dahlqvist, Alexandra Silva, William SmithLICS 2023 · 4 citations
- Probabilistic Programming with Stochastic ProbabilitiesAlexander K. Lew, Matin Ghavamizadeh, Martin C. Rinard, Vikash K. MansinghkaPLDI 2023 · 9 citations
- Language-Agnostic Static Analysis of Probabilistic ProgramsMarkus Böck, Michael Schröder, Jürgen CitoASE 2024 · 4 citations
