Reverse accumulation of functions containing gradients
We extend the technique of reverse accumulation so as to allow efficient extraction of gradients of scalar valued functions which are themselves constructed by composing operations which include taking derivatives of subsidiary functions. The technique described here relies upon augmenting the computational graph, and performs well when the highest order of derivative information required is at most fourth or fifth order. When higher order is required, an approach based upon interpolation of taylor series is likely to give better performance, and as a first step in this direction we introduce a transformation mapping reverse passes through an augmented graph onto taylor valued accumulations through a forward pass. The ideas are illustrated by application to a parameter free differentiable penalty function for constrained optimization problems.