Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/2892753.2892895guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

R2: an efficient MCMC sampler for probabilistic programs

Published: 27 July 2014 Publication History

Abstract

We present a new Markov Chain Monte Carlo (MCMC) sampling algorithm for probabilistic programs. Our approach and tool, called R2, has the unique feature of employing program analysis in order to improve the efficiency of MCMC sampling. Given an input program P, R2 propagates observations in P backwards to obtain a semantically equivalent program P′ in which every probabilistic assignment is immediately followed by an observe statement. Inference is performed by a suitably modified version of the Metropolis-Hastings algorithm that exploits the structure of the program P′. This has the overall effect of preventing rejections due to program executions that fail to satisfy observations in P. We formalize the semantics of probabilistic programs and rigorously prove the correctness of R2. We also empirically demonstrate the effectiveness of R2--in particular, we show that R2 is able to produce results of similar quality as the CHURCH and STAN probabilistic programming tools with much shorter execution time.

References

[1]
Chaganty, A. T.; Nori, A. V.; and Rajamani, S. K. 2013. Efficiently sampling probabilistic programs via program analysis. International Conference on Artificial Intelligence and Statistics (AISTATS).
[2]
Chib, S., and Greenberg, E. 1995. Understanding the Metropolis-Hastings algorithm. American Statistician 49(4):327-335.
[3]
de Moura, L., and Bjorner, N. 2008. Z3: An Efficient SMT Solver. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 337-340.
[4]
Dijkstra, E.W. 1976. A Discipline of Programming. Prentice Hall.
[5]
Gilks, W. R.; Thomas, A.; and Spiegelhalter, D. J. 1994. A language and program for complex Bayesian modelling. The Statistician 43(1):169-177.
[6]
Goodman, N. D.; Mansinghka, V. K.; Roy, D. M.; Bonawitz, K.; and Tenenbaum, J. B. 2008. Church: a language for generative models. In Uncertainty in Artificial Intelligence (UAI), 220-229.
[7]
Herbrich, R.; Minka, T.; and Graepel, T. 2006. TrueSkill: A Bayesian skill rating system. In Neural Information Processing Systems (NIPS), 569-576.
[8]
Hoffman, M. D., and Gelman, A. 2013. The no-U-turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research in press.
[9]
Kiselyov, O., and Shan, C. 2009. Monolingual probabilistic programming using generalized coroutines. In Uncertainty in Artificial Intelligence (UAI), 285-292.
[10]
Kok, S.; Sumner, M.; Richardson, M.; Singla, P.; Poon, H.; Lowd, D.; and Domingos, P. 2007. The Alchemy system for Statistical Relational AI. Technical report, University of Washington.
[11]
Koller, D., and Friedman, N. 2009. Probabilistic Graphical Models: Principles and Techniques - Adaptive Computation and Machine Learning. The MIT Press.
[12]
Koller, D.; McAllester, D. A.; and Pfeffer, A. 1997. Effective Bayesian inference for stochastic programs. In National Conference on Artificial Intelligence (AAAI), 740-747.
[13]
Milch, B., and Russell, S. J. 2006. General-purpose MCMC inference over relational structures. In Uncertainty in Artificial Intelligence(UAI).
[14]
Minka, T.; Winn, J.; Guiver, J.; and Kannan, A. 2009. Infer. NET 2.3.
[15]
Moldovan, B.; Thon, I.; Davis, J.; and Raedt, L. D. 2013. MCMC estimation of conditional probabilities in probabilistic programming languages. In Symbolic and Quantitative Approaches to Reasoning with Uncertainty (ECSQARU), 436-448.
[16]
Neal, R. M. 2010. MCMC using Hamiltonian dynamics. In Handbook of Markov Chain Monte Carlo.
[17]
Pearl, J. 1996. Probabilistic Reasoning in Intelligence Systems. Morgan Kaufmann.
[18]
Pfeffer, A. 2007a. The design and implementation of IBAL: A general-purpose probabilistic language. In Statistical Relational Learning, 399-432.
[19]
Pfeffer, A. 2007b. A general importance sampling algorithm for probabilistic programs. Technical report, Harvard University TR-12-07.
[20]
Raedt, L. D.; Kimmig, A.; and Toivonen, H. 2007. ProbLog: A probabilistic prolog and its application in link discovery. In International Joint Conference on Artificial Intelligence (IJCAI), 2462-2467.
[21]
Stan Development Team. 2013. Stan Modeling Language User's Guide and Reference Manual, Version 1.3.
[22]
Wingate, D.; Goodman, N. D.; Stuhlmüller, A.; and Siskind, J. M. 2011. Nonstandard interpretations of probabilistic programs for efficient inference. In Neural Information Processing Systems (NIPS), 1152-1160.
[23]
Wingate, D.; Stuhlmüller, A.; and Goodman, N. D. 2011. Lightweight implementations of probabilistic programming languages via transformational compilation. International Conference on Artificial Intelligence and Statistics (AISTATS) 15:770-778.

Cited By

View all
  • (2024)Statically and Dynamically Delayed Sampling for Typed Probabilistic Programming LanguagesProceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3687997.3695634(157-170)Online publication date: 17-Oct-2024
  • (2021)Symbolic parallel adaptive importance sampling for probabilistic program analysisProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468593(1166-1177)Online publication date: 20-Aug-2021
  • (2019)From high-level inference algorithms to efficient codeProceedings of the ACM on Programming Languages10.1145/33417023:ICFP(1-30)Online publication date: 26-Jul-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
AAAI'14: Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence
July 2014
3155 pages

Publisher

AAAI Press

Publication History

Published: 27 July 2014

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Statically and Dynamically Delayed Sampling for Typed Probabilistic Programming LanguagesProceedings of the 17th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3687997.3695634(157-170)Online publication date: 17-Oct-2024
  • (2021)Symbolic parallel adaptive importance sampling for probabilistic program analysisProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468593(1166-1177)Online publication date: 20-Aug-2021
  • (2019)From high-level inference algorithms to efficient codeProceedings of the ACM on Programming Languages10.1145/33417023:ICFP(1-30)Online publication date: 26-Jul-2019
  • (2019)Storm: program reduction for testing and debugging probabilistic programming systemsProceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3338906.3338972(729-739)Online publication date: 12-Aug-2019
  • (2019)Scenic: a language for scenario specification and scene generationProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314633(63-78)Online publication date: 8-Jun-2019
  • (2019)Incremental precision-preserving symbolic inference for probabilistic programsProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314623(237-252)Online publication date: 8-Jun-2019
  • (2019)Probabilistic programming with densities in SlicStan: efficient, flexible, and deterministicProceedings of the ACM on Programming Languages10.1145/32903483:POPL(1-30)Online publication date: 2-Jan-2019
  • (2018)Bayonet: probabilistic inference for networksACM SIGPLAN Notices10.1145/3296979.319240053:4(586-602)Online publication date: 11-Jun-2018
  • (2018)Functional programming for modular Bayesian inferenceProceedings of the ACM on Programming Languages10.1145/32367782:ICFP(1-29)Online publication date: 30-Jul-2018
  • (2018)Testing probabilistic programming systemsProceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3236024.3236057(574-586)Online publication date: 26-Oct-2018
  • Show More Cited By

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media