Abstract
We develop the operational semantics of an untyped probabilistic λ-calculus with continuous distributions, and both hard and soft constraints,as a foundation for universal probabilistic programming languages such as Church, Anglican, and Venture. Our first contribution is to adapt the classic operational semantics of λ-calculus to a continuous setting via creating a measure space on terms and defining step-indexed approximations. We prove equivalence of big-step and small-step formulations of this distribution-based semantics. To move closer to inference techniques, we also define the sampling-based semantics of a term as a function from a trace of random samples to a value. We show that the distribution induced by integration over the space of traces equals the distribution-based semantics. Our second contribution is to formalize the implementation technique of trace Markov chain Monte Carlo (MCMC) for our calculus and to show its correctness. A key step is defining sufficient conditions for the distribution induced by trace MCMC to converge to the distribution-based semantics. To the best of our knowledge, this is the first rigorous correctness proof for trace MCMC for a higher-order functional language, or for a language with soft constraints.
- S. Bhat, J. Borgström, A. D. Gordon, and C. V. Russo. Deriving probability density functions from probabilistic functional programs. In N. Piterman and S. A. Smolka, editors, Proceedings of TACAS 2013, volume 7795 of LNCS, pages 508–522. Springer, 2013. Google Scholar
Digital Library
- P. Billingsley. Probability and Measure. Wiley-Interscience, third edition, 1995.Google Scholar
- A. Bizjak and L. Birkedal. Step-indexed logical relations for probability. In A. M. Pitts, editor, Proceedings of FoSSaCS 2015, volume 9034 of LNCS, pages 279–294. Springer, 2015.Google Scholar
- J. Borgström, U. Dal Lago, A. D. Gordon, and M. Szymczak. A lambdacalculus foundation for universal probabilistic programming (long version). CoRR, abs/1512.08990, 2015.Google Scholar
- P. Cousot and M. Monerau. Probabilistic abstract interpretation. In Proceedings of ESOP 2012, volume 7211 of LNCS, pages 166–190. Springer, 2012. Google Scholar
Digital Library
- V. Danos and T. Ehrhard. Probabilistic coherence spaces as a model of higher-order probabilistic computation. Information and Computation, 209(6):966–991, 2011. Google Scholar
Digital Library
- V. Danos and R. Harmer. Probabilistic game semantics. ACM Transactions on Computational Logic, 3(3):359–382, 2002. Google Scholar
Digital Library
- T. Ehrhard, C. Tasson, and M. Pagani. Probabilistic coherence spaces are fully abstract for probabilistic PCF. In Proceedings of POPL 2014, pages 309–320. ACM, 2014. Google Scholar
Digital Library
- S. Goldwasser and S. Micali. Probabilistic encryption. Journal of Computer and System Sciences, 28(2):270–299, 1984.Google Scholar
Cross Ref
- N. D. Goodman. The principles and practice of probabilistic programming. In Proceedings of POPL 2013, pages 399–402. ACM, 2013. Google Scholar
Digital Library
- N. D. Goodman and A. Stuhlmüller. The design and implementation of probabilistic programming languages. http://dippl.org, 2014.Google Scholar
- N. D. Goodman and J. B. Tenenbaum. Probabilistic models of cognition. http://probmods.org, 2014.Google Scholar
- N. D. Goodman, V. K. Mansinghka, D. M. Roy, K. Bonawitz, and J. B. Tenenbaum. Church: a language for generative models. In D. A. McAllester and P. Myllymäki, editors, Proceedings of UAI 2008, pages 220–229. AUAI Press, 2008.Google Scholar
- A. D. Gordon, T. A. Henzinger, A. V. Nori, and S. K. Rajamani. Probabilistic programming. In M. B. Dwyer and J. Herbsleb, editors, Proceedings of FOSE 2014, pages 167–181. ACM, 2014. Google Scholar
Digital Library
- W. K. Hastings. Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57:97–109, 1970.Google Scholar
Cross Ref
- M. D. Homan and A. Gelman. The no-u-turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research, 15:1593–1623, 2014. Google Scholar
Digital Library
- C. Hur, A. V. Nori, S. K. Rajamani, and S. Samuel. A provably correct sampler for probabilistic programs. In P. Harsha and G. Ramalingam, editors, Proceedings of FSTTCS 2015, volume 45 of LIPIcs, pages 475– 488. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2015.Google Scholar
- C. Jones. Probabilistic Non-determinism. PhD thesis, University of Edinburgh, 1990. Available as Technical Report CST-6390. Google Scholar
Digital Library
- C. Jones and G. D. Plotkin. A probabilistic powerdomain of evaluations. In Proceedings of LICS 1989, pages 186–195. ACM, 1989. Google Scholar
Digital Library
- O. Kiselyov. Problems of the lightweight implementation of probabilistic programming, 2016. Poster at PPS’2016 workshop. D. Kozen. Semantics of probabilistic programs. In Proceedings of FOCS 1979, pages 101–114. IEEE Computer Society, 1979. Google Scholar
Digital Library
- C. D. Manning and H. Schütze. Foundations of statistical natural language processing. MIT Press, 1999. Google Scholar
Digital Library
- V. K. Mansinghka, D. Selsam, and Y. N. Perov. Venture: a higherorder probabilistic programming platform with programmable inference. CoRR, abs/1404.0099, 2014.Google Scholar
- N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equations of state calculations by fast computing machines. Journal of Chemical Physics, 21(6):1087–1092, 1953.Google Scholar
Cross Ref
- A. V. Nori, C. Hur, S. K. Rajamani, and S. Samuel. R2: an efficient MCMC sampler for probabilistic programs. In C. E. Brodley and P. Stone, editors, Proceedings of AAAI 2014, pages 2476–2482. AAAI Press, 2014. Google Scholar
Digital Library
- P. Panangaden. The category of Markov kernels. Electronic Notes in Theoretical Computer Science, 22:171–187, 1999. In proceedings of PROBMIV 1998.Google Scholar
Cross Ref
- P. Panangaden. Labelled Markov Processes. Imperial College Press, 2009. Google Scholar
Digital Library
- S. Park, F. Pfenning, and S. Thrun. A probabilistic language based upon sampling functions. ACM Transactions on Programming Languages and Systems, 31:1, 2008. Google Scholar
Digital Library
- J. Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann, 1988. Google Scholar
Digital Library
- N. Ramsey and A. Pfeffer. Stochastic lambda calculus and monads of probability distributions. In Proceedings of POPL 2002, pages 154–165, 2002. Google Scholar
Digital Library
- S. J. Russell. Unifying logic and probability. Communications of the ACM, 58(7):88–97, 2015. Google Scholar
Digital Library
- A. Scibior, Z. Ghahramani, and A. D. Gordon. Practical probabilistic programming with monads. In B. Lippmeier, editor, Proceedings of Haskell 2015, pages 165–176. ACM, 2015. Google Scholar
Digital Library
- S. Staton, H. Yang, C. Heunen, O. Kammar, and F. Wood. Semantics for probabilistic programming: higher-order functions, continuous distributions, and soft constraints. CoRR, abs/1601.04943, 2016.Google Scholar
- S. Thrun. Robotic mapping: A survey. In G. Lakemeyer and B. Nebel, editors, Exploring artificial intelligence in the new millennium, pages 1–35. Morgan Kaufmann, 2002. Google Scholar
Digital Library
- L. Tierney. Markov chains for exploring posterior distributions. The Annals of Statistics, 22(4):1701–1728, 1994.Google Scholar
Cross Ref
- D. Tolpin, J. van de Meent, and F. Wood. Probabilistic programming in Anglican. In A. Bifet, M. May, B. Zadrozny, R. Gavaldà, D. Pedreschi, F. Bonchi, J. S. Cardoso, and M. Spiliopoulou, editors, Proceedings of ECML PKDD 2015, Part III, volume 9286 of LNCS, pages 308–311. Springer, 2015.Google Scholar
- N. Toronto, J. McCarthy, and D. V. Horn. Running probabilistic programs backwards. In J. Vitek, editor, Proceedings of ESOP 2015, volume 9032 of LNCS, pages 53–79. Springer, 2015.Google Scholar
- D. Wingate, A. Stuhlmüller, and N. D. Goodman. Lightweight implementations of probabilistic programming languages via transformational compilation. In G. J. Gordon and D. Dunson, editors, Proceedings of AISTATS 2011, volume 15 of JMLR: Workshop and Conference Proceedings, pages 770–778. JMLR, 2011.Google Scholar
Index Terms
A lambda-calculus foundation for universal probabilistic programming
Recommendations
A lambda-calculus foundation for universal probabilistic programming
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional ProgrammingWe develop the operational semantics of an untyped probabilistic λ-calculus with continuous distributions, and both hard and soft constraints,as a foundation for universal probabilistic programming languages such as Church, Anglican, and Venture. Our ...
Formal SOS-Proofs for the Lambda-Calculus
We describe in this paper formalisations for the properties of weakening, type-substitutivity, subject-reduction and termination of the usual big-step evaluation relation. Our language is the lambda-calculus whose simplicity allows us to show actual ...
Correctness of Sequential Monte Carlo Inference for Probabilistic Programming Languages
Programming Languages and SystemsAbstractProbabilistic programming is an approach to reasoning under uncertainty by encoding inference problems as programs. In order to solve these inference problems, probabilistic programming languages (PPLs) employ different inference algorithms, such ...







Comments