Affiliation:
1. Indiana University, USA
2. McMaster University, Canada
Abstract
Probabilistic programming languages are valuable because they allow domain experts to express probabilistic models and inference algorithms without worrying about irrelevant details. However, for decades there remained an important and popular class of probabilistic inference algorithms whose efficient implementation required manual low-level coding that is tedious and error-prone. They are algorithms whose idiomatic expression requires random array variables that are
latent
or whose likelihood is
conjugate
. Although that is how practitioners communicate and compose these algorithms on paper, executing such expressions requires
eliminating
the latent variables and
recognizing
the conjugacy by symbolic mathematics. Moreover, matching the performance of handwritten code requires speeding up loops by more than a constant factor.
We show how probabilistic programs that directly and concisely express these desired inference algorithms can be compiled while maintaining efficiency. We introduce new transformations that turn high-level probabilistic programs with arrays into pure loop code. We then make great use of domain-specific invariants and norms to optimize the code, and to specialize and JIT-compile the code per execution. The resulting performance is competitive with manual implementations.
Funder
Defense Advanced Research Projects Agency
National Science Foundation
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference75 articles.
1. Thomas Bayes. 1763. An Essay towards Solving a Problem in the Doctrine of Chances. Philosophical Transactions of the Royal Society of London 53 (1763) 370–418. Thomas Bayes. 1763. An Essay towards Solving a Problem in the Doctrine of Chances. Philosophical Transactions of the Royal Society of London 53 (1763) 370–418.
2. Michael Betancourt. 2017. A Conceptual Introduction to Hamiltonian Monte Carlo. e-Print 1701.02434. arXiv.org. https: //arxiv.org/abs/1701.02434 Michael Betancourt. 2017. A Conceptual Introduction to Hamiltonian Monte Carlo. e-Print 1701.02434. arXiv.org. https: //arxiv.org/abs/1701.02434
3. Conditional Expectation and Unbiased Sequential Estimation
4. Latent Dirichlet Allocation;Blei David M.;Journal of Machine Learning Research 3,2003
Cited by
6 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Compiling Probabilistic Programs for Variable Elimination with Information Flow;Proceedings of the ACM on Programming Languages;2024-06-20
2. StarfishDB: A Query Execution Engine for Relational Probabilistic Programming;Proceedings of the ACM on Management of Data;2024-05-29
3. Probabilistic Programming with Exact Conditions;Journal of the ACM;2023-11-11
4. Exact Recursive Probabilistic Programming;Proceedings of the ACM on Programming Languages;2023-04-06
5. λPSI: exact inference for higher-order probabilistic programs;Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation;2020-06-06