Expectation Programming

Building on ideas from probabilistic programming, we introduce the concept of an expectation programming framework (EPF) that automates the calculation of expectations. Analogous to a probabilistic program, an expectation program is comprised of a mix of probabilistic constructs and deterministic calculations that define a conditional distribution over its variables. However, the focus of the inference engine in an EPF is to directly estimate the resulting expectation of the program return values, rather than approximate the conditional distribution itself. This distinction allows us to achieve substantial performance improvements over the standard probabilistic programming pipeline by tailoring the inference to the precise expectation we care about. We realize a particular instantiation of our EPF concept by extending the probabilistic programming language Turing to allow so-called target-aware inference to be run automatically, and show that this leads to significant empirical gains compared to conventional posterior-based inference.

[1]  P. Moral,et al.  Sequential Monte Carlo samplers , 2002, cond-mat/0212648.

[2]  John K Kruschke,et al.  Bayesian data analysis. , 2010, Wiley interdisciplinary reviews. Cognitive science.

[3]  Xiao-Li Meng,et al.  Simulating Normalizing Constants: From Importance Sampling to Bridge Sampling to Path Sampling , 1998 .

[4]  A. Gelman,et al.  Rank-normalization, folding, and localization: An improved R-hat for assessing convergence Rank-Normalization, Folding, and Localization: An Improved (cid:2) R for Assessing Convergence of MCMC An assessing for assessing An improved (cid:2) R for assessing convergence of MCMC , 2020 .

[5]  Luca Martino,et al.  Advances in Importance Sampling , 2021, Wiley StatsRef: Statistics Reference Online.

[6]  Andrew Gelman,et al.  The No-U-turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo , 2011, J. Mach. Learn. Res..

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

[8]  Vikash K. Mansinghka,et al.  Gen: a general-purpose probabilistic programming system with programmable inference , 2019, PLDI.

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

[10]  Michael Betancourt,et al.  A Conceptual Introduction to Hamiltonian Monte Carlo , 2017, 1701.02434.

[11]  Thomas B. Schön,et al.  Automated learning with a probabilistic programming language: Birch , 2018, Annu. Rev. Control..

[12]  Thomas A. Henzinger,et al.  Probabilistic programming , 2014, FOSE.

[13]  Radford M. Neal Annealed importance sampling , 1998, Stat. Comput..

[14]  Kai Xu,et al.  AdvancedHMC.jl: A robust, modular and e cient implementation of advanced HMC algorithms , 2019, AABI.

[15]  Tom Rainforth,et al.  Automating inference, learning, and design using probabilistic programming , 2017 .

[16]  Tom Rainforth,et al.  Amortized Monte Carlo Integration , 2019, ICML.

[17]  Xiao-Li Meng,et al.  SIMULATING RATIOS OF NORMALIZING CONSTANTS VIA A SIMPLE IDENTITY: A THEORETICAL EXPLORATION , 1996 .

[18]  Man-Suk Oh,et al.  Adaptive importance sampling in monte carlo integration , 1992 .

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

[20]  Ohad Kammar,et al.  Semantics for probabilistic programming: higher-order functions, continuous distributions, and soft constraints , 2016, 2016 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS).

[21]  Joseph Hilbe,et al.  Data Analysis Using Regression and Multilevel/Hierarchical Models , 2009 .

[22]  Ruslan Salakhutdinov,et al.  On the Quantitative Analysis of Decoder-Based Generative Models , 2016, ICLR.

[23]  G. Torrie,et al.  Nonphysical sampling distributions in Monte Carlo free-energy estimation: Umbrella sampling , 1977 .

[24]  Hugo Larochelle,et al.  Efficient Learning of Deep Boltzmann Machines , 2010, AISTATS.

[25]  Hoon Kim,et al.  Monte Carlo Statistical Methods , 2000, Technometrics.

[26]  Radford M. Neal MCMC Using Hamiltonian Dynamics , 2011, 1206.1901.

[27]  Julien Riou,et al.  Bayesian workflow for disease transmission modeling in Stan , 2021, Statistics in medicine.

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

[29]  M. Evans,et al.  Methods for Approximating Integrals in Statistics with Special Emphasis on Bayesian Integration Problems , 1995 .

[30]  HighWire Press Proceedings of the Royal Society of London. Series A, Containing papers of a mathematical and physical character , 1934 .

[31]  Robert L. Wolpert,et al.  Monte Carlo Integration in Bayesian Statistical Analysis , 2007 .

[32]  Dustin Tran,et al.  Edward: A library for probabilistic modeling, inference, and criticism , 2016, ArXiv.

[33]  Christian P. Robert,et al.  Monte Carlo Statistical Methods (Springer Texts in Statistics) , 2005 .

[34]  Alan Edelman,et al.  Julia: A Fresh Approach to Numerical Computing , 2014, SIAM Rev..

[35]  Armando Solar-Lezama,et al.  A Language for Counterfactual Generative Models , 2021, ICML.

[36]  Ruslan Salakhutdinov,et al.  Evaluation methods for topic models , 2009, ICML '09.

[37]  Ming-Hui Chen,et al.  On Monte Carlo methods for estimating ratios of normalizing constants , 1997 .

[38]  W. O. Kermack,et al.  A contribution to the mathematical theory of epidemics , 1927 .

[39]  John Salvatier,et al.  Probabilistic programming in Python using PyMC3 , 2016, PeerJ Comput. Sci..

[40]  Luc De Raedt,et al.  Inference and learning in probabilistic logic programs using weighted Boolean formulas , 2013, Theory and Practice of Logic Programming.

[41]  Kilian Q. Weinberger,et al.  Target-Aware Bayesian Inference: How to Beat Optimal Conventional Estimators , 2020, J. Mach. Learn. Res..

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

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

[44]  Zoubin Ghahramani,et al.  Approximate inference for the loss-calibrated Bayesian , 2011, AISTATS.

[45]  Zoubin Ghahramani,et al.  Turing: A Language for Flexible Probabilistic Inference , 2018 .

[46]  Hongseok Yang,et al.  An Introduction to Probabilistic Programming , 2018, ArXiv.

[47]  Noah D. Goodman,et al.  Pyro: Deep Universal Probabilistic Programming , 2018, J. Mach. Learn. Res..