Paper: arXiv 2412.05300
Authors: Juan Lucas Rey
Abstract
This document presents a new C++ Automatic Differentiation (AD) tool, AD-HOC (Automatic Differentiation for High-Order Calculations). This tool aims to have the following features: -Calculation of user specified derivatives of arbitrary order -To be able to run with similar speeds as handwritten code -All derivatives calculations are computed in a single backpropagation tree pass -No source code generation is used, relying heavily on the C++ compiler to statically build the computation tree before runtime -A simple interface -The ability to be used \textit{“in conjunction”} with other established, general-purpose dynamic AD tools -Header-only library, with no external dependencies -Open source, with a business-friendly license
Complexity vs Empirical Score
- Math Complexity: 8.5/10
- Empirical Rigor: 3.0/10
- Quadrant: Lab Rats — high math complexity, limited empirical testing
Why this score: The paper presents complex mathematical derivations of high-order derivative backpropagation using Taylor expansions, but it is primarily a theoretical computational tool paper with no backtesting, empirical results, or performance benchmarks provided in the excerpt.
Research Flowchart
flowchart TD
A["Research Goal: Develop a C++ AD tool<br>for high-order derivatives using<br>expression templates"] --> B["Methodology: Expression Template Architecture"]
B --> C{"Input: User Mathematical<br>Expression"}
B --> D{"Input: Target Derivative Order"}
C --> E["Computational Process: Compile-time<br>Expression Tree Construction"]
D --> E
E --> F["Single-Pass Backpropagation<br>via Tree Traversal"]
F --> G["Key Findings/Outcomes"]
subgraph G
G1["High-performance computation<br>comparable to handwritten code"]
G2["Header-only, zero-dependency<br>C++ library"]
G3["Arbitrary order derivatives<br>calculated efficiently"]
end
Evidence Card
What the authors claim, on what data, and who has checked it. Read from the paper's own text by a language model: every quote is verbatim, nothing was re-run. How to read this card
Proposes
The paper introduces AD-HOC, a header‑only C++ library for high‑order automatic differentiation that computes user‑specified derivatives of arbitrary order in a single backpropagation pass without source code generation.
Source sentence
This document presents a new C++ Automatic Differentiation (AD) tool, AD-HOC (Automatic Differentiation for High-Order Calculations).
Assumes 2
- The calculation is represented as a directed acyclic graph (DAG) of elementary functions. model
Source sentence
Let’s assume we have a calculation tree described as a DAG (Directed Acyclic Graph) where elementary univariate (exp, cos,...), bivariate (×, +, incomplete elliptic integral of the first kind,...) or even in some cases trivariate functions (incomplete elliptic integral of the third kind5) are used in a particular order.
- Only the necessary derivatives are expanded, truncating higher‑order terms when not needed. execution
Source sentence
Given that we only need the second-order derivatives of the final result, we only need to expand the exp univariate function up to order 2. This example shows a second-order backpropagation, but could have been performed with a higher order, by keeping larger expansions at every stage instead of truncating at order 2.
Data
No dataset named in the text.
Costs
Not applicable
Finds 3
- AD-HOC achieves runtimes comparable to source‑code‑generation tools or handwritten code while avoiding source generation. performance
Source sentence
This paper introduces a new AD tool, AD-HOC (Automatic Differentiation for High-Order Calculations), which offers comparable run times to source code generation tools or handwritten code, while avoiding the need for source code generation.
- Benchmarking on a Black‑Scholes pricing task shows that AD-HOC can compute the price and multiple higher‑order Greeks with competitive speed on an Apple M3 Pro using GCC -O3. performance
Source sentence
We will therefore benchmark the runtime of a simple Black-Scholes price against the calculation of the same price and these 3 additional cherry-picked derivatives. The code for calculating Black-Scholes can be taken as defined in the previous section and instantiated with a double type as follows (this is referred as the BASE version of the code): double S = 100., K = 102., V = 0.15, T = 0.5, R = 0.01; double Price =
- The tool enables calculation of second‑order and higher‑order derivatives needed for portfolio risk and high‑frequency trading applications. theoretical
Source sentence
With AD-HOC, a powerful enough tool to create high-order derivatives backpropagation trees, we can calculate second-order derivatives, very much needed in finance, or even higher-order derivatives.
Checked by others
No other paper in the archive has been found to support or contradict these findings (compared with 12 related papers). Coverage is partial, so this is neither replication nor refutation.
Extracted 2026-11-14 · same card as JSON · A language model chose these items: check the source sentence before relying on one.