Probabilistic programming languages (PPLs) provide language support for expressing flexible probabilistic models and solving Bayesian inference problems. PPLs with \textit{programmable inference} make it possible for users to obtain improved results by customizing inference engines using \textit{guide} programs that are tailored to a corresponding \textit{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 \textit{type-inference algorithm} for probabilistic programs with flexible constructs such as general recursion and branching. We also contribute a \textit{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.
Fri 25 OctDisplayed time zone: Pacific Time (US & Canada) change
11:00 - 12:20 | Probabilistic Programming and Analysis 2OOPSLA 2024 at Pasadena Chair(s): Xin Zhang Peking University | ||
11:00 20mTalk | Programmable MCMC with Soundly Composed Guide Programs OOPSLA 2024 Long Pham Carnegie Mellon University, Di Wang Peking University, Feras Saad Carnegie Mellon University, Jan Hoffmann Carnegie Mellon University DOI | ||
11:20 20mTalk | Quantitative Bounds on Resource Usage of Probabilistic Programs OOPSLA 2024 Krishnendu Chatterjee IST Austria, Amir Kafshdar Goharshady Hong Kong University of Science and Technology, Tobias Meggendorfer Lancaster University, UK (Leipzig Campus), Đorđe Žikelić Singapore Management University, Singapore DOI | ||
11:40 20mTalk | Sensitivity by ParametricityOOPSLA 2024 Distinguished Artifact Award OOPSLA 2024 Elisabet Lobo-Vesga DPella AB, Carlos Tomé Cortiñas Chalmers University of Technology, Alejandro Russo Chalmers University of Technology, Sweden / University of Gothenburg, Sweden / DPella AB, Sweden, Marco Gaboardi Boston University DOI | ||
12:00 20mTalk | Tachis: Higher-Order Separation Logic with Credits for Expected Costs OOPSLA 2024 Philipp G. Haselwarter Aarhus University, Kwing Hei Li Aarhus University, Markus de Medeiros New York University, Simon Oddershede Gregersen New York University, Alejandro Aguirre Aarhus University, Joseph Tassarotti New York University, Lars Birkedal Aarhus University DOI Pre-print |