A library for probabilistic modeling, inference, and criticism.

Edward is a Python library for probabilistic modeling, inference, and criticism. It is a testbed for fast experimentation and research with probabilistic models, ranging from classical hierarchical models on small data sets to complex deep probabilistic models on large data sets. Edward fuses three fields: Bayesian statistics and machine learning, deep learning, and probabilistic programming.

It supports modeling with

  • Directed graphical models
  • Neural networks (via libraries such as Keras and TensorFlow Slim)
  • Conditionally specified undirected models
  • Bayesian nonparametrics and probabilistic programs

It supports inference with

  • Variational inference
    • Black box variational inference
    • Stochastic variational inference
    • Inclusive KL divergence: \(\text{KL}(p\|q)\)
    • Maximum a posteriori estimation
  • Monte Carlo
    • Hamiltonian Monte Carlo
    • Stochastic gradient Langevin dynamics
    • Metropolis-Hastings
  • Compositions of inference
    • Expectation-Maximization
    • Pseudo-marginal and ABC methods
    • Message passing algorithms

It supports criticism of the model and inference with

  • Point-based evaluations
  • Posterior predictive checks

Edward is built on top of TensorFlow. It enables features such as computational graphs, distributed training, CPU/GPU integration, automatic differentiation, and visualization with TensorBoard.

Authors

Edward is led by Dustin Tran with guidance by David Blei. The other developers are

We are open to collaboration, and welcome researchers and developers to contribute. Check out the contributing page for how to improve Edward’s software. For broader research challenges, shoot one of us an e-mail.

Edward has benefited enormously from the helpful feedback and advice of many individuals: Jaan Altosaar, Eugene Brevdo, Allison Chaney, Joshua Dillon, Matthew Hoffman, Kevin Murphy, Rajesh Ranganath, Rif Saurous, and other members of the Blei Lab, Google Brain, and Google Research.

Citation

There are several articles to cite for Edward.

The following article describes the API of Edward. It bundles the website’s documentation as a PDF. We recommend citing this article as a general default.

Dustin Tran, Alp Kucukelbir, Adji B. Dieng, Maja Rudolph, Dawen Liang, and David M. Blei. 2016. Edward: A library for probabilistic modeling, inference, and criticism. arXiv preprint arXiv:1610.09787.

@article{tran2016edward,
  author = {Dustin Tran and Alp Kucukelbir and Adji B. Dieng and Maja Rudolph and Dawen Liang and David M. Blei},
  title = {{Edward: A library for probabilistic modeling, inference, and criticism}},
  journal = {arXiv preprint arXiv:1610.09787},
  year = {2016}
}

The following article describes the algorithmic foundations of Edward. We recommend citing this article if you are discussing Edward’s design and methodology.

Dustin Tran, Matthew D. Hoffman, Rif A. Saurous, Eugene Brevdo, Kevin Murphy, and David M. Blei. 2017. Deep Probabilistic Programming. arXiv preprint arXiv:1701.03757.

@article{tran2017deep,
  author = {Dustin Tran and Matthew D. Hoffman and Rif A. Saurous and Eugene Brevdo and Kevin Murphy and David M. Blei},
  title = {Deep probabilistic programming},
  journal = {arXiv preprint arXiv:1701.03757},
  year = {2017}
}