# Probabilistic programming

Probabilistic programming (PP) is a programming paradigm in which probabilistic models are specified and inference for these models is performed automatically.[1] It represents an attempt to unify probabilistic modeling and traditional general purpose programming in order to make the former easier and more widely applicable.[2][3] It can be used to create systems that help make decisions in the face of uncertainty.

Programming languages used for probabilistic programming are referred to as "Probabilistic programming languages" (PPLs).

## Applications

Probabilistic reasoning has been used for a wide variety of tasks such as predicting stock prices, recommending movies, diagnosing computers, detecting cyber intrusions and image detection.[4] However, until recently (partially due to limited computing power), probabilistic programming was limited in scope, and most inference algorithms had to be written manually for each task.

Nevertheless, in 2015, a 50-line probabilistic computer vision program was used to generate 3D models of human faces based on 2D images of those faces. The program used inverse graphics as the basis of its inference method, and was built using the Picture package in Julia.[4] This made possible "in 50 lines of code what used to take thousands".[5][6]

More recent work using the Gen programming system (also written in Julia) has applied probabilistic programming to a wide variety of tasks.[7]

Probabilistic programming has also been combined with differentiable programming using the Julia package Zygote.jl, allowing it to be applied to additional tasks in which parts of the model need to be differentiated.[8] The use of differentiable programming can also allow for the easier implementation of gradient based MCMC inference methods such as HMC.

## Probabilistic programming languages

PPLs often extend from a basic language. The choice of underlying basic language depends on the similarity of the model to the basic language's ontology, as well as commercial considerations and personal preference. For instance, Dimple[9] and Chimple[10] are based on Java, Infer.NET is based on .NET,[11] while PRISM extends from Prolog.[12] However, some PPLs such as WinBUGS and Stan offer a self-contained language, with no obvious origin in another language.[13][14]

Several PPLs are in active development, including some in beta test.

### Relational

A probabilistic relational programming language (PRPL) is a PPL specially designed to describe and infer with probabilistic relational models (PRMs).

A PRM is usually developed with a set of algorithms for reducing, inference about and discovery of concerned distributions, which are embedded into the corresponding PRPL.

### List of probabilistic programming languages

NameExtends fromHost language
Analytica[15]C++
bayesloop[16][17]PythonPython
CuPPL[18]NOVA[19]
Venture[20]SchemeC++
Probabilistic-C[21]CC
Anglican[22]ClojureClojure
IBAL[23]OCaml
BayesDB[24]SQLite, Python
PRISM[12]B-Prolog
Infer.NET[11].NET Framework.NET Framework
dimple[9]MATLAB, Java
chimple[10]MATLAB, Java
BLOG[25]Java
delSAT[26]Answer set programming, SAT (DIMACS CNF)
PSQL[27]SQL
BUGS[13]
FACTORIE[28]Scala
PMTK[29]MATLABMATLAB
Alchemy[30]C++
Dyna[31]Prolog
Figaro[32]Scala
Church[33]SchemeVarious: JavaScript, Scheme
ProbLog[34]PrologPython, Jython
ProBT[35]C++, Python
Stan[14]C++
Hakaru[36]HaskellHaskell
BAli-Phy (software)[37]HaskellC++
ProbCog[38]Java, Python
Gamble[39]Racket
PWhile[40]WhilePython
Tuffy[41]Java
PyMC3[42]Python, TheanoPython
PyMC4[43]Python, TensorFlow ProbabilityPython
greta[44] TensorFlow R
pomegranate[45] Python Python
Lea[46]PythonPython
WebPPL[47]JavaScriptJavaScript
Picture[4] Julia Julia
Turing.jl[48] Julia Julia
Gen[49] Julia Julia
Low-level First-order PPL[50]Python, Clojure, PytorchVarious: Python, Clojure
Troll[51] Moscow ML
Edward[52] TensorFlow Python
TensorFlow Probability[53] TensorFlow Python
Edward2[54] TensorFlow Probability Python
Pyro[55] PyTorch Python
Saul[56] Scala Scala
RankPL[57] Java
Birch[58] C++
PSI[59] D

## Difficulty

Reasoning about variables as probability distributions causes difficulties for novice programmers, but these difficulties can be addressed through use of Bayesian network visualisations and graphs of variable distributions embedded within the source code editor.[60]

## Notes

