Ask HN: What companies are using probabilistic programming?
Probabilistic programming systems (PPS) define languages that discretize modeling and inference such that any generative model can be easily composed and run with a common inference engine. The main advantage over traditional ML systems in deterministic code (i.e. Python) being concise, modular modeling where the developer doesn't have to write custom inference algorithms for each model/problem. For more info see, for example, [1] and [2].
I'm curious though, what applications of PPS are realized in practice? Notably Uber [3] and Google [4] are developing/supporting their own (deep learning focused) PPS, but is it known if/how they're used within these companies? Are the frameworks (Pyro [5] and Edward [6], respectively) used by other companies?
[1] Frank Wood (Microsoft) tutorial: https://www.youtube.com/watch?v=Te7A5JEm5UI
[2] MIT ProbComp lab's page of resources: http://probcomp.csail.mit.edu/resources/
[3] https://eng.uber.com/pyro/
[4] https://medium.com/tensorflow/introducing-tensorflow-probability-dca4c304e245
[5] http://pyro.ai/
[6] http://edwardlib.org/
33 comments
[ 142 ms ] story [ 1295 ms ] threadThere's tons of academic literature on how to handle this, and accelerating industry support for the frameworks mentioned by OP... but the act of building an early-stage software engineering culture that is amenable to the large amounts of experimentation (often exciting, often frustrating, incredibly hard to time-predict against business needs and runway allocation) is something where I think the industry is still finding best practices. Were PPLs the right move, with the benefit of your hindsight, for that problem? Were they more promising than deep learning given challenges of properly collecting data at scale? The process of choosing a system, measuring it against more naive/heuristic approaches, deciding how to put it into production and integrate with existing software/pipelines - and reliably hiring the right people for those jobs, to make things a bit meta for Triplebyte! - that's a narrative in search of thought leaders.
In particular, pymc3's use of ADVI to automatically transform discrete or boundary random variables into unconstrained continuous random variables and carry out an initialization process with auto-tuned variational Bayes automatically to infer good settings and seed values for NUTS, and then to automatically use an optimized NUTS implementation for the MCMC sampling, is incredibly impressive.
For most problems, you use a simple pymc3 context manager and from there on it acts kind of like a mutually recursive let block in some functional languages: you define random and deterministic variables that inter-depend on each other and are defined by their distribution functions, with your observational data indicating which values are used for determining the likelihood portion of the model.
After the context manager exits, you can just start drawing samples from the posterior distribution right away.
I've used it with great success for several large-scale hierarchical regression problems.
[0] https://improbable.io/
[1] https://github.com/improbable-research/keanu
[0] https://github.com/deselby-research/
http://www.cs.ubc.ca/~fwood/index.html
Microsoft Research does have multiple excellent researchers working on probabilistic programming. Infer.NET in particular is a highly advanced piece of technology for models in which you would use message passing algorithms to perform inference:
http://infernet.azurewebsites.net
[1] http://invrea.com/index.php
I maybe able to answer specific questions.
It's generally used more for modeling and prediction than for creating "products", if that makes sense. More popular among people with statistics or social science backgrounds than among programmers and computer scientists.
If you dig around Stan-related websites you can see various companies and institutions that use it. One I found quite quickly was Metrum Research Group, which does consulting work for the pharmaceutical industry.
https://metrumrg.com/
http://www.generable.com
A lot of very useful statistical models can't benefit from the GPU, and for them I think Stan is the better tool. There's a reason it's basically the default choice for people who want to use probabilistic programming for Bayesian statistics.
It's probably not the best tool for AI/ML type models. But for statisticians who want to use Bayesian methods it's close to perfect.
Haha I knew "legacy" would ruffle some feathers, by which I mean Stan was pretty much the first application-ready PPS on the block -- robust toolbox of methods, actively developed/supported.
The last slide of this presentation on SMC inference in PPLs is a nice view of the PPS landscape (not to mention the whole deck is a great intro by Lawrence Murray): http://www.it.uu.se/research/systems_and_control/education/2...
I've never actually used BUGS or JAGS for anything but I would consider at least BUGS to truly be legacy software. To me the word "legacy" means you shouldn't pick it for a new project.
Overall though, by freeing developers from writing custom inference algorithms, all the work gets pushed to the language designer/implementer. It is not at all clear to me that one (or even a few) generic inference algorithms will be able to satisfy the needs for different problem domains. So there could be not one general purpose PPL but multiple ones with different problem domains.
[0] http://www.semanticmachines.com/
My project is quite simple but You can check it via homepage[0] or directly[1]
[0]http://www.vladovukovic.com [1]https://bit.ly/2Krtkfi
[1] https://twitter.com/avibryant [2] https://github.com/stripe/rainier
It is called CPProb and it is a C++ general purpose probabilistic programming library that uses a version of Variational Inference to learn proposals for Importance Sampling.
It aims to be usable directly in preexisting C++ codebases. For the fulfillment of the Master Thesis, I also wrote a tutorial on Particle filters via SMC-like methods, and I described the design choices that one finds when implementing one of these systems.
The C++ library with the corresponding Pytorch-based neural network and the tutorial can be found in
https://github.com/Lezcano/CPProb
and are available under a MIT license.