Lune

POPL2024顶会

Efficient CHAD

Tom Smeding, Matthijs Vákár

摘要

We show how the basic Combinatory Homomorphic Automatic Differentiation (CHAD) algorithm can be optimised, using well-known methods, to yield a simple, composable, and generally applicable reverse-mode automatic differentiation (AD) technique that has the correct computational complexity that we would expect of reverse-mode AD. Specifically, we show that the standard optimisations of sparse vectors and state-passing style code (as well as defunctionalisation/closure conversion, for higher-order languages) give us a purely functional algorithm that is most of the way to the correct complexity, with (functional) mutable updates taking care of the final log-factors. We provide an Agda formalisation of our complexity proof. Finally, we discuss how the techniques apply to differentiating parallel functional array programs: the key observations are 1) that all required mutability is (commutative, associative) accumulation, which lets us preserve task-parallelism and 2) that we can write down data-parallel derivatives for most data-parallel array primitives.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • You Only Linearize Once: Tangents Transpose to Gradients 引用了 Provably correct, asymptotically efficient, higher-order reverse-mode automatic differentiation
  • JAX Autodiff from a Linear Logic Perspective 引用了 You Only Linearize Once: Tangents Transpose to Gradients
  • JAX Autodiff from a Linear Logic Perspective 引用了 Provably correct, asymptotically efficient, higher-order reverse-mode automatic differentiation
  • JAX Autodiff from a Linear Logic Perspective 引用了 δ is for Dialectica
  • JAX Autodiff from a Linear Logic Perspective 引用了 Efficient Dual-Numbers Reverse AD via Well-Known Program Transformations
  • δ is for Dialectica 引用了 You Only Linearize Once: Tangents Transpose to Gradients
  • Efficient Dual-Numbers Reverse AD via Well-Known Program Transformations 引用了 AD for an Array Language with Nested Parallelism
  • Efficient Dual-Numbers Reverse AD via Well-Known Program Transformations 引用了 Provably correct, asymptotically efficient, higher-order reverse-mode automatic differentiation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Efficient Dual-Numbers Reverse AD via Well-Known Program TransformationsTom Smeding, Matthijs VákárPOPL 2023 · 10 次引用
  2. JAX Autodiff from a Linear Logic PerspectiveGiulia Giusti, Michele PaganiPOPL 2026
  3. DeCo: A Core Calculus for Incremental Functional Programming with Generic Data TypesTimon Böhler, Tobias Reinhard, David Richter, Mira MeziniOOPSLA 2026

它引用的 Paper5

  1. Provably correct, asymptotically efficient, higher-order reverse-mode automatic differentiationFaustyna Krawiec, Simon Peyton Jones, Neel Krishnaswami, Tom Ellis 等POPL 2022 · 27 次引用
  2. You Only Linearize Once: Tangents Transpose to GradientsAlexey Radul, Adam Paszke, Roy Frostig, Matthew J. Johnson 等POPL 2023 · 13 次引用
  3. AD for an Array Language with Nested ParallelismRobert Schenck, Ola Rønning, Troels Henriksen, Cosmin E. OanceaSC 2022 · 11 次引用
  4. Efficient Dual-Numbers Reverse AD via Well-Known Program TransformationsTom Smeding, Matthijs VákárPOPL 2023 · 10 次引用
  5. δ is for DialecticaMarie Morgane Kerjean, Pierre-Marie PédrotLICS 2024 · 1 次引用

相关 Paper

  1. A simple differentiable programming languageMartín Abadi, Gordon D. PlotkinPOPL 2020 · 49 次引用
  2. Aδ: autodiff for discontinuous programs - applied to shadersYuting Yang, Connelly Barnes, Andrew Adams, Adam FinkelsteinSIGGRAPH 2022 · 17 次引用
  3. ParDiff: Efficiently Parallelizing Reverse-Mode Automatic Differentiation with Direct IndexingShuhong Huang, Shizhi Tang, Yuan Wen, Huanqi Cao 等PPoPP 2026
  4. Backpropagation in the simply typed lambda-calculus with linear negationAloïs Brunel, Damiano Mazza, Michele PaganiPOPL 2020 · 24 次引用
  5. Automatic differentiation in PCFDamiano Mazza, Michele PaganiPOPL 2021 · 47 次引用
黄昏的海面,两侧是细线勾勒的悬崖