一句话:提出基于代数效应的嵌入式 DSL,使概率模型模块化、可复用,并统一支持模拟与推断。
概率编程语言允许构建统计模型并模拟数据或执行推断,但许多 PPL 将模型限制在特定模拟或推断实例上,损害可复用性;另一些 PPL 中模型也难以组合。本文以 Haskell 为宿主语言,提出基于代数效应的嵌入式领域特定语言,使概率模型成为模块化、一等且可复用的构件,同时服务于模拟与推断。模拟与推断被自然地表达为使用代数效应处理器的可组合程序变换。该工作通过这种设计展示了模块化概率建模与统一后端的可能性。
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.
@article{paperbot1500,
title = {Modular probabilistic models via algebraic effects},
author = {Minh Nguyen and Roly Perera and Meng Wang and Nicolas Wu},
journal = {Proceedings of the ACM on Programming Languages},
volume = {6},
number = {ICFP},
year = {2022},
doi = {10.1145/3547635}
}