1. "Probabilistic programming does in 50 lines of code what used to take thousands". phys.org. April 13, 2015. Retrieved April 13, 2015.
2. "Probabilistic Programming". probabilistic-programming.org.
3. Pfeffer, Avrom (2014), Practical Probabilistic Programming, Manning Publications. p.28. ISBN 978-1 6172-9233-0
4. "Short probabilistic programming machine-learning code replaces complex programs for computer-vision tasks". KurzweilAI. April 13, 2015. Retrieved November 27, 2017.
5. Hardesty, Larry (April 13, 2015). "Graphics in reverse".
6. "MIT shows off machine-learning script to make CREEPY HEADS".
7. "MIT's Gen programming system flattens the learning curve for AI projects". VentureBeat. June 27, 2019. Retrieved June 27, 2019.
8. ∂P: A Differentiable Programming System to Bridge Machine Learning and Scientific Computing, 2019, arXiv:1907.07587
9. "Dimple Home Page". analog.com.
10. "Chimple Home Page". analog.com.
11. "Infer.NET". microsoft.com. Microsoft.
12. "PRISM: PRogramming In Statistical Modeling". rjida.meijo-u.ac.jp.
13. "The BUGS Project - MRC Biostatistics Unit". cam.ac.uk.
14. "Stan". mc-stan.org.
15. "Analytica-- A Probabilistic Modeling Language". lumina.com.
16. "bayesloop: Probabilistic programming framework that facilitates objective model selection for time-varying parameter models".
17. "GitHub -- bayesloop".
18. "Probabilistic Programming with CuPPL". popl19.sigplan.org.
19. "NOVA: A Functional Language for Data Parallelism". acm.org.
20. "Venture -- a general-purpose probabilistic programming platform". mit.edu.
21. "Probabilistic C". ox.ac.uk.
22. "The Anglican Probabilistic Programming System". ox.ac.uk.
23. "IBAL Home Page". Archived from the original on December 26, 2010.
24. "BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself". GitHub.
25. "Bayesian Logic (BLOG)". mit.edu. Archived from the original on June 16, 2011.
26. "delSAT (probabilistic SAT/ASP)".
27. Dey, Debabrata; Sarkar, Sumit (1998). "PSQL: A query language for probabilistic relational data". Data & Knowledge Engineering. 28: 107–120. doi:10.1016/S0169-023X(98)00015-9.
28. "Factorie - Probabilistic programming with imperatively-defined factor graphs - Google Project Hosting". google.com.
29. "PMTK3 - probabilistic modeling toolkit for Matlab/Octave, version 3 - Google Project Hosting". google.com.
30. "Alchemy - Open Source AI". washington.edu.
31. "Dyna". www.dyna.org.
32. "Charles River Analytics - Probabilistic Modeling Services". cra.com.
33. "Church". mit.edu.
34. "ProbLog: Probabilistic Programming". dtai.cs.kuleuven.be.
35. ProbaYes. "ProbaYes - Ensemble, nous valorisations vos données". probayes.com.
36. "Hakaru Home Page". hakaru-dev.github.io/.
37. "BAli-Phy Home Page". bali-phy.org.
38. "ProbCog". GitHub.
39. Culpepper, Ryan (January 17, 2017). "gamble: Probabilistic Programming" via GitHub.
40. "PWhile Compiler". GitHub.
41. "Tuffy: A Scalable Markov Logic Inference Engine". stanford.edu.
42. PyMC devs. "PyMC3". pymc-devs.github.io.
43. Developers, PyMC (May 17, 2018). "Theano, TensorFlow and the Future of PyMC". PyMC Developers. Retrieved January 25, 2019.
44. "greta: simple and scalable statistical modelling in R". GitHub. Retrieved October 2, 2018.
45. "Home — pomegranate 0.10.0 documentation". pomegranate.readthedocs.io. Retrieved October 2, 2018.
46. "Lea Home Page". bitbucket.org.
47. "WebPPL Home Page". github.com/probmods/webppl.
48. "The Turing language for probabilistic programming".
49. "Gen: A General Purpose Probabilistic Programming Language with Programmable Inference". Retrieved June 17, 2019.
50. "LF-PPL: A Low-Level First Order Probabilistic Programming Language for Non-Differentiable Models". ox.ac.uk.
51. "Troll dice roller and probability calculator".
52. "Edward – Home". edwardlib.org. Retrieved January 17, 2017.
53. TensorFlow (April 11, 2018). "Introducing TensorFlow Probability". TensorFlow. Retrieved October 2, 2018.
54. "'Edward2' TensorFlow Probability module". GitHub. Retrieved October 2, 2018.
55. "Pyro". pyro.ai. Retrieved February 9, 2018.
56. "CogComp - Home".
57. Rienstra, Tjitze (January 18, 2018), RankPL: A qualitative probabilistic programming language based on ranking theory, retrieved January 18, 2018
58. "Probabilistic Programming in Birch". birch-lang.org. Retrieved April 20, 2018.
59. "PSI Solver - Exact inference for probabilistic programs". psisolver.org. Retrieved August 18, 2019.
60. Gorinova, Maria I.; Sarkar, Advait; Blackwell, Alan F.; Syme, Don (January 1, 2016). A Live, Multiple-Representation Probabilistic Programming Environment for Novices. Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems. CHI '16. New York, NY, USA: ACM. pp. 2533–2537. doi:10.1145/2858036.2858221. ISBN 9781450333627.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.