Template-Based Static Posterior Inference for Bayesian Probabilistic Programming

07/24/2023
by   Peixin Wang, et al.
0

In Bayesian probabilistic programming, a central problem is to estimate the normalised posterior distribution (NPD) of a probabilistic program with conditioning. Prominent approximate approaches to address this problem include Markov chain Monte Carlo and variational inference, but neither can generate guaranteed outcomes within limited time. Moreover, most existing formal approaches that perform exact inference for NPD are restricted to programs with closed-form solutions or bounded loops/recursion. A recent work (Beutner et al., PLDI 2022) derived guaranteed bounds for NPD over programs with unbounded recursion. However, as this approach requires recursion unrolling, it suffers from the path explosion problem. Furthermore, previous approaches do not consider score-recursive probabilistic programs that allow score statements inside loops, which is non-trivial and requires careful treatment to ensure the integrability of the normalising constant in NPD. In this work, we propose a novel automated approach to derive bounds for NPD via polynomial templates. Our approach can handle probabilistic programs with unbounded while loops and continuous distributions with infinite supports. The novelties in our approach are three-fold: First, we use polynomial templates to circumvent the path explosion problem from recursion unrolling; Second, we derive a novel multiplicative variant of Optional Stopping Theorem that addresses the integrability issue in score-recursive programs; Third, to increase the accuracy of the derived bounds via polynomial templates, we propose a novel technique of truncation that truncates a program into a bounded range of program values. Experiments over a wide range of benchmarks demonstrate that our approach is time-efficient and can derive bounds for NPD that are comparable with (or tighter than) the recursion-unrolling approach (Beutner et al., PLDI 2022).

READ FULL TEXT
research
02/01/2023

Exact Probabilistic Inference Using Generating Functions

Probabilistic programs are typically normal-looking programs describing ...
research
01/07/2013

Automated Variational Inference in Probabilistic Programming

We present a new algorithm for approximate inference in probabilistic pr...
research
12/14/2019

Approximations in Probabilistic Programs

We study the first-order probabilistic programming language introduced b...
research
07/14/2023

Exact Bayesian Inference for Loopy Probabilistic Programs

We present an exact Bayesian inference method for inferring posterior di...
research
02/12/2019

Cost Analysis of Nondeterministic Probabilistic Programs

We consider the problem of expected cost analysis over nondeterministic ...
research
09/26/2021

Statically Bounded-Memory Delayed Sampling for Probabilistic Streams

Probabilistic programming languages aid developers performing Bayesian i...

Please sign up or login with your details

Forgot password? Click here to reset