From high-level inference algorithms to efficient code

Author:

Walia Rajan1,Narayanan Praveen1,Carette Jacques2,Tobin-Hochstadt Sam1,Shan Chung-chieh1

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

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3