Sound Probabilistic Inference via Guide Types

04/08/2021
by   Di Wang, et al.
0

Probabilistic programming languages aim to describe and automate Bayesian modeling and inference. Modern languages support programmable inference, which allows users to customize inference algorithms by incorporating guide programs to improve inference performance. For Bayesian inference to be sound, guide programs must be compatible with model programs. One pervasive but challenging condition for model-guide compatibility is absolute continuity, which requires that the model and guide programs define probability distributions with the same support. This paper presents a new probabilistic programming language that guarantees absolute continuity, and features general programming constructs, such as branching and recursion. Model and guide programs are implemented as coroutines that communicate with each other to synchronize the set of random variables they sample during their execution. Novel guide types describe and enforce communication protocols between coroutines. If the model and guide are well-typed using the same protocol, then they are guaranteed to enjoy absolute continuity. An efficient algorithm infers guide types from code so that users do not have to specify the types. The new programming language is evaluated with an implementation that includes the type-inference algorithm and a prototype compiler that targets Pyro. Experiments show that our language is capable of expressing a variety of probabilistic models with nontrivial control flow and recursion, and that the coroutine-based computation does not introduce significant overhead in actual Bayesian inference.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/02/2018

Automated learning with a probabilistic programming language: Birch

This work offers a broad perspective on probabilistic modeling and infer...
research
12/12/2013

Augur: a Modeling Language for Data-Parallel Probabilistic Inference

It is time-consuming and error-prone to implement inference procedures f...
research
05/18/2020

Scaling Exact Inference for Discrete Probabilistic Programs

Probabilistic programming languages (PPLs) are an expressive means of re...
research
01/05/2021

Control-Data Separation and Logical Condition Propagation for Efficient Inference on Probabilistic Programs

We introduce a novel sampling algorithm for Bayesian inference on impera...
research
04/26/2022

Designing Perceptual Puzzles by Differentiating Probabilistic Programs

We design new visual illusions by finding "adversarial examples" for pri...
research
02/08/2021

PyAutoFit: A Classy Probabilistic Programming Language for Model Composition and Fitting

A major trend in academia and data science is the rapid adoption of Baye...
research
06/02/2013

Declarative Modeling and Bayesian Inference of Dark Matter Halos

Probabilistic programming allows specification of probabilistic models i...

Please sign up or login with your details

Forgot password? Click here to reset