JAX自动微分:线性逻辑视角(扩展版)
JAX Autodiff from a Linear Logic Perspective (Extended Version)
AI总结:
本文提出将自动微分编码到与Girard线性逻辑对应的线性λ-演算中,证明编码在定性与定量上可靠,并揭示解压变换并非必需。
摘要:
自动微分(Autodiff)是JAX和Dex等项目中开发的自动微分系统的核心。最近,Radul等人在arXiv:2204.10923中用一个线性类型演算对自动微分进行了形式化。尽管这种形式化足以表达自动微分的主要程序变换,但该演算对此任务过于特定,且尚不清楚其类型系统是否产生了一种本身具有研究价值的子结构逻辑。我们提出将自动微分编码到一个线性λ-演算中,该演算与Girard的线性逻辑具有Curry-Howard对应关系。我们证明了该编码在定性上(编码后的项与原项外延等价)和定量上(编码保持了arXiv:2204.10923中描述的原始工作成本)都是可靠的。作为副产品,我们表明用于实现自动微分中反向传播的变换之一——解压(unzipping)——实际上是可选的。
英文摘要:
Autodiff refers to the core of the automatic differentiation systems developed in projects like JAX and Dex. Autodiff has recently been formalised in a linear typed calculus by Radul et al in arXiv:2204.10923. Although this formalisation suffices to express the main program transformations of Autodiff, the calculus is very specific to this task, and it is not clear whether the type system yields a substructural logic that has interest on its own. We propose an encoding of Autodiff into a linear $λ$-calculus that enjoys a Curry-Howard correspondence with Girard's linear logic. We prove that the encoding is sound both qualitatively (the encoded terms are extensionally equivalent to the original ones) and quantitatively (the encoding preserves the original work cost as described in arXiv:2204.10923). As a byproduct, we show that unzipping, one of the transformations used to implement backpropagation in Autodiff, is, in fact, optional.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。