# Modular Probabilistic Models via Algebraic Effects

arXiv: https://arxiv.org/abs/2203.04608 · HTML: https://mlsanity.com/paper/2203.04608/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 9 Mar 2022.

## Built on by (most cited first, 1 of 1)

- [Representing Molecules with Algebraic Data Types: Beyond SMILES and SELFIES](https://mlsanity.com/paper/2501.13633/) (2025)

## Abstract (arXiv)

Probabilistic programming languages (PPLs) allow programmers to construct statistical models and then simulate data or perform inference over them. Many PPLs restrict models to a particular instance of simulation or inference, limiting their reusability. In other PPLs, models are not readily composable. Using Haskell as the host language, we present an embedded domain specific language based on algebraic effects, where probabilistic models are modular, first-class, and reusable for both simulation and inference. We also demonstrate how simulation and inference can be expressed naturally as composable program transformations using algebraic effect handlers.
