High-Order Automatic Differentiation of Unmodified Linear Algebra
Routines via Nilpotent Matrices
by
Benjamin Z Dunham
B.A., Carroll College, 2009
M.S., University of Colorado, 2011
A thesis submitted to the
Faculty of the Graduate School of the
University of Colorado in partial fulfillment
of the requirements for the degree of
Doctor of Philosophy
Department of Aerospace Engineering Sciences
2017 This thesis entitled: High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices written by Benjamin Z Dunham has been approved for the Department of Aerospace Engineering Sciences
Prof. Kurt K. Maute
Prof. Alireza Doostan
Date
The final copy of this thesis has been examined by the signatories, and we find that both the content and the form meet acceptable presentation standards of scholarly work in the above mentioned discipline. iii
Dunham, Benjamin Z (Ph.D., Aerospace Engineering Sciences)
High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices
Thesis directed by Prof. Kurt K. Maute
This work presents a new automatic differentiation method, Nilpotent Matrix Differentiation (NMD), capable of propagating any order of mixed or univariate derivative through common linear algebra functions – most notably third-party sparse solvers and decomposition routines, in addition to basic matrix arithmetic operations and power series – without changing data-type or modifying code line by line; this allows differentiation across sequences of ar- bitrarily many such functions with minimal implementation effort. NMD works by enlarging the matrices and vectors passed to the routines, replacing each original scalar with a matrix block augmented by derivative data; these blocks are constructed with special sparsity structures, termed “stencils,” each designed to be isomorphic to a particular mul- tidimensional hypercomplex algebra. The algebras are in turn designed such that Taylor expansions of hypercomplex function evaluations are finite in length and thus exactly track derivatives without approximation error.
Although this use of the method in the “forward mode” is unique in its own right, it is also possible to apply it to existing implementations of the (first-order) discrete adjoint method to find high-order derivatives with lowered cost complexity; for example, for a problem with N inputs and an adjoint solver whose cost is independent of N – i.e., (1) – the N × N Hessian can be found in (N) time, which is comparable to existing second-order adjoint methods that require far more problem-specific implementation effort. Higher derivatives are likewise less expensive