pyprob
is a PyTorch-based library for probabilistic programming and inference compilation. The main focus of this library is on coupling existing simulation codebases with probabilistic inference with minimal intervention.
pyprob
is currently a research prototype in alpha testing stage, with more documentation and examples on the way. Watch this space!
We support front ends in multiple languages through the PPX interface that allows execution of models and inference engines in separate programming languages, processes, and machines connected over a network. The currently supported languages are Python and C++.
- Python:
pyprob
is implemented and directly usable from Python - C++: A lightweight C++ front end is available through the pyprob_cpp library
pyprob
currently provides the following inference engines:
- Markov chain Monte Carlo
- Lightweight Metropolis Hastings (LMH)
- Random-walk Metropolis Hastings (RMH)
- Importance sampling
- Regular sequential importance sampling (proposals from prior)
- Inference compilation
Inference compilation is an amortized inference technique for performing fast repeated inference using deep neural networks to parameterize proposal distributions in the importance sampling family of inference engines. We are planning to add other inference engines, e.g., from the variational inference family.
- Python 3.5 or higher. We recommend Anaconda.
- PyTorch 0.4.0 or higher, installed by following instructions on the PyTorch web site.
To use a cutting-edge version, clone this repository and install the pyprob
package using:
git clone [email protected]:probprog/pyprob.git
cd pyprob
pip install .
To use the latest version available in Python Package Index, run:
pip install pyprob
A CUDA + PyTorch + pyprob image with the latest passing commit is automatically pushed to probprog/pyprob:latest
https://hub.docker.com/r/probprog/pyprob/
A website with documentation and examples will be available in due course.
The examples folder in this repository provides some working models and inference workflows as Jupyter notebooks.
An set of continuous integration tests are available in this repository, including those checking for correctness of inference over a range of reference models and inference engines.
Our paper at AISTATS 2017 provides an in-depth description of the inference compilation technique.
If you use pyprob
and/or would like to cite our paper, please use the following information:
@inproceedings{le-2016-inference,
author = {Le, Tuan Anh and Baydin, Atılım Güneş and Wood, Frank},
booktitle = {Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS)},
title = {Inference Compilation and Universal Probabilistic Programming},
year = {2017},
volume = {54},
pages = {1338--1348},
series = {Proceedings of Machine Learning Research},
address = {Fort Lauderdale, FL, USA},
publisher = {PMLR}
}
pyprob
is distributed under the BSD License.
pyprob
has been developed by Atılım Güneş Baydin and Tuan Anh Le within the Programming Languages and AI group led by Frank Wood at the University of Oxford and University of British Columbia.
For the full list of contributors, see: