English

Modular Probabilistic Models via Algebraic Effects

Programming Languages 2024-12-24 v5

Abstract

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.

Keywords

Cite

@article{arxiv.2203.04608,
  title  = {Modular Probabilistic Models via Algebraic Effects},
  author = {Minh Nguyen and Roly Perera and Meng Wang and Nicolas Wu},
  journal= {arXiv preprint arXiv:2203.04608},
  year   = {2024}
}
R2 v1 2026-06-24T10:07:04.657Z