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

Fabian Zaiser, Andrzej S. Murawski, Luke Ong
5/26/2023
cs.PLcs.LGstat.CO

No official code found. Best implementation: fzaiser/genfer (27 stars, MIT, Rust, last commit 2024-11-07).

Abstract

We present an exact Bayesian inference method for discrete statistical models, which can find exact solutions to a large class of discrete inference problems, even with infinite support and continuous priors. To express such models, we introduce a probabilistic programming language that supports discrete and continuous sampling, discrete observations, affine functions, (stochastic) branching, and conditioning on discrete events. Our key tool is probability generating functions: they provide a compact closed-form representation of distributions that are definable by programs, thus enabling the exact computation of posterior probabilities, expectation, variance, and higher moments. Our inference method is provably correct and fully automated in a tool called Genfer, which uses automatic differentiation (specifically, Taylor polynomials), but does not require computer algebra. Our experiments show that Genfer is often faster than the existing exact inference tools PSI, Dice, and Prodigy. On a range of real-world inference problems that none of these exact tools can solve, Genfer's performance is competitive with approximate Monte Carlo methods, while avoiding approximation errors.

View on arXivView PDF

Code Implementations(1)

fzaiser/genferCommunity100%
RustMIT

Tool for Bayesian inference on discrete models expressed as probabilistic programs, via generating functions

271Rust, ShellAug 3, 20231 years agoMIT

Similar Papers

Cite this paper

@article{zaiser2023exact,
  title  = {Exact Bayesian Inference on Discrete Models via Probability Generating Functions: A Probabilistic Programming Approach},
  author = {Fabian Zaiser and Andrzej S. Murawski and Luke Ong},
  year   = {2023},
  eprint = {2305.17058},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.17058v3},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.17058.svg)](https://codeofpaper.com/paper/2305.17058)

Discussion