You Only Linearize Once: Tangents Transpose to Gradients
Not on the map. Why?
Abstract (arXiv)
Automatic differentiation (AD) is conventionally understood as a family of distinct algorithms, rooted in two "modes" -- forward and reverse -- which are typically presented (and implemented) separately. Can there be only one? Following up on the AD systems developed in the JAX and Dex projects, we formalize a decomposition of reverse-mode AD into (i) forward-mode AD followed by (ii) unzipping the linear and non-linear parts and then (iii) transposition of the linear part. To that end, we define a (substructurally) linear type system that can prove a class of functions are (algebraically) linear. Our main results are that forward-mode AD produces such linear functions, and that we can unzip and transpose any such linear function, conserving cost, size, and linearity. Composing these three transformations recovers reverse-mode AD. This decomposition also sheds light on checkpointing, which emerges naturally from a free choice in unzipping `let` expressions. As a corollary, checkpointing techniques are applicable to general-purpose partial evaluation, not just AD. We hope that our formalization will lead to a deeper understanding of automatic differentiation and that it will simplify implementations, by separating the concerns of differentiation proper from the concerns of gaining efficiency (namely, separating the derivative computation from the act of running it backward).
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). First posted on arXiv 22 Apr 2022.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 1; 2023: 6; 2024: 1; 2025: 0; 2026: 2.
10 papers.
- 2022Fast Finite Width Neural Tangent Kernelcited by 62
- 2024Probabilistic Programming with Programmable Variational Inferencecited by 4
- 2023On the Correctness of Automatic Differentiation for Neural Networks with Machine-Representable Parameterscited by 3
- 2023Automatic Functional Differentiation in JAXcited by 2
- 2023ωPAP Spaces: Reasoning Denotationally About Higher-Order, Recursive Probabilistic and Differentiable Programscited by 1
- 2023Understanding Automatic Differentiation Pitfallscited by 1
- 2023nablaSD: Differentiable Programming for Sparse Tensorscited by 0
- 2023Bidirectional Reactive Programming for Machine Learningcited by 0
- 2026Robust Automatic Differentiation of Square-Root Kalman Filters via Gramian Differentialscited by 0
- 2026Archimedean Copula Inference via Taylor-Mode ADcited by 0
- 2026Archimedean Copula Inference via Taylor-Mode AD22 May 2026
- 2026Robust Automatic Differentiation of Square-Root Kalman Filters via Gramian Differentials13 Mar 2026
- 2024Probabilistic Programming with Programmable Variational Inference22 Jun 2024
- 2023Automatic Functional Differentiation in JAX30 Nov 2023
- 2023Bidirectional Reactive Programming for Machine Learning28 Nov 2023
- 2023Understanding Automatic Differentiation Pitfalls12 May 2023
- 2023nablaSD: Differentiable Programming for Sparse Tensors13 Mar 2023
- 2023ωPAP Spaces: Reasoning Denotationally About Higher-Order, Recursive Probabilistic and Differentiable Programs21 Feb 2023
- 2023On the Correctness of Automatic Differentiation for Neural Networks with Machine-Representable Parameters31 Jan 2023
- 2022Fast Finite Width Neural Tangent Kernel17 Jun 2022