CHAD for Expressive Total Languages

Fernando Lucatelli Nunes, Matthijs Vákár
10/1/2021
cs.PLcs.LOmath.CT

Official code: VMatthijs/CHAD (27 stars, Haskell, BSD-3-Clause, last commit 2022-03-01).

Abstract

We show how to apply forward and reverse mode Combinatory Homomorphic Automatic Differentiation (CHAD) to total functional programming languages with expressive type systems featuring the combination of - tuple types; - sum types; - inductive types; - coinductive types; - function types. We achieve this by analysing the categorical semantics of such types in $Σ$-types (Grothendieck constructions) of suitable categories.

Show full abstract

Using a novel categorical logical relations technique for such expressive type systems, we give a correctness proof of CHAD in this setting by showing that it computes the usual mathematical derivative of the function that the original program implements. The result is a principled, purely functional and provably correct method for performing forward and reverse mode automatic differentiation (AD) on total functional programming languages with expressive type systems.

View on arXivView PDF

Code Implementations(1)

VMatthijs/CHADOfficial100%
BSD-3-Clause
272HaskellMar 26, 20214 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{nunes2021chad,
  title  = {CHAD for Expressive Total Languages},
  author = {Fernando Lucatelli Nunes and Matthijs Vákár},
  year   = {2021},
  eprint = {2110.00446},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.00446}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.00446.svg)](https://codeofpaper.com/paper/2110.00446)

Discussion