Optimizing the Accumulation of Jacobians by Edge Elimination in the Computational Graph
Résumé
The chain rule - fundamental for Automatic Differentiation (AD) - can be applied to computational graphs representing vector functions in arbitrary orders resulting in different operations counts for the calculation of their Jacobian matrices. Very few authors have dealt with this interesting subject so far and there is no generally accepted terminology for handling these combinations of the forward and reverse modes of AD. The minimization of the number of arithmetic operations required for the calculation of the complete Jacobian leads to a computationally hard combinatorial optimizati- on problem. In this paper we will give a formal description of this problem, which also is sometimes referred to as the cross-country elimination problem in computational graphs, in terms of a shortest path problem in the so-called metagraph. The well-known strategy of eliminating vertices will be refined by introducing the elimination of edges. We will show that edge elimination is in general superior to vertex elimination with respect to the operations count. As an outlook we will present a selection of methods for solving the general edge elimination problem heuristically