Inference of Probabilistic Programs with Moment-Matching Gaussian Mixtures
Francesca Randone, Luca Bortolussi, Emilio Incerto, Mirco Tribastone
Abstract
Computing the posterior distribution of a probabilistic program is a hard task for which no one-fit-for-all solution exists. We propose Gaussian Semantics, which approximates the exact probabilistic semantics of a bounded program by means of Gaussian mixtures. It is parametrized by a map that associates each program location with the moment order to be matched in the approximation. We provide two main contributions. The first is a universal approximation theorem stating that, under mild conditions, Gaussian Semantics can approximate the exact semantics arbitrarily closely. The second is an approximation that matches up to second-order moments analytically in face of the generally difficult problem of matching moments of Gaussian mixtures with arbitrary moment order. We test our second-order Gaussian approximation (SOGA) on a number of case studies from the literature. We show that it can provide accurate estimates in models not supported by other approximation methods or when exact symbolic techniques fail because of complex expressions or non-simplified integrals. On two notable classes of problems, namely collaborative filtering and programs involving mixtures of continuous and discrete distributions, we show that SOGA significantly outperforms alternative techniques in terms of accuracy and computational time.
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 89be6839-d5ac-4411-ae6b-00334181c246Cited by top-tier papers2
- noDice: Inference for Discrete Probabilistic Programs with Nondeterminism and ConditioningTobias Gürtler, Benjamin Lucien KaminskiOOPSLA 2026 · 1 citation
- Uncertainty-driven Embedding ConvolutionSungjun Lim, Kangjun Noh, Youngjun Choi, Heeyoung Lee et al.ICLR 2026
Builds on5
- 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
- Divide, Conquer, and Combine: a New Inference Strategy for Probabilistic Programs with Stochastic SupportYuan Zhou, Hongseok Yang, Yee Whye Teh, Tom RainforthICML 2020 · 20 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
Related papers
- Guaranteed bounds for posterior inference in universal probabilistic programmingRaven Beutner, C.-H. Luke Ong, Fabian ZaiserPLDI 2022 · 18 citations
- Compositional Semantics for Probabilistic Programs with Exact ConditioningDario Stein, Sam StatonLICS 2021 · 18 citations
- Guaranteed Bounds on Posterior Distributions of Discrete Probabilistic Programs with LoopsFabian Zaiser, Andrzej S. Murawski, C.-H. Luke OngPOPL 2025 · 6 citations
- Exact Bayesian Inference for Loopy Probabilistic Programs using Generating FunctionsLutz Klinkenberg, Christian Blumenthal, Mingshuai Chen, Darion Haase et al.OOPSLA 2024 · 11 citations
- λPSI: exact inference for higher-order probabilistic programsTimon Gehr, Samuel Steffen, Martin T. VechevPLDI 2020 · 29 citations
