Probabilistic programming languages have recently gained a lot of attention, in particular due to their applications in domains such as machine learning and differential privacy. To establish invariants of interest, many such languages include some form of static checking in the form of type systems. However, adopting such a type discipline can be cumbersome or overly conservative. Gradual typing addresses this problem by supporting a smooth transition between static and dynamic checking, and has been successfully applied for languages with different constructs and type abstractions. Nevertheless, its benefits have never been explored in the context of probabilistic languages. In this work, we present and formalize GPLC, a gradual source probabilistic lambda calculus. GPLC includes a binary probabilistic choice operator and allows programmers to gradually introduce/remove static type -- and probability -- annotations. The static semantics of GPLC heavily relies on the notion of probabilistic couplings, as required for defining several relations, such as consistency, precision, and consistent transitivity. The dynamic semantics of GPLC is given via elaboration to the target language TPLC, which features a distribution-based semantics interpreting programs as probability distributions over final values. Regarding the language metatheory, we establish that TPLC -- and therefore also GPLC -- is type safe and satisfies two of the so-called refined criteria for gradual languages, namely, that it is a conservative extension of a fully static variant and that it satisfies the gradual guarantee, behaving smoothly with respect to type precision.


翻译:概率编程语言近年来备受关注,特别是在机器学习和差分隐私等领域的应用。为建立相关不变量,许多这类语言通过类型系统引入某种形式的静态检查。然而,采用此类类型规范可能显得繁琐或过于保守。渐进类型化通过支持静态与动态检查之间的平滑过渡解决了这一问题,并已成功应用于具有不同构造和类型抽象的语言中。尽管如此,其优势从未在概率语言背景下得到探索。本文提出并形式化了GPLC——一种渐进式源概率Lambda演算。GPLC包含二元概率选择算子,允许程序员逐步引入/移除静态类型与概率注释。GPLC的静态语义高度依赖概率耦合的概念,这是定义一致性、精确性及一致传递性等若干关系所必需的。GPLC的动态语义通过精化到目标语言TPLC实现,该目标语言采用基于分布的语义,将程序解释为最终值上的概率分布。在语言元理论方面,我们证明TPLC(从而GPLC)具有类型安全性,并满足渐进语言的所谓精细化准则中的两条:即它是完全静态变体的保守扩展,且满足渐进保证,在类型精确性方面表现平滑。

0
下载
关闭预览

相关内容

本话题关于日常用语「概率」,用于讨论生活中的运气、机会,及赌博、彩票、游戏中的「技巧」。关于抽象数学概念「概率」的讨论,请转 概率(数学)话题。
【新书】《实用概率编程》,458页pdf
专知会员服务
54+阅读 · 2024年10月23日
【IJCAI2022】代数和逻辑约束的混合概率推理,261页ppt
专知会员服务
26+阅读 · 2022年7月31日
【2022新书】机器学习中的概率数值计算,412页pdf
专知会员服务
93+阅读 · 2022年7月7日
【开放电子书】概率编程导论,301页pdf
专知会员服务
49+阅读 · 2021年10月21日
专知会员服务
74+阅读 · 2021年6月12日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
【干货书】概率,统计与数据,513页pdf
专知
36+阅读 · 2021年11月27日
【干货书】贝叶斯推断随机过程,449页pdf
专知
31+阅读 · 2020年8月27日
机器学习领域必知必会的12种概率分布(附Python代码实现)
算法与数学之美
21+阅读 · 2019年10月18日
一文读懂机器学习概率图模型(附示例&学习资源)
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
16+阅读 · 2013年12月31日
Arxiv
0+阅读 · 4月19日
VIP会员
最新内容
AutoScientists:自组织智能体团队驱动长期科学实验
战略前沿人工智能的再思考(中文)
专知会员服务
3+阅读 · 今天14:53
《量化地基防空系统间接效应的博弈论方法》
专知会员服务
3+阅读 · 今天14:51
“史诗怒火行动”中美军损失的作战飞机
专知会员服务
2+阅读 · 今天14:38
ICML 2026 | 理解上下文持续学习中的泛化与遗忘
专知会员服务
5+阅读 · 5月28日
Agent Harness综述:大模型智能体执行器工程全景
专知会员服务
13+阅读 · 5月28日
《基于理论的威慑效能评估》
专知会员服务
8+阅读 · 5月28日
相关VIP内容
【新书】《实用概率编程》,458页pdf
专知会员服务
54+阅读 · 2024年10月23日
【IJCAI2022】代数和逻辑约束的混合概率推理,261页ppt
专知会员服务
26+阅读 · 2022年7月31日
【2022新书】机器学习中的概率数值计算,412页pdf
专知会员服务
93+阅读 · 2022年7月7日
【开放电子书】概率编程导论,301页pdf
专知会员服务
49+阅读 · 2021年10月21日
专知会员服务
74+阅读 · 2021年6月12日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
16+阅读 · 2013年12月31日
Top
微信扫码咨询专知VIP会员