Unraveling the iterative CHAD
Fernando Lucatelli Nunes, Gordon Plotkin, Matthijs V\'ak\'ar

TL;DR
This paper extends the CHAD framework to handle programs with partial operations, conditionals, and loops by introducing iteration-extensive indexed categories, enabling structure-preserving differentiation of looping programs.
Contribution
It introduces iteration-extensive indexed categories to incorporate iteration into dependently typed languages within the CHAD framework, ensuring correct differentiation of looping constructs.
Findings
Extended CHAD to handle while-loops and partial operations.
Proved the correctness of the differentiation transformation for looping programs.
Established a universal property-based correctness via categorical models.
Abstract
Combinatory Homomorphic Automatic Differentiation (CHAD) was originally formulated as a semantics-driven source-to-source transformation for reverse-mode AD of total (terminating) functional programs. In this work, we extend CHAD to encompass programs featuring constructs such as partial (potentially non-terminating) operations, data-dependent conditionals (e.g., real-valued tests), and iteration constructs (i.e. while-loops), while maintaining CHAD's core principle of structure-preserving semantics. A central contribution is the introduction of iteration-extensive indexed categories, which provide a principled integration of iteration into dependently typed programming languages. This integration is achieved by requiring that iteration in the base category lifts to parameterized initial algebras in the indexed category, yielding an op-fibred iterative structure that models…
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.
Taxonomy
TopicsCancer Genomics and Diagnostics
MethodsBalanced Selection
