Does a Program Yield the Right Distribution? Verifying Probabilistic Programs via Generating Functions

05/03/2022
by   Mingshuai Chen, et al.
0

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 as probability generating functions which 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 on various quantities of to the output distribution, as demonstrated by experiments.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/13/2020

Generating Functions for Probabilistic Programs

This paper investigates the usage of generating functions (GFs) encoding...
research
07/14/2023

Exact Bayesian Inference for Loopy Probabilistic Programs

We present an exact Bayesian inference method for inferring posterior di...
research
02/01/2023

Exact Probabilistic Inference Using Generating Functions

Probabilistic programs are typically normal-looking programs describing ...
research
08/30/2023

"Would life be more interesting if I were in AI?" Answering Counterfactuals based on Probabilistic Inductive Logic Programming

Probabilistic logic programs are logic programs where some facts hold wi...
research
05/26/2023

Exact Bayesian Inference on Discrete Models via Probability Generating Functions: A Probabilistic Programming Approach

We present an exact Bayesian inference method for discrete statistical m...
research
03/14/2018

An Assertion-Based Program Logic for Probabilistic Programs

Research on deductive verification of probabilistic programs has conside...
research
07/25/2023

Scaling Integer Arithmetic in Probabilistic Programs

Distributions on integers are ubiquitous in probabilistic modeling but r...

Please sign up or login with your details

Forgot password? Click here to reset