Skip to main content
QUICK REVIEW

[Paper Review] A Differential-form Pullback Programming Language for Higher-order Reverse-mode Automatic Differentiation

Carol Mak, C.-H. Luke Ong|arXiv (Cornell University)|Feb 19, 2020
Logic, programming, and type systemsComputer Science26 references10 citations
TL;DR

This paper introduces a higher-order programming language with a first-class differential operator that natively supports reverse-mode automatic differentiation (AD) via pullbacks of differential 1-forms. It presents a reduction strategy that exactly simulates reverse-mode AD in a truly higher-order setting, and proves correctness using differential λ-categories satisfying the Hahn-Banach Separation Theorem.

ABSTRACT

Building on the observation that reverse-mode automatic differentiation (AD) -- a generalisation of backpropagation -- can naturally be expressed as pullbacks of differential 1-forms, we design a simple higher-order programming language with a first-class differential operator, and present a reduction strategy which exactly simulates reverse-mode AD. We justify our reduction strategy by interpreting our language in any differential $λ$-category that satisfies the Hahn-Banach Separation Theorem, and show that the reduction strategy precisely captures reverse-mode AD in a truly higher-order setting.

Motivation & Objective

  • To design a simple, higher-order programming language that natively supports reverse-mode automatic differentiation.
  • To provide a reduction strategy that precisely simulates reverse-mode AD in a functional, higher-order setting.
  • To formally justify the reduction strategy using category theory, specifically differential λ-categories.
  • To enable differentiation of higher-order functions, including those with free variables, duals, and nested abstractions.
  • To unify the semantics of reverse-mode AD with differential geometry through pullbacks of 1-forms.

Proposed method

  • Extends simply-typed λ-calculus with a first-class differential operator, denoted as $(\Omega\lambda x.\mathbb{P}) \cdot \mathbb{S}$, representing the pullback of a differential 1-form.
  • Uses a call-by-value reduction strategy with contexts and redexes that include function application, projections, linear maps, duals, and pullbacks.
  • Defines reductions for core constructs: β-reduction, projection, linear map application, and dual map composition.
  • Introduces specialized reductions for pullbacks and duals, including handling of nested pullbacks and Jacobian computation via $\mathcal{J}\underline{f} \cdot \underline{r}$.
  • Applies continuation-passing style (CPS) transformation to adapt the reduction strategy for functional evaluation.
  • Establishes a categorical model using differential λ-categories satisfying the Hahn-Banach Separation Theorem to validate the reduction semantics.

Experimental results

Research questions

  • RQ1Can reverse-mode AD be naturally expressed as the pullback of differential 1-forms in a higher-order functional language?
  • RQ2Can a reduction strategy be designed such that it exactly simulates reverse-mode AD for higher-order functions?
  • RQ3Is the proposed reduction strategy sound and complete when interpreted in a categorical model of differentiation?
  • RQ4Can the language support differentiation of higher-order abstractions containing free variables, duals, and nested pullbacks?
  • RQ5Does the categorical model based on differential λ-categories with Hahn-Banach separation validate the correctness of the reduction strategy?

Key findings

  • The reduction strategy precisely captures reverse-mode AD in a higher-order setting, correctly computing the p-th row of the Jacobian matrix via pullbacks.
  • The language supports differentiation of higher-order functions, including those with free variables, duals, and nested abstractions, without loss of correctness.
  • The reduction semantics is faithful to reverse-mode AD in the first-order case, and extends naturally to higher-order constructs.
  • The correctness of the reduction strategy is formally established by interpreting the language in any differential λ-category satisfying the Hahn-Banach Separation Theorem.
  • The pullback operator $(\Omega\lambda x.\mathbb{P}) \cdot \mathbb{S}$ correctly computes the directional derivative of $\lambda x.\mathbb{P}$ at point $\mathbb{S}$ via 1-form pullbacks.
  • The CPS adaptation of the reduction strategy enables efficient and modular evaluation, preserving the semantics of reverse-mode AD.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.