Effect Handlers for Programmable Inference
Effect Handlers for Programmable Inference
复制标题
用于可编程推理的效果处理程序
DOI:
10.1145/3609026.3609729
复制
发表时间:
2023
期刊:
影响因子:
--
通讯作者:
Nguyen M
中科院分区:
文献类型:
--
作者:
Nguyen M
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 calledinference 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, orinference 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 effectsvis-à-vismonad transformers as a structuring mechanism for modular imperative algorithm design.
登录
查看更多内容
影响因子:
--
作者:
Matsuda K
通讯作者:
Matsuda K
影响因子:
2.1
作者:
Beichl, I;Sullivan, F
通讯作者:
Sullivan, F
DOI:
--
发表时间:
2008
期刊:
--
影响因子:
--
作者:
A. Doucet;A. M. Johansen
通讯作者:
A. Doucet;A. M. Johansen
影响因子:
--
作者:
Minh Nguyen;Roly Perera;M. Wang;Nicolas Wu
通讯作者:
Minh Nguyen;Roly Perera;M. Wang;Nicolas Wu
DOI:
10.48550/arxiv.2212.11088
发表时间:
2022-12
期刊:
ArXiv
影响因子:
--
作者:
Birthe van den Berg;Tom Schrijvers;James McKinna;Alexander Vandenbroucke
通讯作者:
Birthe van den Berg;Tom Schrijvers;James McKinna;Alexander Vandenbroucke