ICFP 2023
Mon 4 - Sat 9 September 2023 Seattle, Washington, United States
Fri 8 Sep 2023 11:00 - 11:30 at B - Fifth Avenue - Haskell: Session 1 Chair(s): Edsko de Vries

Inference algorithms for probabilistic programming are complex imperative programs with many moving parts. Efficient inference often requires customising an algorithm to a particular probabilistic model or problem, sometimes called \emph{inference programming}. Most inference frameworks are implemented in languages that lack a disciplined approach to side effects, which can result in monolithic implementations where the structure of the algorithms is obscured and inference programming is hard. Functional programming with typed effects offers a more structured and modular foundation for programmable inference, with monad transformers being the primary structuring mechanism explored to date.

This paper presents an alternative approach to inference programming based on algebraic effects. Using effect signatures to specify the key operations of the algorithms, and effect handlers to modularly interpret those operations for specific variants, we develop two abstract algorithms, or \emph{inference patterns}, representing two important classes of inference: Metropolis-Hastings and particle filtering. We show how our approach reveals the algorithms’ high-level structure, and makes it easy to tailor and recombine their parts into new variants. We implement the two inference patterns as a Haskell library, and discuss the pros and cons of algebraic effects \emph{vis-`a-vis} monad transformers as a structuring mechanism for modular imperative algorithm design.

Fri 8 Sep

Displayed time zone: Pacific Time (US & Canada) change

11:00 - 12:30
Haskell: Session 1Haskell at B - Fifth Avenue
Chair(s): Edsko de Vries Well-Typed LLP
11:00
30m
Talk
Effect Handlers for Programmable Inference
Haskell
Minh Nguyen University of Bristol, Roly Perera Alan Turing Institute, Meng Wang University of Bristol, Steven Ramsay University of Bristol
DOI
11:30
30m
Talk
The Essence of Reactivity
Haskell
Ivan Perez NASA Ames Research Center, Frank Dedden System F Computing
DOI
12:00
30m
Talk
This Is Driving Me Loopy: Efficient Loops in Arrowized Functional Reactive Programs
Haskell
Finnbar Keating University of Warwick, Michael Gale GitHub
DOI