Reactive probabilistic programming

Synchronous modeling is at the heart of programming languages like Lustre, Esterel, or Scade used routinely for implementing safety critical control software, e.g., fly-by-wire and engine control in planes. However, to date these languages have had limited modern support for modeling uncertainty --- probabilistic aspects of the software's environment or behavior --- even though modeling uncertainty is a primary activity when designing a control system. In this paper we present ProbZelus the first synchronous probabilistic programming language. ProbZelus conservatively provides the facilities of a synchronous language to write control software, with probabilistic constructs to model uncertainties and perform inference-in-the-loop. We present the design and implementation of the language. We propose a measure-theoretic semantics of probabilistic stream functions and a simple type discipline to separate deterministic and probabilistic expressions. We demonstrate a semantics-preserving compilation into a first-order functional language that lends itself to a simple presentation of inference algorithms for streaming models. We also redesign the delayed sampling inference algorithm to provide efficient streaming inference. Together with an evaluation on several reactive applications, our results demonstrate that ProbZelus enables the design of reactive probabilistic applications and efficient, bounded memory inference.

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

[2]  David Broman,et al.  Automatic Alignment of Sequential Monte Carlo Inference in Higher-Order Probabilistic Programs , 2018, ArXiv.

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

[4]  Rainer Stiefelhagen,et al.  Evaluating Multiple Object Tracking Performance: The CLEAR MOT Metrics , 2008, EURASIP J. Image Video Process..

[5]  Tom Chen,et al.  Design and implementation , 2006, IEEE Commun. Mag..

[6]  Pascal Raymond,et al.  Lutin: A Language for Specifying and Executing Reactive Scenarios , 2008, EURASIP J. Embed. Syst..

[7]  Marc Pouzet,et al.  SCADE 6: A formal language for embedded critical software development (invited paper) , 2017, 2017 International Symposium on Theoretical Aspects of Software Engineering (TASE).

[8]  Marc Pouzet,et al.  Programmation d'Applications Réactives Probabilistes , 2020 .

[9]  Noah D. Goodman,et al.  C3: Lightweight Incrementalized MCMC for Probabilistic Programs using Continuations and Callsite Caching , 2015, AISTATS.

[10]  Nando de Freitas,et al.  Rao-Blackwellised Particle Filtering for Dynamic Bayesian Networks , 2000, UAI.

[11]  Eduardo D. Sontag,et al.  Mathematical Control Theory: Deterministic Finite Dimensional Systems , 1990 .

[12]  Paul Caspi Clocks in Dataflow Languages , 1992, Theor. Comput. Sci..

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

[14]  N. Gordon,et al.  Novel approach to nonlinear/non-Gaussian Bayesian state estimation , 1993 .

[15]  David Broman,et al.  Delayed Sampling and Automatic Rao-Blackwellization of Probabilistic Programs , 2017, AISTATS.

[16]  Sebastian Thrun,et al.  FastSLAM: a factored solution to the simultaneous localization and mapping problem , 2002, AAAI/IAAI.

[17]  Daniel Fink A Compendium of Conjugate Priors , 1997 .

[18]  Pascal Raymond,et al.  The synchronous data flow programming language LUSTRE , 1991, Proc. IEEE.

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

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

[21]  BiernackiDariusz,et al.  Clock-directed modular code generation for synchronous data-flow languages , 2008 .

[22]  Gilles Kahn,et al.  The Semantics of a Simple Language for Parallel Programming , 1974, IFIP Congress.

[23]  Marc Pouzet,et al.  Mixing signals and modes in synchronous data-flow systems , 2006, EMSOFT '06.

[24]  J. Gregory Morrisett,et al.  Compiling Markov chain Monte Carlo algorithms for probabilistic modeling , 2017, PLDI.

[25]  Timon Gehr,et al.  PSI: Exact Symbolic Inference for Probabilistic Programs , 2016, CAV.

[26]  R. E. Kalman,et al.  A New Approach to Linear Filtering and Prediction Problems , 2002 .

[27]  Stephen A. Edwards,et al.  The synchronous languages 12 years later , 2003, Proc. IEEE.

[28]  Gérard Berry,et al.  Real Time Programming: Special Purpose or General Purpose Languages , 1989, IFIP Congress.

[29]  Avi Pfeffer CTPPL: A Continuous Time Probabilistic Programming Language , 2009, IJCAI.

[30]  Marc Pouzet,et al.  Type-based initialization analysis of a synchronous dataflow language , 2004, International Journal on Software Tools for Technology Transfer.

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

[32]  Daniel Lundén Delayed sampling in the probabilistic programming language Anglican , 2017 .

[33]  David Tolpin,et al.  Design and Implementation of Probabilistic Programming Language Anglican , 2016, IFL 2016.

[34]  Marc Pouzet,et al.  Zélus: a synchronous language with ODEs , 2013, HSCC '13.

[35]  Avi Pfeffer Functional Specification of Probabilistic Process Models , 2005, AAAI.

[36]  Lei Li,et al.  Swift: Compiled Inference for Probabilistic Programming Languages , 2016, IJCAI.

[37]  MorrisettGreg,et al.  Compiling Markov chain Monte Carlo algorithms for probabilistic modeling , 2017 .

[38]  Tom Minka,et al.  Expectation Propagation for approximate Bayesian inference , 2001, UAI.

[39]  Andrew Thomas,et al.  The BUGS project: Evolution, critique and future directions , 2009, Statistics in medicine.

[40]  Pedro Zuidberg Dos Martires,et al.  Reactive Probabilistic Programming , 2019 .

[41]  Marc Pouzet,et al.  A Co-iterative Characterization of Synchronous Stream Functions , 1998, CMCS.

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

[43]  Andre Wibisono,et al.  Streaming Variational Bayes , 2013, NIPS.