CHAD: Combinatory Homomorphic Automatic Differentiation
Matthijs V\'ak\'ar, Tom Smeding

TL;DR
CHAD introduces a principled, correct, and compositional method for automatic differentiation in expressive programming languages, generating purely functional code with formal correctness guarantees.
Contribution
It presents a homomorphic, source-code transformation approach for AD that is applicable to expressive languages and maintains correctness through a logical-relations argument.
Findings
Generates code with linear types or in standard functional languages.
Proves correctness by showing the derivative semantics match calculus derivatives.
Applicable to higher-order languages manipulating statically sized arrays.
Abstract
We introduce Combinatory Homomorphic Automatic Differentiation (CHAD), a principled, pure, provably correct define-then-run method for performing forward- and reverse-mode automatic differentiation (AD) on programming languages with expressive features. It implements AD as a compositional, type-respecting source-code transformation that generates purely functional code. This code transformation is principled in the sense that it is the unique homomorphic (structure-preserving) extension to expressive languages of Elliott's well-known and unambiguous definitions of AD for a first-order functional language. Correctness of the method follows by a compositional logical-relations argument that shows that the semantics of the syntactic derivative is the usual calculus derivative of the semantics of the original program. In their most elegant formulation, the transformations generate code…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
