Compositional Taylor expansion in cartesian differential categories
Aymeric Walch
摘要
This paper provides a compositional approach to Taylor expansion, in the setting of cartesian differential categories. Taylor expansion is captured here by a functor that generalizes the tangent bundle functor to higher order derivatives. The fundamental properties of Taylor expansion then boils down to naturality equations that turns this functor into a monad. This monad provides a categorical approach to higher order dual numbers and the jet bundle construction used in automated differentiation.
The combination of the theory of the differential calculus with the theory of programming languages has seen a tremendous growth in the last decades, most notably in the fields of automated differentiation (AD) [1] and of the differential λ-calculus [2]. Both AD and the differential λ-calculus aim at computing the derivative of a program in a compositional way, this compositionality is crucial to scale those methods to complex assemblies of programs. Because of this interplay between derivatives and composition, category theory provides a strong mathematical basis for both of those fields. Categorical semantics provides critical proofs methods of correctness of the AD algorithm [3], [4], and the differential lambda calculus is deeply related to the categorical semantics of Linear Logic (LL) from its very inception [2], [5]. Among those categorical approaches, cartesian differential categories [6]
provide a direct axiomatization of derivatives in any cartesian category. As such, they serve as a framework to understand the differential calculus through the lenses of compositionality.
The compositionality of the derivative is expressed by the chain rule:
The issue of the chain rule is that it is not entirely compositional, because the derivative (g • f ) ′ also depends on f , and not only on g ′ and f ′ . For this reason, one often consider the tangent bundle operator T that intuitively maps f : X → Y to the function Tf : (x, u) → (f (x), f ′ (x) • u). This operator exists in any cartesian differential category, and the chain rule boils down to a functoriality equation on T: T(g • f ) = Tg • Tf . Furthermore, the other axioms of the differential calculus (such as the linearity of the derivative or the symmetry of the higher order derivatives) turn out to be equivalent to naturality equations [7], [8] that turn T into a monad [8] whose algebraic structure is similar to that of dual numbers widely used in AD. This suggests that differentiation is an effect in the sense of Moggi [9], further cementing the use of category theory as a strong mathematical foundation for the differential calculus.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper3
- Automatic differentiation in PCFDamiano Mazza, Michele PaganiPOPL 2021 · 被引用 47 次
- ωPAP Spaces: Reasoning Denotationally About Higher-Order, Recursive Probabilistic and Differentiable ProgramsMathieu Huot, Alexander K. Lew, Vikash K. Mansinghka, Sam StatonLICS 2023 · 被引用 5 次
- Cartesian Coherent Differential CategoriesThomas Ehrhard, Aymeric WalchLICS 2023 · 被引用 2 次
相关 Paper
- Combining fixpoint and differentiation theoryZeinab Galal, Jean-Simon Pacaud LemayLICS 2024
- Backpropagation in the simply typed lambda-calculus with linear negationAloïs Brunel, Damiano Mazza, Michele PaganiPOPL 2020 · 被引用 24 次
- Taylor Expansion as a Monad in Models of DiLLMarie Kerjean, Jean-Simon Pacaud LemayLICS 2023 · 被引用 5 次
- Automatic Functional Differentiation in JAXMin LinICLR 2024 · 被引用 5 次
- Efficient Dual-Numbers Reverse AD via Well-Known Program TransformationsTom Smeding, Matthijs VákárPOPL 2023 · 被引用 10 次
