vix.ing · top · new · best · stats · spec

Affine Monads and Lazy Structures for Bayesian Programming

2022/12/14 by Swaraj Dash, Younesse Kaddar, Dash, Swaraj +5 · 1 citation
Computer Science · #Bayesian Modeling and Causal Inference #FOS: Computer and information sciences #Logic, Reasoning, and Knowledge #Machine Learning and Algorithms #Programming Languages (cs.PL)

paper · pdf · doi:10.48550/arxiv.2212.07250

openalex publication_date 2022/12/14 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

We show that streams and lazy data structures are a natural idiom for programming with infinite-dimensional Bayesian methods such as Poisson processes, Gaussian processes, jump processes, Dirichlet processes, and Beta processes. The crucial semantic idea, inspired by developments in synthetic probability theory, is to work with two separate monads: an affine monad of probability, which supports laziness, and a commutative, non-affine monad of measures, which does not. (Affine means that T(1)≅ 1.) We show that the separation is important from a decidability perspective, and that the recent model of quasi-Borel spaces supports these two monads. To perform Bayesian inference with these examples, we introduce new inference methods that are specially adapted to laziness; they are proven correct by reference to the Metropolis-Hastings-Green method. Our theoretical development is implemented as a Haskell library, LazyPPL.

Cited by

Related