论文标题

向前模式自动差异的译本正确性的迭代和递归的正确性

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

论文作者

Vákár, Matthijs

论文摘要

我们提供了具有偏见源的语言的前向模式自动分化(AD)的语义正确性证明,例如部分操作,关于真实参数,迭代以及术语和类型递归的懒惰条件。我们首先在标准的逐个呼叫语言上定义了一个AD宏,并具有一些原始操作,用于平稳的部分功能和用于实际条件和迭代的构造,作为保留宏的独特结构,由其对原始操作的作用确定。我们在差异空间方面为语言定义了一种语义,其中关键思想是利用合适的偏见。通过在差异空间上的下构建构建的语义逻辑关系论点,产生了定义的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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源