JAX Autodiff from a Linear Logic Perspective
Giulia Giusti, Michele Pagani
Abstract
JAX Autodiff refers to the core of the automatic differentiation (AD) systems developed in projects like JAX and Dex. JAX Autodiff has recently been formalised in a linear typed calculus by Radul et al in POPL 2023. Although this formalisation suffices to express the main program transformations of AD, 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 JAX 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 by Radul et al. As a byproduct, we show that unzipping, one of the transformations used to implement backpropagation in JAX Autodiff, is, in fact, optional.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0e2b3349-4577-4e83-99e7-2ceb87b955a6Builds on8
- A simple differentiable programming languageMartín Abadi, Gordon D. PlotkinPOPL 2020 · 49 citations
- Automatic differentiation in PCFDamiano Mazza, Michele PaganiPOPL 2021 · 47 citations
- Provably correct, asymptotically efficient, higher-order reverse-mode automatic differentiationFaustyna Krawiec, Simon Peyton Jones, Neel Krishnaswami, Tom Ellis et al.POPL 2022 · 27 citations
- Backpropagation in the simply typed lambda-calculus with linear negationAloïs Brunel, Damiano Mazza, Michele PaganiPOPL 2020 · 24 citations
- You Only Linearize Once: Tangents Transpose to GradientsAlexey Radul, Adam Paszke, Roy Frostig, Matthew J. Johnson et al.POPL 2023 · 13 citations
Related papers
- δ is for DialecticaMarie Morgane Kerjean, Pierre-Marie PédrotLICS 2024 · 1 citation
- Automatic Functional Differentiation in JAXMin LinICLR 2024 · 5 citations
- A Simple and Efficient Tensor CalculusSören Laue, Matthias Mitterreiter, Joachim GiesenAAAI 2020 · 40 citations
- Compositional Taylor expansion in cartesian differential categoriesAymeric WalchLICS 2025
- Fuzzing Automatic Differentiation in Deep-Learning LibrariesChenyuan Yang, Yinlin Deng, Jiayi Yao, Yuxing Tu et al.ICSE 2023 · 34 citations
