arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1810.07951cs.PL
收藏

不要展开伴随:区分SSA形式的程序

Don't Unroll Adjoint: Differentiating SSA-Form Programs

Michael Innes

摘要:

本文提出了基于源代码转换的反向模式算法微分(AD),特别是现代编译器使用的静态单赋值(SSA)形式。该方法可以支持控制流、嵌套、突变、递归、数据结构、高阶函数和其他语言构造,并且将输出提供给现有编译器以产生高效的差分代码。我们的实现是Julia语言的一个新的AD工具,称为Zygote,它提供了高级别的动态语义,同时透明地编译伴随代码。我们讨论了这种方法的好处,既可用性和性能的AD工具。

英文摘要:

This paper presents reverse-mode algorithmic differentiation (AD) based on source code transformation, in particular of the Static Single Assignment (SSA) form used by modern compilers. The approach can support control flow, nesting, mutation, recursion, data structures, higher-order functions, and other language constructs, and the output is given to an existing compiler to produce highly efficient differentiated code. Our implementation is a new AD tool for the Julia language, called Zygote, which presents high-level dynamic semantics while transparently compiling adjoint code under the hood. We discuss the benefits of this approach to both the usability and performance of AD tools.

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

↑