[论文解读] A Domain-Theoretic Approach to Statistical Programming Languages
本文提出了一种基于精确实数域上最小赋值的简单、范畴论式的统计编程语言语义,该语义基于完全偏序集(dcpo)上的精确实数,支持连续分布、软约束和完整递归,且能实现交换幺半群。其核心贡献在于证明了所有实值测度(包括非紧致和非连续的测度)均可通过精确实数域上的最小赋值进行建模,从而确保程序变换(如独立随机抽样的重排)的正确性。
We give a domain-theoretic semantics to a statistical programming language, using the plain old category of dcpos, in contrast to some more sophisticated recent proposals. Remarkably, our monad of minimal valuations is commutative, which allows for program transformations that permute the order of independent random draws, as one would expect. A similar property is not known for Jones and Plotkin' s monad of continuous valuations. Instead of working with true real numbers, we work with exact real arithmetic, providing a bridge towards possible implementations. (Implementations by themselves are not addressed here.) Rather remarkably, we show that restricting ourselves to minimal valuations does not restrict us much: all measures on the real line can be modeled by minimal valuations on the domain $\mathbf{I}\mathbb{R}_\bot$ of exact real arithmetic. We give three operational semantics for our language, and we show that they are all adequate with respect to the denotational semantics. We also explore quite a few examples in order to demonstrate that our semantics computes exactly as one would expect, and in order to debunk the myth that a semantics based on continuous maps would not be expressive enough to encode measures with non-compact support using only measures with compact support, or to encode measures via non-continuous density functions, for instance. Our examples also include some useful, non-trivial cases of distributions on higher-order objects.
研究动机与目标
- 开发一种简单、纯粹范畴论式的统计编程语言指称语义,避免使用诸如拟博雷尔空间等复杂的范畴论构造。
- 证明在精确实数域上的最小赋值可以建模实直线上所有博雷尔测度,包括具有非紧致支集和非连续密度的测度。
- 在完全偏序集范畴上建立最小赋值的交换幺半群,以支持正确的程序变换,如独立随机抽样的重排。
- 通过使用基于区间的实数表示法,弥合指称语义与可实现的精确实数算术之间的鸿沟。
- 证明基于求值、归约和传递连续风格的运算语义在标准假设下均与指称语义一致。
提出的方法
- 使用完全偏序集 $\mathbf{I}\mathbb{R}_{\bot}$ 表示精确实数,确保与范畴论语义的兼容性。
- 在 $\mathbf{Dcpo}$ 上定义最小赋值的幺半群,证明其具有交换性,从而支持类似富比尼-施坦纳定理的推理,并确保独立随机抽样重排的正确性。
- 使用最小赋值建模连续分布和软约束(通过 $\mathtt{score}$ 实现),这些赋值是无界的,支持在非紧致集合上的积分。
- 构建三种运算语义——基于求值、基于归约和传递连续风格——并在适当假设下证明其与指称语义一致。
- 利用 Jia 和 Mislove 的 $K$-完备化构造与点连续赋值,确保幺半群在完全偏序集上具有交换性和良好行为。
- 通过建模高阶分布和非平凡测度(包括具有非连续密度函数的测度)来展示语义的表达能力。
实验结果
研究问题
- RQ1基于最小赋值的纯粹范畴论式语义能否建模 $\mathbb{R}$ 上所有博雷尔测度,包括具有非紧致支集的测度?
- RQ2在 $\mathbf{Dcpo}$ 上的最小赋值幺半群是否具有交换性,从而确保程序中独立随机抽样重排的正确性?
- RQ3精确实数算术能否自然地集成到统计编程的范畴论语义中?其是否支持完整递归和连续分布?
- RQ4在标准假设下,基于求值、归约和传递连续风格的多种运算语义是否与指称语义一致?
- RQ5能否使用最小赋值语义化非连续密度函数和复杂的高阶分布?
主要发现
- 所有 $\mathbb{R}$ 上的博雷尔测度,包括勒贝格测度和具有非紧致支集的测度,均可表示为 $\mathbf{I}\mathbb{R}_{\bot}$ 上的最小赋值,尽管最小赋值是连续赋值的一个真子集。
- 在 $\mathbf{Dcpo}$ 上的最小赋值幺半群具有交换性,从而确保程序变换中独立随机抽样重排的正确性并保持语义不变。
- 基于求值、基于归约和传递连续风格的三种运算语义在常量的自然假设下,均与指称语义一致,具有可靠性和完备性。
- 在 $\mathbf{I}\mathbb{R}_{\bot}$ 中使用基于区间的精确实数算术,为实现提供了自然桥梁,同时保持了对连续分布和软约束的完整表达能力。
- 该语义成功建模了非平凡的高阶分布和具有非连续密度函数的测度,打破了‘范畴论中连续映射表达能力有限’的误解。
- 通过 $K$-完备化与点连续性构造最小赋值,确保了幺半群的交换性,解决了早期范畴论方法在概率编程中面临的关键挑战。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。