Skip to content

Code accompanying the paper "Automating Involutive MCMC using Probabilistic and Differentiable Programming"

Notifications You must be signed in to change notification settings

probcomp/autoimcmc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Automating Involutive MCMC using Probabilistic and Differentiable Programming

Cusumano-Towner, Marco F. and Alexander K. Lew and Vikash K. Mansinghka. "Automating Involutive MCMC using Probabilistic and Differentiable Programming." arXiv preprint arXiv:2007.09871 (2020) PDF

The paper describes the automated involutive MCMC construct as implemented in the Gen probabilistic programming system.

NOTE: The code in the paper uses a modified syntax that has not yet been merged into the master branch of Gen. The previous syntax is described as part of the current Gen involution MCMC documentation. The new Gen syntax, which matches that in the paper, is currently being reviewed in this PR and is documented in the new Involutive MCMC documentation, and the new Trace Translator documentation.

Examples using Gen

The Gen implementation of the techniques described in the paper is in the Gen repository, and not in this repository. This repository contains example code that uses the Gen implementation of automated involutive MCMC for a split-merge reversible jump move in an infinite mixture model (corresponding to Figure 1 of the paper).

To run this example, first obtain Julia, and run:

cd gen
julia --project=. mixture_example.jl

Minimal PyTorch-based languages and examples

This repository also contains the implementation of a minimal probabilistic programming language and differentiable programming language for transforming traces, on top of PyTorch, and a minimal example of involutive MCMC written using that framework. The PyTorch implementation does not implement as many optimizations as the Gen implementation, and only supports involutive MCMC (whereas Gen provides an API for construting a variety of inference algorithms), but is short and self-contained.

To run the examples, first obtain PyTorch, ensure it is installed in your python environment and run:

cd pytorch
python polar_cartesian_example.py
python mixture_example.py

About

Code accompanying the paper "Automating Involutive MCMC using Probabilistic and Differentiable Programming"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published