Guaranteed Bounds on Posterior Distributions of Discrete Probabilistic Programs with Loops
Fabian Zaiser, Andrzej S. Murawski, C.-H. Luke Ong
Abstract
We study the problem of bounding the posterior distribution of discrete probabilistic programs with unbounded support, loops, and conditioning. Loops pose the main difficulty in this setting: even if exact Bayesian inference is possible, the state of the art requires user-provided loop invariant templates. By contrast, we aim to find guaranteed bounds , which sandwich the true distribution. They are fully automated, applicable to more programs and provide more provable guarantees than approximate sampling-based inference. Since lower bounds can be obtained by unrolling loops, the main challenge is upper bounds, and we attack it in two ways. The first is called residual mass semantics , which is a flat bound based on the residual probability mass of a loop. The approach is simple, efficient, and has provable guarantees. The main novelty of our work is the second approach, called geometric bound semantics . It operates on a novel family of distributions, called eventually geometric distributions (EGDs), and can bound the distribution of loops with a new form of loop invariants called contraction invariants . The invariant synthesis problem reduces to a system of polynomial inequality constraints, which is a decidable problem with automated solvers. If a solution exists, it yields an exponentially decreasing bound on the whole distribution, and can therefore bound moments and tail asymptotics as well, not just probabilities as in the first approach. Both semantics enjoy desirable theoretical properties. In particular, we prove soundness and convergence, i.e. the bounds converge to the exact posterior as loops are unrolled further. We also investigate sufficient and necessary conditions for the existence of geometric bounds. On the practical side, we describe Diabolo , a fully-automated implementation of both semantics, and evaluate them on a variety of benchmarks from the literature, demonstrating their general applicability and the utility of the resulting bounds.
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 386cda97-f8a4-493c-b48f-3d39339162a4Cited by top-tier papers2
- Structural Abstraction and Refinement for Probabilistic ProgramsGuanyan Li, Juanen Li, Zhilei Han, Peixin Wang et al.OOPSLA 2025
- Piecewise Analysis of Probabilistic Programs via 𝑘-InductionTengshun Yang, Shenghua Feng, Hongfei Fu, Naijun Zhan et al.POPL 2026
Builds on11
- Scaling exact inference for discrete probabilistic programsSteven Holtzen, Guy Van den Broeck, Todd D. MillsteinOOPSLA 2020 · 85 citations
- SPPL: probabilistic programming with fast exact symbolic inferenceFeras A. Saad, Martin C. Rinard, Vikash K. MansinghkaPLDI 2021 · 38 citations
- This is the moment for probabilistic loopsMarcel Moosbrugger, Miroslav Stankovic, Ezio Bartocci, Laura KovácsOOPSLA 2022 · 30 citations
- Central moment analysis for cost accumulators in probabilistic programsDi Wang, Jan Hoffmann, Thomas W. RepsPLDI 2021 · 18 citations
- Guaranteed bounds for posterior inference in universal probabilistic programmingRaven Beutner, C.-H. Luke Ong, Fabian ZaiserPLDI 2022 · 18 citations
Related papers
- Exact Bayesian Inference for Loopy Probabilistic Programs using Generating FunctionsLutz Klinkenberg, Christian Blumenthal, Mingshuai Chen, Darion Haase et al.OOPSLA 2024 · 11 citations
- Does a Program Yield the Right Distribution? - Verifying Probabilistic Programs via Generating FunctionsMingshuai Chen, Joost-Pieter Katoen, Lutz Klinkenberg, Tobias WinklerCAV 2022 · 14 citations
- Static Posterior Inference of Bayesian Probabilistic Programming via Polynomial SolvingPeixin Wang, Tengshun Yang, Hongfei Fu, Guanyan Li et al.PLDI 2024 · 13 citations
- Inference of Probabilistic Programs with Moment-Matching Gaussian MixturesFrancesca Randone, Luca Bortolussi, Emilio Incerto, Mirco TribastonePOPL 2024 · 12 citations
- Foundations for Deductive Verification of Continuous Probabilistic Programs: From Lebesgue to Riemann and BackKevin Batz, Joost-Pieter Katoen, Francesca Randone, Tobias WinklerOOPSLA 2025 · 2 citations
