Practical Probabilistic Programming with Monads
Gordon, Andrew D
Proceedings of the 8th ACM SIGPLAN Symposium on Haskell
MetadataShow full item record
Scibior, A., Ghahramani, Z., & Gordon, A. D. (2015). Practical Probabilistic Programming with Monads. Proceedings of the 8th ACM SIGPLAN Symposium on Haskell, 165-176. https://doi.org/10.1145/2804302.2804317
The machine learning community has recently shown a lot of interest in practical probabilistic programming systems that target the problem of Bayesian inference. Such systems come in different forms, but they all express probabilistic models as computational processes using syntax resembling programming languages. In the functional programming community monads are known to offer a convenient and elegant abstraction for programming with probability distributions, but their use is often limited to very simple inference problems. We show that it is possible to use the monad abstraction to construct probabilistic models for machine learning, while still offering good performance of inference in challenging models. We use a GADT as an underlying representation of a probability distribution and apply Sequential Monte Carlo-based methods to achieve efficient inference. We define a formal semantics via measure theory. We demonstrate a clean and elegant implementation that achieves performance comparable with Anglican, a state-of-the-art probabilistic programming system.
Haskell, probabilistic programming, Bayesian statistics, monads, Monte Carlo
The first author is supported by EPSRC and the Cambridge Trust.
External DOI: https://doi.org/10.1145/2804302.2804317
This record's URL: https://www.repository.cam.ac.uk/handle/1810/249132