{"id":895,"date":"2023-08-15T11:16:54","date_gmt":"2023-08-15T18:16:54","guid":{"rendered":"https:\/\/labs.wsu.edu\/scads\/?page_id=895"},"modified":"2025-08-20T17:26:58","modified_gmt":"2025-08-21T00:26:58","slug":"automatic-differentiation","status":"publish","type":"page","link":"https:\/\/labs.wsu.edu\/scads\/research\/automatic-differentiation\/","title":{"rendered":"Automatic Differentiation"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Automatic Differentiation<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<p>Many algorithms for nonlinear optimization, solution of differential equations, sensitivity analysis, and uncertainty quantification rely on computation of derivatives. Such algorithms can greatly benefit from&nbsp;<em>Algorithmic (or Automatic) Differentiation<\/em>&nbsp;(AD), a technology for transforming a computer program for computing a function into a program for computing the function&#8217;s derivatives. AD furnishes derivatives accurately (i.e. without truncation errors) and with relatively little effort from a user&#8217;s end, and the time and space complexity of computing derivatives using AD can be bounded by the complexity of evaluating the function itself. For these reasons, AD is a better alternative to other methods of computing derivatives such as finite differencing or symbolic differentiation, or error-prone and tedious hand coding.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<p><strong>Reverse-mode based Hessian computation<\/strong><\/p>\n\n\n\n<p>Together with Mu Wang and Alex Pothen at Purdue University, we have recently been working on new algorithms for Hessian computation that aim at taking full advantage of the potential of the Reverse-mode of AD and the symmetry available in the computational graph of the Hessian.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p><strong>Sparse computation via compression<\/strong><\/p>\n\n\n\n<p>Much of our earlier work in Automatic Differentiation aimed at exploiting the&nbsp;<em>sparsity<\/em>&nbsp;(and when applicable, the&nbsp;<em>symmetry<\/em>) that is inherently available in large derivative matrices \u2014 Jacobians and Hessians \u2014 in order to make their computation efficient in terms of runtime and memory requirement.<\/p>\n\n\n\n<p>A fundamental technique that has proven effective in achieving this objective is computation via&nbsp;<em>compression<\/em>. Loosely speaking, the idea is to reduce computational cost by calculating&nbsp;<em>sums of columns&nbsp;<\/em>of a derivative matrix at a time instead of calculating&nbsp;<em>one&nbsp;<\/em>column at a time. Columns that are to be computed together are determined by exploiting structural properties of the matrix \u2014 in particular, the structural information is used to partition the set of columns into a small number of groups of &#8220;independent&#8221; columns. Here, a variety of matrix partitiong problems arise depending on whether the matrix to be computed is Jacobian (nonsymmetric) or Hessian (symmetric) and the specifics of the computational approach taken.&nbsp;<em>Graph coloring<\/em>&nbsp;models have proven to be a powerful tool for analyzing the complexity of and designing effective algorithms for these problems since the pioneering works of Coleman and More in the early 1980s.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Papers<\/h2>\n\n\n\n<p>Below is a catalogued list of papers (recent ones listed first) we have written together with a number of collaborators on graph-theoretic results and innovative algorithms for (a) efficient Reverse-mode based Hessian computation and (b) matrix partitioning (coloring) and related problems in sparse derivative matrix computation. Also included is information on the associated serial software package&nbsp;<em>ColPack<\/em>&nbsp;we developed in support of sparse derivative computation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Reverse Mode-based Hessian computation<\/h3>\n\n\n\n<ul>\n<li>M. Wang, A.H. Gebremedhin and A. Pothen,&nbsp;<strong>Capitalizing on&nbsp;<em>Live<\/em>&nbsp;Variables: New Algorithms for Efficient Hessian Computation via Automatic Differentiation<\/strong>,<em>Mathematical Programming Computation<\/em>, pp 1\u201343, 2016. DOI=10.1007\/s12532-016-0100-3.<br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#livar_hessian_2016\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/Hessian-MPC-2016.pdf\">Paper in PDF<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Coloring and sparse derivative computation, sequential algorithms<\/h3>\n\n\n\n<ul>\n<li>A.H. Gebremedhin, D. Nguyen, M.M.A. Patwary and A. Pothen,&nbsp;<strong>ColPack: Software for Graph Coloring and Related Problems in Scientific Computing<\/strong>,&nbsp;<em>ACM Transactions on Mathematical Software<\/em>, Vol 40, No 1, pp 1-31, 2013.<br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#colpack_software_2013\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/colpack-toms.pdf\">Paper in PDF<\/a><\/li>\n\n\n\n<li>A. Gebremedhin, A. Pothen, A. Tarafdar and A. Walther,&nbsp;<strong>Efficient Computation of Sparse Hessians Using Coloring and Automatic Differentiation,&nbsp;<\/strong><em>INFORMS Journal on Computing<\/em>, Vol 21, No 2, pp 209\u2013223, 2009.<br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#sparse_hessian_ijoc_2009\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/IJOC21-2-2009.pdf\">Paper in PDF<\/a><\/li>\n\n\n\n<li>A. Gebremedhin, A. Pothen and A.Walther,&nbsp;<strong>Exploiting Sparsity in Jacobian Computation via Coloring and Automatic Differentiation: A Case Study in a Simulated Moving Bed Process<\/strong>,&nbsp;<em>In C. Bischof et al. (Eds): Proc. of AD2008, Lecture Notes in Computational Science and Engineering 64, pp 339-349, 2008, Springer.&nbsp;<\/em>.<br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#sparsity_jacobian_2008\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/ad08_sparse.pdf\">Paper in PDF<\/a><\/li>\n\n\n\n<li>A. Gebremedhin, A. Tarafdar, F. Manne and A. Pothen,&nbsp;<strong>New Acyclic and Star Coloring Algorithms with Applications to Hessian Computation<\/strong>,&nbsp;<em>SIAM Journal on Scientific Computing, Vol 29, No 3, pp 1042\u20131072, 2007<\/em>.<br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#acyclic_star_sisc_2007\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/acyclic-SISC.pdf\">Paper in PDF<\/a><\/li>\n\n\n\n<li>A. Gebremedhin, F. Manne and A. Pothen,&nbsp;<strong>What Color Is Your Jacobian? Graph Coloring for Computing Derivatives,&nbsp;<\/strong><em>SIAM Review, Vol 47, No 4, pp 629\u2013705, 2005.<\/em><br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#jacobian_sirev_2005\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/\/sirev.pdf\">Paper in PDF<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Sparsity in Source to Source Transformation AD tools<\/h3>\n\n\n\n<ul>\n<li>S.H.K Narayanan, B. Norris, P. Hovland and A. Gebremedhin,&nbsp;<strong>Implementation of Partial Separability in a Source to Source Transformation AD Tool<\/strong>,&nbsp;<em>In S. Forth et al. (Eds.), Recent Advances in Algorithmic Differentiation, Lecture Notes in Computational Science and Engineering 87, DOI 10.1007\/978-3-642-30023-3_31, 2012, Springer.<\/em><br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#partial_separability_2012\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/AD2012-parsep.pdf\">Paper in PDF<\/a><\/li>\n\n\n\n<li>S.H.K Narayanan, B. Norris, P. Hovland, D. Nguyen and A. Gebremedhin,&nbsp;<strong>Sparse Jacobian Computation using ADIC2 and ColPack<\/strong>,&nbsp;<em>Procedia Computer Science, 4:2115\u20132123, 2011. Proceedings of the International Conference on Computational Science, ICCS 2011.<\/em><br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#sparse_jacobian_adic2_2011\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/iccs11.pdf\">Paper in PDF<\/a><\/li>\n\n\n\n<li>A.H. Gebremedhin and A. Walther,&nbsp;<strong><a href=\"https:\/\/onlinelibrary.wiley.com\/doi\/full\/10.1002\/widm.1334?casa_token=fw2lFpMKzsAAAAAA%3AAAwrp-fVp4f9IqjIewlil8R17NrzHiLtyxc6POcMqXYrz-5CXHbB8hlylBrpTO9ctYA59t2Fa7Xiq_SU\">An Introduction to Algorithmic Differentiation<\/a><\/strong>, WIREs Data Mining and Knowledge Discovery, 2020; 10:e1334. https:\/\/doi.org\/10.1002\/widm.1334<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Coloring and sparse derivative computation, parallel algorithms<\/h3>\n\n\n\n<ul>\n<li>B. Letschert, K. Kulshreshtha, A. Walther, D. Nguyen, A.H. Gebremedhin and A. Pothen,&nbsp;<strong>Exploiting Sparsity in Automatic Differentiation on Multicore Architectures<\/strong>,&nbsp;<em>In S. Forth et al. (Eds.), Recent Advances in Algorithmic Differentiation, Lecture Notes in Computational Science and Engineering 87, DOI 10.1007\/978-3-642-30023-3_14, 2012, Springer.<\/em><br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#sparsity_multicore_2012\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/AD2012-multicore.pdf\">Paper in PDF<\/a><\/li>\n\n\n\n<li>D. Bozdag, U. Catalyurek, A. Gebremedhin, F. Manne, E. Boman and F. Ozgunner,&nbsp;<strong>Distributed-memory Parallel Algorithms for Distance-2 Coloring and Related Problems in Derivative Computation<\/strong>,&nbsp;<em>SIAM Journal on Scientific Computing, Vol 32, Issue 4, pp 2418\u20132446, 2010<\/em>.<br><a href=\"https:\/\/labs.wsu.edu\/scads\/research\/#distributed_distance2_2010\">Abstract<\/a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/eecs.wsu.edu\/~assefaw\/publications\/ParD2Color-SISC.pdf\">Paper in PDF<\/a><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">Software<\/h2>\n\n\n\n<p>ColPack is the name of our software package comprising implementations of sequential algorithms for a variety of graph coloring and related problems arising in sparse Jacobian and Hessian computation. Many of the papers listed above, most notably the 2013 ACM TOMS paper, discuss the design, analysis, implementation, and performance evaluation of the underlying coloring algorithms in ColPack. In addition to coloring, ColPack has various routines for recovering the numerical values of the entries of a derivative matrix from a compressed representation as well as routines for constructing graph representations of Jacobians and Hessians from sparsity patterns provided in various formats. ColPack is written in C++ heavily using the Standard Template Library. It is designed to be modular, extensible and efficient.<\/p>\n\n\n\n<p>ColPack has been interfaced with the operator overloading based AD tool ADOL-C, which is currently being developed and maintained at Paderborn University, Germany. Recently, ColPack has also been interfaced with the source-to-source transformation AD tool ADIC2, which is developed at Argonne National Laboratory. The ColPack-AD toolkit is being used for end-to-end sparse derivative computation, beginning with automatic detection of the sparsity pattern of the derivative matrix of a function given as a computer program and ending with the recovery of the entries of the original derivative matrix from its compressed representation.<\/p>\n\n\n\n<p>Examples of applications enabled by ColPack together with an AD tool include Simulated Moving Bed optimization in chemical engineering and electric power flow optimization.<\/p>\n\n\n\n<p>ColPack is released for free public use under the GNU Lesser General Public License. Versions subsequent to its first release feature added functionalities and improved performance (code optimizations). For download and other more detailed information on ColPack, visit the&nbsp;<a href=\"https:\/\/labs.wsu.edu\/scads\/software\/\" data-type=\"URL\" data-id=\"https:\/\/labs.wsu.edu\/scads\/software\/\">Software page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automatic Differentiation Many algorithms for nonlinear optimization, solution of differential equations, sensitivity analysis, and uncertainty quantification rely on computation of derivatives. Such algorithms can greatly benefit from&nbsp;Algorithmic (or Automatic) Differentiation&nbsp;(AD), a technology for transforming a computer program for computing a function into a program for computing the function&#8217;s derivatives. AD furnishes derivatives accurately (i.e. without [&hellip;]<\/p>\n","protected":false},"author":5234,"featured_media":0,"parent":861,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"categories":[],"tags":[],"university_category":[],"location":[],"organization":[],"_links":{"self":[{"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/pages\/895"}],"collection":[{"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/users\/5234"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/comments?post=895"}],"version-history":[{"count":21,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/pages\/895\/revisions"}],"predecessor-version":[{"id":1872,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/pages\/895\/revisions\/1872"}],"up":[{"embeddable":true,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/pages\/861"}],"wp:attachment":[{"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/media?parent=895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/categories?post=895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/tags?post=895"},{"taxonomy":"wsuwp_university_category","embeddable":true,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/university_category?post=895"},{"taxonomy":"wsuwp_university_location","embeddable":true,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/location?post=895"},{"taxonomy":"wsuwp_university_org","embeddable":true,"href":"https:\/\/labs.wsu.edu\/scads\/wp-json\/wp\/v2\/organization?post=895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}