Coarse Grain Automatic Differentiation: A Practical Approach to Fast and Exact Computation of First and Second Order Derivatives in Software

27 Pages Posted: 9 Feb 2017 Last revised: 27 Nov 2017

Date Written: November 23, 2017

Abstract

The evaluations done by a program at runtime can be modeled by computational Directed Acyclic Graphs (DAGs) at various abstraction levels.

Applying the multivariate chain rule on those computational DAGs enables the automation of total derivatives computation, which is exploited at a fine-grain level by Automatic Differentiation (AD).

Coarse Grain Automatic Differentiation (CGAD) is a framework that exploits this principle at a higher level, leveraging on software domain model.

All nodes in the computational DAG are responsible for computing local partial derivatives with respect to their direct dependencies while the CGAD framework is responsible for composing them into first and second order total derivatives.

This separation of concerns between local and global computations offers several key software engineering advantages:

It eases integration, makes the system decoupled and inherently extensible and allows hybrid differentiation (i.e. connecting derivatives from different sources using different calculation methods and different languages in the same evaluation).

Additionally, the nodes can take advantage of local symbolic differentiation to significantly speed up total derivatives computation, compared to traditional differentiation approaches.

As a concrete application of this methodology to a financial software context, we present a Java implementation that computes the premiums and 82 first and second order total derivatives of 2000 call options in 262 milliseconds, with a time ratio of 1:2.2 compared to premiums alone.

Keywords: CGAD, AD, automatic differentiation, coarse grain, chain rule, abstraction level, modularity, hybrid, parallel, bauer, computational, graph, DAG, derivative

JEL Classification: C02, C63

Suggested Citation

Duche, Henri-Olivier and Galilee, Francois, Coarse Grain Automatic Differentiation: A Practical Approach to Fast and Exact Computation of First and Second Order Derivatives in Software (November 23, 2017). Available at SSRN: https://ssrn.com/abstract=2913627 or http://dx.doi.org/10.2139/ssrn.2913627

Henri-Olivier Duche (Contact Author)

Independent ( email )

No Address Available

Francois Galilee

Independent ( email )

No Address Available

Register to save articles to
your library

Register

Paper statistics

Downloads
494
Abstract Views
2,619
rank
57,188
PlumX Metrics