A model of stochastic memoization and name generation in probabilistic programming: categorical semantics via monads on presheaf categories

09/18/2023
by   Younesse Kaddar, et al.
0

Stochastic memoization is a higher-order construct of probabilistic programming languages that is key in Bayesian nonparametrics, a modular approach that allows us to extend models beyond their parametric limitations and compose them in an elegant and principled manner. Stochastic memoization is simple and useful in practice, but semantically elusive, particularly regarding dataflow transformations. As the naive implementation resorts to the state monad, which is not commutative, it is not clear if stochastic memoization preserves the dataflow property – i.e., whether we can reorder the lines of a program without changing its semantics, provided the dataflow graph is preserved. In this paper, we give an operational and categorical semantics to stochastic memoization and name generation in the context of a minimal probabilistic programming language, for a restricted class of functions. Our contribution is a first model of stochastic memoization of constant Bernoulli functions with a non-enumerable type, which validates data flow transformations, bridging the gap between traditional probability theory and higher-order probability models. Our model uses a presheaf category and a novel probability monad on it.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/19/2016

Semantics for probabilistic programming: higher-order functions, continuous distributions, and soft constraints

We study the semantic foundation of expressive probabilistic programming...
research
06/30/2021

A Domain-Theoretic Approach to Statistical Programming Languages

We give a domain-theoretic semantics to a statistical programming langua...
research
11/10/2018

A Domain Theory for Statistical Probabilistic Programming

We give an adequate denotational semantics for languages with recursive ...
research
03/02/2023

Separated and Shared Effects in Higher-Order Languages

Effectful programs interact in ways that go beyond simple input-output, ...
research
06/24/2022

Generative Datalog with Stable Negation

Extending programming languages with stochastic behaviour such as probab...
research
01/09/2023

Fast and Correct Gradient-Based Optimisation for Probabilistic Programming via Smoothing

We study the foundations of variational inference, which frames posterio...
research
06/27/2019

Efficient algorithms for modifying and sampling from a categorical distribution

Probabilistic programming languages and other machine learning applicati...

Please sign up or login with your details

Forgot password? Click here to reset