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 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- 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
- Efficient Dual-Numbers Reverse AD via Well-Known Program TransformationsTom Smeding, Matthijs VákárPOPL 2023 · 10 次引用
- JAX Autodiff from a Linear Logic PerspectiveGiulia Giusti, Michele PaganiPOPL 2026
- DeCo: A Core Calculus for Incremental Functional Programming with Generic Data TypesTimon Böhler, Tobias Reinhard, David Richter, Mira MeziniOOPSLA 2026
它引用的 Paper5
- Provably correct, asymptotically efficient, higher-order reverse-mode automatic differentiationFaustyna Krawiec, Simon Peyton Jones, Neel Krishnaswami, Tom Ellis 等POPL 2022 · 27 次引用
- You Only Linearize Once: Tangents Transpose to GradientsAlexey Radul, Adam Paszke, Roy Frostig, Matthew J. Johnson 等POPL 2023 · 13 次引用
- AD for an Array Language with Nested ParallelismRobert Schenck, Ola Rønning, Troels Henriksen, Cosmin E. OanceaSC 2022 · 11 次引用
- Efficient Dual-Numbers Reverse AD via Well-Known Program TransformationsTom Smeding, Matthijs VákárPOPL 2023 · 10 次引用
- δ is for DialecticaMarie Morgane Kerjean, Pierre-Marie PédrotLICS 2024 · 1 次引用
相关 Paper
- A simple differentiable programming languageMartín Abadi, Gordon D. PlotkinPOPL 2020 · 49 次引用
- Aδ: autodiff for discontinuous programs - applied to shadersYuting Yang, Connelly Barnes, Andrew Adams, Adam FinkelsteinSIGGRAPH 2022 · 17 次引用
- ParDiff: Efficiently Parallelizing Reverse-Mode Automatic Differentiation with Direct IndexingShuhong Huang, Shizhi Tang, Yuan Wen, Huanqi Cao 等PPoPP 2026
- Backpropagation in the simply typed lambda-calculus with linear negationAloïs Brunel, Damiano Mazza, Michele PaganiPOPL 2020 · 24 次引用
- Automatic differentiation in PCFDamiano Mazza, Michele PaganiPOPL 2021 · 47 次引用
