Does a Program Yield the Right Distribution? - Verifying Probabilistic Programs via Generating Functions
Mingshuai Chen, Joost-Pieter Katoen, Lutz Klinkenberg, Tobias Winkler
Abstract
Abstract We study discrete probabilistic programs with potentially unbounded looping behaviors over an infinite state space. We present, to the best of our knowledge,the first decidability result for the problem of determining whether such a program generates exactly a specified distribution over its outputs(provided the program terminates almost-surely). The class of distributions that can be specified in our formalism consists of standard distributions (geometric, uniform, etc.) and finite convolutions thereof. Our method relies on representing these (possibly infinite-support) distributions asprobability generating functionswhich admit effective arithmetic operations. We have automated our techniques in a tool called PRODIGY , which supports automatic invariance checking, compositional reasoning of nested loops, and efficient queries to the output distribution, as demonstrated by experiments.
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 578e7aca-6157-4c59-b547-bc3fcb6be829Cited by top-tier papers8
- Exact Bayesian Inference on Discrete Models via Probability Generating Functions: A Probabilistic Programming ApproachFabian Zaiser, Andrzej S. Murawski, Chih-Hao Luke OngNeurIPS 2023 · 17 citations
- Lower Bounds for Possibly Divergent Probabilistic ProgramsShenghua Feng, Mingshuai Chen, Han Su, Benjamin Lucien Kaminski et al.OOPSLA 2023 · 14 citations
- Inference of Probabilistic Programs with Moment-Matching Gaussian MixturesFrancesca Randone, Luca Bortolussi, Emilio Incerto, Mirco TribastonePOPL 2024 · 12 citations
- Exact Bayesian Inference for Loopy Probabilistic Programs using Generating FunctionsLutz Klinkenberg, Christian Blumenthal, Mingshuai Chen, Darion Haase et al.OOPSLA 2024 · 11 citations
- Equivalence and Similarity Refutation for Probabilistic ProgramsKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Petr Novotný, Dorde ZikelicPLDI 2024 · 6 citations
Builds on7
- Scaling exact inference for discrete probabilistic programsSteven Holtzen, Guy Van den Broeck, Todd D. MillsteinOOPSLA 2020 · 85 citations
- Aiming low is harder: induction for lower bounds in probabilistic program verificationMarcel Hark, Benjamin Lucien Kaminski, Jürgen Giesl, Joost-Pieter KatoenPOPL 2020 · 47 citations
- λPSI: exact inference for higher-order probabilistic programsTimon Gehr, Samuel Steffen, Martin T. VechevPLDI 2020 · 29 citations
- Latticed k-Induction with an Application to Probabilistic ProgramsKevin Batz, Mingshuai Chen, Benjamin Lucien Kaminski, Joost-Pieter Katoen et al.CAV 2021 · 21 citations
- Quantitative analysis of assertion violations in probabilistic programsJinyi Wang, Yican Sun, Hongfei Fu, Krishnendu Chatterjee et al.PLDI 2021 · 18 citations
Related papers
- Guaranteed Bounds on Posterior Distributions of Discrete Probabilistic Programs with LoopsFabian Zaiser, Andrzej S. Murawski, C.-H. Luke OngPOPL 2025 · 6 citations
- On the Almost-Sure Termination of Probabilistic Counter ProgramsSergei Novozhilov, Mingqi Yang, Mingshuai Chen, Zhiyang Li et al.CAV 2025
- Formally Verified Samplers from Probabilistic Programs with Loops and ConditioningAlexander Bagnall, Gordon Stewart, Anindya BanerjeePLDI 2023 · 5 citations
- On Higher-Order Probabilistic Verification via the Weighted Relational Model of Linear LogicUgo Dal Lago, Guido Fiorillo, Paolo PistoneLICS 2026
- Verifying Sampling Algorithms via Distributional InvariantsDaniel Zilken, Kevin Batz, Joost-Pieter Katoen, Tobias WinklerFM 2026 · 1 citation
