skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Reusable

Symbolic conditioning of arrays in probabilistic programs

Published:29 August 2017Publication History
Skip Abstract Section

Abstract

Probabilistic programming systems make machine learning more modular by automating inference. Recent work by Shan and Ramsey makes inference more modular by automating conditioning. Their technique uses a symbolic program transformation that treats conditioning generally via the measure-theoretic notion of disintegration. This technique, however, is limited to conditioning a single scalar variable. As a step towards modular inference for realistic machine learning applications, we have extended the disintegration algorithm to symbolically condition arrays in probabilistic programs. The extended algorithm implements lifted disintegration, where repetition is treated symbolically and without unrolling loops. The technique uses a language of index variables for tracking expressions at various array levels. We find that the method works well for arbitrarily-sized arrays of independent random choices, with the conditioning step taking time linear in the number of indices needed to select an element.

Skip Supplemental Material Section

Supplemental Material

References

  1. Nathanael L. Ackerman, Cameron E. Freer, and Daniel M. Roy. 2011. Noncomputable Conditional Distributions. In Proceedings of the 2011 IEEE 26th Annual Symposium on Logic in Computer Science (LICS ’11). IEEE Computer Society, Washington, DC, USA, 107–116. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Arthur Asuncion, Max Welling, Padhraic Smyth, and Yee-Whye Teh. 2009. On Smoothing and Inference for Topic Models. In UAI. http://www.ics.uci.edu/~asuncion/pubs/UAI_09.pdfGoogle ScholarGoogle Scholar
  3. Patrick Billingsley. 1995. Probability and Measure. John Wiley & Sons, New York.Google ScholarGoogle Scholar
  4. Wray L. Buntine. 1994. Operations for Learning with Graphical Models. J. Artif. Int. Res. 2, 1 (Dec. 1994), 159–225. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Jacques Carette and Chung-Chieh Shan. 2016. Simplifying Probabilistic Programs Using Computer Algebra. Springer International Publishing, Cham, 135–152. Google ScholarGoogle ScholarCross RefCross Ref
  6. George Casella and Edward I. George. 1992. Explaining the Gibbs Sampler. The American Statistician 46, 3 (1992), 167–174. http://www.jstor.org/stable/2685208Google ScholarGoogle Scholar
  7. Joseph T. Chang and David Pollard. 1997. Conditioning as Disintegration. Statistica Neerlandica 51, 3 (1997), 287–317. Google ScholarGoogle ScholarCross RefCross Ref
  8. Guillaume Claret, Sriram K. Rajamani, Aditya V. Nori, Andrew D. Gordon, and Johannes Borgström. 2013. Bayesian Inference Using Data Flow Analysis. Technical Report MSR-TR-2013-27. Microsoft Research. http://research.microsoft.com/apps/ pubs/default.aspx?id=171611Google ScholarGoogle Scholar
  9. Sebastian Fischer, Oleg Kiselyov, and Chung-chieh Shan. 2011. Purely Functional Lazy Nondeterministic Programming. Journal of Functional Programming 21, 4–5 (2011), 413–465.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Sebastian Fischer, Josep Silva, Salvador Tamarit, and Germán Vidal. 2008. Preserving Sharing in the Partial Evaluation of Lazy Functional Programs. In Revised Selected Papers from LOPSTR 2007: 17th International Symposium on Logic-Based Program Synthesis and Transformation (Lecture Notes in Computer Science). Springer, Berlin, 74–89. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Timon Gehr, Sasa Misailovic, and Martin Vechev. 2016. PSI: Exact Symbolic Inference for Probabilistic Programs. Springer International Publishing, Cham, 62–83. Google ScholarGoogle ScholarCross RefCross Ref
  12. Andrew Gelman, Daniel Lee, and Jiqiang Guo. 2015. Stan: A probabilistic programming language for Bayesian inference and optimization. (2015).Google ScholarGoogle ScholarCross RefCross Ref
  13. Noah D. Goodman, Vikash K. Mansinghka, Daniel M. Roy, Keith Bonawitz, and Joshua B. Tenenbaum. 2008. Church: a language for generative models. In Proc. of Uncertainty in Artificial Intelligence. http://danroy.org/papers/church_ GooManRoyBonTen-UAI-2008.pdfGoogle ScholarGoogle Scholar
  14. Alp Kucukelbir, Rajesh Ranganath, Andrew Gelman, and David M. Blei. 2015. Automatic Variational Inference in Stan. ArXiv e-prints (June 2015). arXiv: stat.ML/1506.03431Google ScholarGoogle Scholar
  15. John Launchbury. 1993. A Natural Semantics for Lazy Evaluation. In POPL’93: Proceedings of the 20th ACM SIGPLAN-SIG-ACT Symposium on Principles of Programming Languages. ACM Press, New York, 144–154. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Vikash K. Mansinghka, Daniel Selsam, and Yura N. Perov. 2014. Venture: a higher-order probabilistic programming platform with programmable inference. CoRR abs/1404.0099 (2014). http://arxiv.org/abs/1404.0099Google ScholarGoogle Scholar
  17. Andrew McCallum, Karl Schultz, and Sameer Singh. 2009. FACTORIE: Probabilistic Programming via Imperatively Defined Factor Graphs. In Neural Information Processing Systems (NIPS).Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Brian Milch, Bhaskara Marthi, Stuart Russell, David Sontag, Daniel L. Ong, and Andrey Kolobov. 2007. BLOG: Probabilistic Models with Unknown Objects. In Statistical Relational Learning, Lise Getoor and Ben Taskar (Eds.). MIT Press. http: //sites.google.com/site/bmilch/papers/blog-chapter.pdfGoogle ScholarGoogle Scholar
  19. Tom Minka, John M. Winn, John P. Guiver, Sam Webster, Yordan Zaykov, Boris Yangel, Alexander. Spengler, and John Bronskill. 2014. Infer.NET 2.6. (2014). http://research.microsoft.com/infernet Microsoft Research Cambridge.Google ScholarGoogle Scholar
  20. Praveen Narayanan, Jacques Carette, Wren Romano, Chung-chieh Shan, and Robert Zinkov. 2016. Probabilistic Inference by Program Transformation in Hakaru (System Description). In Functional and Logic Programming: 13th International Symposium, FLOPS 2016 (Lecture Notes in Computer Science). Springer, Berlin, 62–79.Google ScholarGoogle ScholarCross RefCross Ref
  21. Aditya V. Nori, Chung-Kil Hur, Sriram K. Rajamani, and Selva Samuel. 2014. R2: An Efficient MCMC Sampler for Probabilistic Programs. In Proceedings of the 28th AAAI Conference on Artificial Intelligence. AAAI Press, 2476–2482.Google ScholarGoogle ScholarCross RefCross Ref
  22. David Pollard. 2001. A User’s Guide to Measure Theoretic Probability. Cambridge University Press, Cambridge. Google ScholarGoogle ScholarCross RefCross Ref
  23. Philip Resnik and Eric Hardisty. 2009. Gibbs Sampling for the Uninitiated. (2009).Google ScholarGoogle Scholar
  24. Chung-chieh Shan and Norman Ramsey. 2017. Exact Bayesian Inference by Symbolic Disintegration. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017). ACM, New York, NY, USA, 130–144. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Mark Steyvers and Tom Griffiths. 2006. Probabilistic Topic Models. In Latent Semantic Analysis: A Road to Meaning., T. Landauer, D. Mcnamara, S. Dennis, and W. Kintsch (Eds.). Laurence Erlbaum. http://cocosci.berkeley.edu/tom/papers/ SteyversGriffiths.pdfGoogle ScholarGoogle Scholar
  26. Luke Tierney. 1998. A Note on Metropolis-Hastings Kernels for General State Spaces. The Annals of Applied Probability 8, 1 (1998), 1–9. Google ScholarGoogle ScholarCross RefCross Ref
  27. David Wingate, Andreas Stuhlmüller, and Noah D. Goodman. 2011. Lightweight Implementations of Probabilistic Programming Languages Via Transformational Compilation. In Proceedings of AISTATS 2011: 14th International Conference on Artificial Intelligence and Statistics (JMLR Workshop and Conference Proceedings). MIT Press, Cambridge, 770–778.Google ScholarGoogle Scholar
  28. David Wingate and Theo Weber. 2013. Automated Variational Inference in Probabilistic Programming. ArXiv e-prints (Jan. 2013). arXiv: stat.ML/1301.1299Google ScholarGoogle Scholar
  29. Frank Wood, Jan Willem van de Meent, and Vikash Mansinghka. 2014. A New Approach to Probabilistic Programming Inference. In Proceedings of the 17th International conference on Artificial Intelligence and Statistics. 1024–1032.Google ScholarGoogle Scholar

Index Terms

  1. Symbolic conditioning of arrays in probabilistic programs

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image Proceedings of the ACM on Programming Languages
          Proceedings of the ACM on Programming Languages  Volume 1, Issue ICFP
          September 2017
          1173 pages
          EISSN:2475-1421
          DOI:10.1145/3136534
          Issue’s Table of Contents

          Copyright © 2017 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 29 August 2017
          Published in pacmpl Volume 1, Issue ICFP

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader