Automatic Differentiation

In mathematics and computer algebra, automatic differentiation (AD), sometimes alternatively called algorithmic differentiation, is a set of techniques to numerically evaluate the derivative of a function specified by a computer program. AD exploits the fact that every computer program, no matter how complicated, executes a sequence of elementary arithmetic operations (addition, subtraction, multiplication, division, etc.) and elementary functions (exp, log, sin, cos, etc.). By applying the chain rule repeatedly to these operations, derivatives of arbitrary order can be computed automatically, and accurate to working precision.

Automatic differentiation is not:

  • Symbolic differentiation, or
  • Numerical differentiation (the method of finite differences).

These classical methods run into problems: symbolic differentiation works at low speed, and faces the difficulty of converting a computer program into a single expression, while numerical differentiation can introduce round-off errors in the discretization process and cancellation. Both classical methods have problems with calculating higher derivatives, where the complexity and errors increase. Finally, both classical methods are slow at computing the partial derivatives of a function with respect to many inputs, as is needed for gradient-based optimization algorithms. Automatic differentiation solves all of these problems.

Read more about Automatic Differentiation:  The Chain Rule, Forward and Reverse Accumulation, Automatic Differentiation Using Dual Numbers, Implementation, Software

Famous quotes containing the word automatic:

    She smoothes her hair with automatic hand,
    And puts a record on the gramophone.
    —T.S. (Thomas Stearns)