High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices

<p> 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&mdash;most notably third-party sparse solvers and decomposition routines, in add...

Full description

Bibliographic Details
Main Author: Dunham, Benjamin Z.
Language:EN
Published: University of Colorado at Boulder 2017
Subjects:
Online Access:http://pqdtopen.proquest.com/#viewpdf?dispub=10270502
id ndltd-PROQUEST-oai-pqdtoai.proquest.com-10270502
record_format oai_dc
spelling ndltd-PROQUEST-oai-pqdtoai.proquest.com-102705022017-06-02T04:25:57Z High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices Dunham, Benjamin Z. Applied mathematics|Mathematics|Aerospace engineering <p> 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&mdash;most notably third-party sparse solvers and decomposition routines, in addition to basic matrix arithmetic operations and power series&mdash;without changing data-type or modifying code line by line; this allows differentiation across sequences of arbitrarily 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 &ldquo;stencils,&rdquo; each designed to be isomorphic to a particular multidimensional 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. </p><p> Although this use of the method in the &ldquo;forward mode&rdquo; 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 <i>N</i> inputs and an adjoint solver whose cost is independent of <i>N</i>&mdash;i.e., <i><b> O</b></i>(1)&mdash;the <i>N &times; N</i> Hessian can be found in <i><b>O</b></i>(<i>N</i>) time, which is comparable to existing second-order adjoint methods that require far more problem-specific implementation effort. Higher derivatives are likewise less expensive&mdash;e.g., a <i>N &times; N &times; N</i> rank-three tensor can be found in <i><b> O</b></i>(<i>N</i><sup>2</sup>). Alternatively, a Hessian-vector product can be found in <i><b>O</b></i>(1) time, which may open up many matrix-based simulations to a range of existing optimization or surrogate modeling approaches. As a final corollary in parallel to the NMD-adjoint hybrid method, the existing complex-step differentiation (CD) technique is also shown to be capable of finding the Hessian-vector product. All variants are implemented on a stochastic diffusion problem and compared in-depth with various cost and accuracy metrics.</p> University of Colorado at Boulder 2017-06-01 00:00:00.0 thesis http://pqdtopen.proquest.com/#viewpdf?dispub=10270502 EN
collection NDLTD
language EN
sources NDLTD
topic Applied mathematics|Mathematics|Aerospace engineering
spellingShingle Applied mathematics|Mathematics|Aerospace engineering
Dunham, Benjamin Z.
High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices
description <p> 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&mdash;most notably third-party sparse solvers and decomposition routines, in addition to basic matrix arithmetic operations and power series&mdash;without changing data-type or modifying code line by line; this allows differentiation across sequences of arbitrarily 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 &ldquo;stencils,&rdquo; each designed to be isomorphic to a particular multidimensional 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. </p><p> Although this use of the method in the &ldquo;forward mode&rdquo; 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 <i>N</i> inputs and an adjoint solver whose cost is independent of <i>N</i>&mdash;i.e., <i><b> O</b></i>(1)&mdash;the <i>N &times; N</i> Hessian can be found in <i><b>O</b></i>(<i>N</i>) time, which is comparable to existing second-order adjoint methods that require far more problem-specific implementation effort. Higher derivatives are likewise less expensive&mdash;e.g., a <i>N &times; N &times; N</i> rank-three tensor can be found in <i><b> O</b></i>(<i>N</i><sup>2</sup>). Alternatively, a Hessian-vector product can be found in <i><b>O</b></i>(1) time, which may open up many matrix-based simulations to a range of existing optimization or surrogate modeling approaches. As a final corollary in parallel to the NMD-adjoint hybrid method, the existing complex-step differentiation (CD) technique is also shown to be capable of finding the Hessian-vector product. All variants are implemented on a stochastic diffusion problem and compared in-depth with various cost and accuracy metrics.</p>
author Dunham, Benjamin Z.
author_facet Dunham, Benjamin Z.
author_sort Dunham, Benjamin Z.
title High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices
title_short High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices
title_full High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices
title_fullStr High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices
title_full_unstemmed High-Order Automatic Differentiation of Unmodified Linear Algebra Routines via Nilpotent Matrices
title_sort high-order automatic differentiation of unmodified linear algebra routines via nilpotent matrices
publisher University of Colorado at Boulder
publishDate 2017
url http://pqdtopen.proquest.com/#viewpdf?dispub=10270502
work_keys_str_mv AT dunhambenjaminz highorderautomaticdifferentiationofunmodifiedlinearalgebraroutinesvianilpotentmatrices
_version_ 1718454438737215488