Edinburgh Explorer Denotational validation of higher-order Bayesian inference

We present a modular semantic account of Bayesian inference algorithms for probabilistic programming languages, as used in data science and machine learning. Sophisticated inference algorithms are often explained in terms of composition of smaller parts. However, neither their theoretical justification nor their implementation reflects this modularity. We show how to conceptualise and analyse such inference algorithms as manipulating intermediate representations of probabilistic programs using higher-order functions and inductive types, and their denotational semantics. Semantic accounts of continuous distributions use measurable spaces. However, our use of higher-order functions presents a substantial technical difficulty: it is impossible to define a measurable space structure over the collection of measurable functions between arbitrary measurable spaces that is compatible with standard operations on those functions, such as function application. We overcome this difficulty using quasi-Borel spaces, a recently proposed mathematical structure that supports both function spaces and continuous distributions.Wedefine a class of semantic structures for representing probabilistic programs, and semantic validity criteria for transformations of these representations in terms of distribution preservation. We develop a collection of building blocks for composing representations. We use these building blocks to validate common inference algorithms such as Sequential Monte Carlo and Markov Chain Monte Carlo. To emphasize the connection between the semantic manipulation and its traditional measure theoretic origins, we use Kock’s synthetic measure theory. We demonstrate its usefulness by proving a quasi-Borel counterpart to the Metropolis-Hastings-Green theorem.

[1]  Norman Ramsey,et al.  Stochastic lambda calculus and monads of probability distributions , 2002, POPL '02.

[2]  R. Aumann Borel structures for function spaces , 1961 .

[3]  Claudio V. Russo,et al.  Tabular: a schema-driven probabilistic programming language , 2014, POPL.

[4]  A. Doucet,et al.  A Tutorial on Particle Filtering and Smoothing: Fifteen years later , 2008 .

[5]  G. Kelly A unified treatment of transfinite constructions for free algebras, free monoids, colimits, associated sheaves, and so on , 1980, Bulletin of the Australian Mathematical Society.

[6]  Matthias Felleisen,et al.  On the Expressive Power of Programming Languages , 1990, ESOP.

[7]  Sebastian Thrun,et al.  A probabilistic language based upon sampling functions , 2005, POPL '05.

[8]  Graham Hutton,et al.  A tutorial on the universality and expressiveness of fold , 1999, Journal of Functional Programming.

[9]  Marcelo Fiore,et al.  List Objects with Algebraic Structure , 2017, FSCD.

[10]  Jacques Carette,et al.  Probabilistic Inference by Program Transformation in Hakaru (System Description) , 2016, FLOPS.

[11]  A. Kock Strong functors and monoidal monads , 1972 .

[12]  Nicolai Schipper Jespersen,et al.  An Introduction to Markov Chain Monte Carlo , 2010 .

[13]  David Wingate,et al.  Automated Variational Inference in Probabilistic Programming , 2013, ArXiv.

[14]  A. Kock COMMUTATIVE MONADS AS A THEORY OF DISTRIBUTIONS , 2011, 1108.5952.

[15]  Frank D. Wood,et al.  A New Approach to Probabilistic Programming Inference , 2014, AISTATS.

[16]  J. H. Geuvers,et al.  Iteration and primitive recursion in categorical terms , 2007 .

[17]  Philip J. Scott,et al.  A categorical model for the geometry of interaction , 2006, Theor. Comput. Sci..

[18]  Dustin Tran,et al.  Deep Probabilistic Programming , 2017, ICLR.

[19]  Jiqiang Guo,et al.  Stan: A Probabilistic Programming Language. , 2017, Journal of statistical software.

[20]  Maciej Piróg,et al.  Eilenberg-Moore Monoids and Backtracking Monad Transformers , 2016, MSFP.

[21]  Chung-Kil Hur,et al.  A Provably Correct Sampler for Probabilistic Programs , 2015, FSTTCS.

[22]  Noah D. Goodman,et al.  Lightweight Implementations of Probabilistic Programming Languages Via Transformational Compilation , 2011, AISTATS.

[23]  Ohad Kammar,et al.  A convenient category for higher-order probability theory , 2017, 2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS).

[24]  Yura N. Perov,et al.  Venture: a higher-order probabilistic programming platform with programmable inference , 2014, ArXiv.

[25]  Joshua B. Tenenbaum,et al.  Church: a language for generative models , 2008, UAI.

[26]  Zoubin Ghahramani,et al.  Practical probabilistic programming with monads , 2015, Haskell.

[27]  F. Marmolejo,et al.  MONADS AS EXTENSION SYSTEMS |NO ITERATION IS NECESSARY , 2010 .

[28]  Andrew Gelman,et al.  Automatic Variational Inference in Stan , 2015, NIPS.

[29]  Lawrence M. Murray Bayesian State-Space Modelling on High-Performance Hardware Using LibBi , 2013, 1306.3277.

[30]  Bart Jacobs,et al.  From probability monads to commutative effectuses , 2018, J. Log. Algebraic Methods Program..

[31]  Sam Staton,et al.  Commutative Semantics for Probabilistic Programming , 2017, ESOP.

[32]  Mauro Javier Jaskelioff Lifting of operations in modular monadic semantics , 2009 .

[33]  Frank D. Wood,et al.  Inference Compilation and Universal Probabilistic Programming , 2016, AISTATS.

[34]  Chung-chieh Shan,et al.  Composing Inference Algorithms as Program Transformations , 2016, UAI.

[35]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[36]  Ugo Dal Lago,et al.  A lambda-calculus foundation for universal probabilistic programming , 2015, ICFP.