FYI: Pyro: a new probabilistic programming language


Pyro is a universal probabilistic programming language (PPL) written in Python and supported by PyTorch on the backend. Pyro enables flexible and expressive deep probabilistic modeling, unifying the best of modern deep learning and Bayesian modeling. It was designed with these key principles:

Blog post about it:

Looks like it aims to do for PyTorch what Edward does for TensorFlow.


Thanks for posting. As with Edward, I don’t think Pyro is targeting the same audience as we are—it all looks much more like Python programming and much less like statistical modeling.

I had heard rumors Uber was going to open-source something—I hadn’t realized Noah Goodman was involved. He was a participant in the DARPA PPAML program, and the developer of PPL and WebPPL, which are Church-like (he was at MIT before Stanford).

Sounds like they’re doing variational inference with autodiff, but plan to do HMC. I am glad to see they went with arbitrary control structures within program (like us, but not like PyMC3 due to being tied to Theano). I can’t quite see how the statement-driven randomness of Church plays out here, but I’ve always found that confusing.

Like most of the other probabilistic programming systems (but unlike Stan), it mixes inference and modeling.

Here are some examples of programs:

Here’s a regression example:

It starts with “Now let’s define our regression model in the form of a neural network.” and goes on to build something that’s a mix of an off-the-shelf named model and some priors and some computation.