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

前向模式自动微分在迭代与递归上的指称正确性

Denotational Correctness of Forward-Mode Automatic Differentiation for Iteration and Recursion

Matthijs Vákár

AI总结:

本文为含部分操作、惰性条件、迭代及项和类型递归的语言,基于微分空间与部分性单子,通过子余构造的语义逻辑关系,给出了前向模式自动微分宏的指称正确性证明,并引入带ωcpo结构的空间扩展至递归情形。

摘要:

我们为具有部分性来源(如部分操作、实参数上的惰性条件、迭代以及项和类型递归)的语言,给出了前向模式自动微分(AD)的语义正确性证明。我们首先在一个标准按值调用语言上定义一个AD宏,该语言包含用于光滑部分函数的若干原始操作以及实数条件和迭代的构造,该宏作为由其在原始操作上的作用决定的唯一保持结构的宏。我们用微分空间(diffeological spaces)为该语言定义语义,关键思想是利用一个合适的部分性单子。通过微分空间上的子余(subsconing)构造构建的语义逻辑关系论证,得出了所定义AD宏的正确性证明。一个关键洞见是,为了在余积类型上推理微分,我们使用构成层的那些关系。接下来,我们将语言扩展以包含项和类型递归。为了在我们的语义中对此建模,我们引入了一种新的空间概念,通过为微分空间配备一个相容的$ω$cpo结构,该概念适合同时建模递归和微分。我们证明了我们的整个发展可扩展到这一设定。通过使用语义而非句法的逻辑关系论证,我们绕过了针对类型递归的逻辑关系技术通常的繁琐细节。

英文摘要:

We present semantic correctness proofs of forward-mode Automatic Differentiation (AD) for languages with sources of partiality such as partial operations, lazy conditionals on real parameters, iteration, and term and type recursion. We first define an AD macro on a standard call-by-value language with some primitive operations for smooth partial functions and constructs for real conditionals and iteration, as a unique structure preserving macro determined by its action on the primitive operations. We define a semantics for the language in terms of diffeological spaces, where the key idea is to make use of a suitable partiality monad. A semantic logical relations argument, constructed through a subsconing construction over diffeological spaces, yields a correctness proof of the defined AD macro. A key insight is that, to reason about differentiation at sum types, we work with relations which form sheaves. Next, we extend our language with term and type recursion. To model this in our semantics, we introduce a new notion of space, suitable for modeling both recursion and differentiation, by equipping a diffeological space with a compatible $ω$cpo-structure. We demonstrate that our whole development extends to this setting. By making use of a semantic, rather than syntactic, logical relations argument, we circumvent the usual technicalities of logical relations techniques for type recursion.

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

↑