Forward-Mode Automatic Differentiation in Julia
Jarrett Revels, Miles Lubin, and Theodore Papamarkou

TL;DR
ForwardDiff is a Julia package that provides high-performance forward-mode automatic differentiation, enabling efficient higher-order derivatives and custom number types, often outperforming reverse-mode AD in large dimensions.
Contribution
It introduces a JIT-compiled forward-mode AD tool in Julia that supports higher-order derivatives and custom types with performance comparable to low-level languages.
Findings
ForwardDiff's gradient computation can be faster than reverse-mode in large dimensions.
It supports higher-order derivatives and custom number types efficiently.
Widely used across diverse scientific fields, with 41 GitHub repositories depending on it.
Abstract
We present ForwardDiff, a Julia package for forward-mode automatic differentiation (AD) featuring performance competitive with low-level languages like C++. Unlike recently developed AD tools in other popular high-level languages such as Python and MATLAB, ForwardDiff takes advantage of just-in-time (JIT) compilation to transparently recompile AD-unaware user code, enabling efficient support for higher-order differentiation and differentiation using custom number types (including complex numbers). For gradient and Jacobian calculations, ForwardDiff provides a variant of vector-forward mode that avoids expensive heap allocation and makes better use of memory bandwidth than traditional vector mode. In our numerical experiments, we demonstrate that for nontrivially large dimensions, ForwardDiff's gradient computations can be faster than a reverse-mode implementation from the Python-based…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDistributed and Parallel Computing Systems · Parallel Computing and Optimization Techniques · Advanced Data Storage Technologies
