Confusion of Tagged Perturbations in Forward Automatic Differentiation of Higher-Order Functions
From MaRDI portal
Publication:6237352
DOI10.1017/S095679681900008XarXiv1211.4892WikidataQ112146147 ScholiaQ112146147MaRDI QIDQ6237352FDOQ6237352
Authors: Oleksandr Manzyuk, Barak A. Pearlmutter, Alexey Andreyevich Radul, David R. Rush, Jeffrey Mark Siskind
Publication date: 20 November 2012
Abstract: Forward Automatic Differentiation (AD) is a technique for augmenting programs to compute derivatives. The essence of Forward AD is to attach perturbations to each number, and propagate these through the computation. When derivatives are nested, the distinct derivative calculations, and their associated perturbations, must be distinguished. This is typically accomplished by creating a unique tag for each derivative calculation, tagging the perturbations, and overloading the arithmetic operators. We exhibit a subtle bug, present in fielded implementations, in which perturbations are confused despite the tagging machinery. The essence of the bug is this: each invocation of a derivative creates a unique tag but a unique tag is needed for each derivative calculation. When taking derivatives of higher-order functions, these need not correspond! The derivative of a higher-order function that returns a function will be a function that returns a function that performs a derivative calculation. A single invocation of will create a single fresh tag but that same tag will be used for each derivative calculation resulting from an invocation of . This situation arises when taking derivatives of curried functions. Two potential solutions are presented, and their serious deficiencies discussed. One requires eta expansion to delay the creation of fresh tags from the invocation of to the invocation of , which can be difficult or even impossible in some circumstances. The other requires to wrap with tag renaming, which is difficult to implement without violating the desirable complexity properties of forward AD.
This page was built for publication: Confusion of Tagged Perturbations in Forward Automatic Differentiation of Higher-Order Functions
Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q6237352)