arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.05246cs.PL
收藏

渐进概率λ演算

A Gradual Probabilistic Lambda Calculus

University of Chile(智利大学);Millennium Institute of Foundational Research on Data (IMFD)(数据基础研究千年研究所);National University of Singapore(新加坡国立大学)

Matías Toro, Federico Olmedo, Wenjia Ye

AI总结:

本文提出并形式化了GPLC,一种渐进源概率λ演算,通过二元概率选择运算符实现静态与动态检查的渐进过渡,支持渐进引入/移除类型和概率注解,证明了其类型安全性和渐进保证。

摘要:

概率编程语言近年来因在机器学习和差分隐私等领域的应用而受到广泛关注。许多此类语言通过类型系统实现静态检查以建立不变量。然而,采用此类类型纪律可能繁琐或过于保守。渐进类型通过支持静态与动态检查之间的平滑过渡,已成功应用于不同构造和类型抽象的语言。然而,其在概率语言中的益处从未被探索。本文提出并形式化了GPLC,一种渐进源概率λ演算。GPLC包含二元概率选择运算符,允许程序员渐进引入/移除静态类型和概率注解。GPLC的静态语义严重依赖概率耦合的概念,以定义一致性、精度和一致传递性等关系。GPLC的动态语义通过扩展到目标语言TPLC实现,TPLC具有基于分布的语义,将程序解释为最终值的概率分布。在语言元理论方面,我们证明TPLC(因此也证明GPLC)是类型安全的,并满足渐进语言的两个所谓精炼标准,即它是完全静态变体的保守扩展,并满足渐进保证,行为与类型精度平滑相关。

英文摘要:

Probabilistic programming languages extend ordinary programming languages with the ability to sample values from probability distributions. Type systems can establish invariants of such programs, for instance by assigning to a program a distribution over types that specifies the probability of each kind of outcome. 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 GLANG, a gradual source probabilistic lambda calculus. GLANG includes a binary probabilistic choice operator and allows programmers to gradually introduce/remove static type---and probability---annotations. The static semantics of GLANG 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 GLANG is given via elaboration to the target language TLANG, which features a distribution-based semantics interpreting programs as probability distributions over final values. Regarding the language metatheory, we establish that TLANG---and therefore also GLANG---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 (a restricted form of) the gradual guarantee, behaving smoothly with respect to type precision. The metatheory is mechanized in the Lean 4 proof assistant.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