AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia

Frank Schäfer, Mohamed Tarek, Lyndon White, Chris Rackauckas
9/25/2021
cs.MScs.LGcs.SE

Official code: JuliaDiff/AbstractDifferentiation.jl (138 stars, MIT, last commit 2026-08-09).

Abstract

No single Automatic Differentiation (AD) system is the optimal choice for all problems. This means informed selection of an AD system and combinations can be a problem-specific variable that can greatly impact performance. In the Julia programming language, the major AD systems target the same input and thus in theory can compose. Hitherto, switching between AD packages in the Julia Language required end-users to familiarize themselves with the user-facing API of the respective packages. Furthermore, implementing a new, usable AD package required AD package developers to write boilerplate code to define convenience API functions for end-users. As a response to these issues, we present AbstractDifferentiation.jl for the automatized generation of an extensive, unified, user-facing API for any AD package. By splitting the complexity between AD users and AD developers, AD package developers only need to implement one or two primitive definitions to support various utilities for AD users like Jacobians, Hessians and lazy product operators from native primitives such as pullbacks or pushforwards, thus removing tedious -- but so far inevitable -- boilerplate code, and enabling the easy switching and composing between AD implementations for end-users.

View on arXivView PDF

Code Implementations(1)

MIT

An abstract interface for automatic differentiation.

13818TeX, JuliaFeb 6, 20212 months agoMIT

Similar Papers

Cite this paper

@article{schfer2021abstractdifferentiationjl,
  title  = {AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia},
  author = {Frank Schäfer and Mohamed Tarek and Lyndon White and Chris Rackauckas},
  year   = {2021},
  eprint = {2109.12449},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.12449}
}

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/2109.12449.svg)](https://codeofpaper.com/paper/2109.12449)

Discussion