XAD Fast, easy automatic differentiation in C++ and Python
XAD is a high-performance C++ automatic differentiation library designed for large-scale, performance-critical systems.
It provides forward and adjoint (reverse) mode automatic differentiation via operator overloading, with a strong focus on:
- Low runtime overhead.
- Minimal memory footprint.
- Straightforward integration into existing codebases.
For Monte Carlo and other repetitive workloads, XAD also offers optional JIT backend support, enabling record-once / replay-many execution for an additional performance boost.
Automatic Differentiation
Automatic differentiation (also called algorithmic differentiation) is a set of techniques for calculating partial derivatives of functions specified as computer programs. Since every program execution is always composed of a sequence of simple operations with known derivatives (arithmetics and mathematical functions like sin, exp, log, etc.), the chain rule can be applied repeatedly to calculate partial derivatives automatically. See automatic differentiation mathematical background for more details.