PGM-Lab / InferPy

InferPy: Deep Probabilistic Modeling with Tensorflow Made Easy
https://inferpy-docs.readthedocs.io/en/stable/index.html
Apache License 2.0
147 stars 14 forks source link

[Question] Context of library in existing probalistic python ecosystem #210

Closed JeroenSchmidt closed 4 years ago

JeroenSchmidt commented 4 years ago

Hi guys, let me first start off by thanking you guys on working on this project! The syntax and high level API you guys have put together are the cleanest I've seen to date, and I can't wait to start using it more in my daily work flow. I particularly liked the simplicity of how you can create baysian NN models.

I was wondering if you guys could elaborate how InferPy differs at the technical level (pros & cons) from more established libraries like PYMC3, pyStan and Pyro?

andresmasegosa commented 4 years ago

Hi Jeoren,

thanks for you interest in this project.

Note that InferPy builds on top of Tensorflow-Probabily (TFP). Our library is a wrapper that tries to simplify the creation and the use of (deep) probabilistic models. InferPy code "compiles" into TFP code. So, we benefit from the reliability of TFP. However, we focus on ease of use, and TFP focuses on being extremely flexible. But this flexibility comes at a cost: the API is quite complex.

pyStan allows to define general probabilistic models and mainly relies on Hamiltonian Monte-Carlo inference methods. InferPy also allows to define general probabilistic models, but we have a stronger focus on deep neural networks and variational inference (Hamiltonian Monte-Carlo methods do not scale well with large neural networks).

We were inspired by Pyro when designing the API. Pyro is a really powerful language. The problem, in my opinion, is similar to TFP, the flexibility comes at the cost of complexity in the definition and use of the models.

PyMC3 is probably the closer language because it really tries to make things simpler, but PyMC3 relies on Theano which is now a bit outdated.