一句话:证明不精确概率可直接复用标准 BDD 编译与加权模型计数,并以分级单子实现 Haskell 嵌入式 DSL Imp。
不精确概率把单一分布推广为分布的凸集,但此前人们认为概率语言需要为此改动底层推断流水线。本文指出这一推广实际上无需修改离散概率语言的标准 BDD 编译与加权模型计数流程:一次不精确的硬币投掷,不过是权重被留作自由变量而非固定的 BDD 变量。作者提出 Imp——一个嵌入 Haskell 的不精确概率编程 DSL,其语义由以「命名认知不确定性来源」的有限集为索引的分级单子给出;该分级单子恢复了标准凸幂集单子所缺失的交换性,并由 GHC 的类型系统在编译期进行强制。由于加权模型计数对半环参数化,同一份编译后的 BDD 可同时支撑精确推断、可微推断与区间有界推断。
Imprecise probability generalizes standard probability theory by replacing a single distribution with a convex set of possible distributions. We show that this generalization requires no change to the standard BDD compilation and weighted model counting pipeline used by discrete probabilistic languages. An imprecise coin flip is simply a BDD variable whose weight is left free rather than fixed. We introduce Imp, a Haskell-embedded DSL for imprecise probabilistic programming. A graded monad, indexed by finite sets of named sources of epistemic uncertainty, restores the commutativity that the standard convex powerset monad lacks, and GHC's type system enforces this at compile time. Weighted model counting is parametric in the semiring, so the same compiled BDD supports exact, differentiable, and interval-bounded inference.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@article{Liell-CockS26,
title = {Imprecise Probabilistic Programming, Precisely: Credal Sets via Graded Monads, BDDs, and Semiring-Parametric Inference (Functional Pearl)},
author = {Jack Liell-Cock and Sam Staton},
journal = {Proceedings of the ACM on Programming Languages},
volume = {10},
number = {ICFP},
year = {2026},
doi = {10.1145/3828698}
}