Forward- or reverse-mode automatic differentiation: What's the difference?

Saved in:
Bibliographic Details
Title: Forward- or reverse-mode automatic differentiation: What's the difference?
Authors: van den Berg, Birthe1 (AUTHOR) birthe.vandenberg@kuleuven.be, Schrijvers, Tom1 (AUTHOR) tom.schrijvers@kuleuven.be, McKinna, James2 (AUTHOR) j.mckinna@hw.ac.uk, Vandenbroucke, Alexander3 (AUTHOR) alexander.vandenbroucke@sc.com
Source: Science of Computer Programming. Jan2024, Vol. 231, pN.PAG-N.PAG. 1p.
Subjects: Automatic differentiation, Kronecker delta
Abstract: Automatic differentiation (AD) has been a topic of interest for researchers in many disciplines, with increased popularity since its application to machine learning and neural networks. Although many researchers appreciate and know how to apply AD, it remains a challenge to truly understand the underlying processes. From an algebraic point of view, however, AD appears surprisingly natural: it originates from the differentiation laws. In this work we use Algebra of Programming techniques to reason about different AD variants, leveraging Haskell to illustrate our observations. Our findings stem from three fundamental algebraic abstractions : (1) the notion of semimodule, (2) Nagata's construction of the 'idealization of a module', and (3) Kronecker's delta function, that together allow us to write a single-line abstract definition of AD. From this single-line definition, and by instantiating our algebraic structures in various ways, we derive different AD variants, that have the same extensional behaviour, but different intensional properties, mainly in terms of (asymptotic) computational complexity. We show the different variants equivalent by means of Kronecker isomorphisms , a further elaboration of our Haskell infrastructure which guarantees correctness by construction. With this framework in place, this paper seeks to make AD variants more comprehensible, taking an algebraic perspective on the matter. • Basic forward mode AD is the fusion of two semiring homomorphisms: symbolic differentiation and evaluation. • Three fundamental algebraic abstractions lay the foundations of a single-line definition of AD algorithms. • Different AD algorithms can be obtained using isomorphisms. • Our approach supports common extensions: more primitives, overloading, let-sharing, higher derivatives, non-commutativity. [ABSTRACT FROM AUTHOR]
Copyright of Science of Computer Programming is the property of Elsevier B.V. and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Engineering Source
FullText Text:
  Availability: 0
Header DbId: egs
DbLabel: Engineering Source
An: 172974679
AccessLevel: 6
PubType: Academic Journal
PubTypeId: academicJournal
PreciseRelevancyScore: 0
IllustrationInfo
Items – Name: Title
  Label: Title
  Group: Ti
  Data: Forward- or reverse-mode automatic differentiation: What's the difference?
– Name: Author
  Label: Authors
  Group: Au
  Data: <searchLink fieldCode="AR" term="%22van+den+Berg%2C+Birthe%22">van den Berg, Birthe</searchLink><relatesTo>1</relatesTo> (AUTHOR)<i> birthe.vandenberg@kuleuven.be</i><br /><searchLink fieldCode="AR" term="%22Schrijvers%2C+Tom%22">Schrijvers, Tom</searchLink><relatesTo>1</relatesTo> (AUTHOR)<i> tom.schrijvers@kuleuven.be</i><br /><searchLink fieldCode="AR" term="%22McKinna%2C+James%22">McKinna, James</searchLink><relatesTo>2</relatesTo> (AUTHOR)<i> j.mckinna@hw.ac.uk</i><br /><searchLink fieldCode="AR" term="%22Vandenbroucke%2C+Alexander%22">Vandenbroucke, Alexander</searchLink><relatesTo>3</relatesTo> (AUTHOR)<i> alexander.vandenbroucke@sc.com</i>
– Name: TitleSource
  Label: Source
  Group: Src
  Data: <searchLink fieldCode="JN" term="%22Science+of+Computer+Programming%22">Science of Computer Programming</searchLink>. Jan2024, Vol. 231, pN.PAG-N.PAG. 1p.
– Name: Subject
  Label: Subjects
  Group: Su
  Data: <searchLink fieldCode="DE" term="%22Automatic+differentiation%22">Automatic differentiation</searchLink><br /><searchLink fieldCode="DE" term="%22Kronecker+delta%22">Kronecker delta</searchLink>
– Name: Abstract
  Label: Abstract
  Group: Ab
  Data: Automatic differentiation (AD) has been a topic of interest for researchers in many disciplines, with increased popularity since its application to machine learning and neural networks. Although many researchers appreciate and know how to apply AD, it remains a challenge to truly understand the underlying processes. From an algebraic point of view, however, AD appears surprisingly natural: it originates from the differentiation laws. In this work we use Algebra of Programming techniques to reason about different AD variants, leveraging Haskell to illustrate our observations. Our findings stem from three fundamental algebraic abstractions : (1) the notion of semimodule, (2) Nagata's construction of the 'idealization of a module', and (3) Kronecker's delta function, that together allow us to write a single-line abstract definition of AD. From this single-line definition, and by instantiating our algebraic structures in various ways, we derive different AD variants, that have the same extensional behaviour, but different intensional properties, mainly in terms of (asymptotic) computational complexity. We show the different variants equivalent by means of Kronecker isomorphisms , a further elaboration of our Haskell infrastructure which guarantees correctness by construction. With this framework in place, this paper seeks to make AD variants more comprehensible, taking an algebraic perspective on the matter. • Basic forward mode AD is the fusion of two semiring homomorphisms: symbolic differentiation and evaluation. • Three fundamental algebraic abstractions lay the foundations of a single-line definition of AD algorithms. • Different AD algorithms can be obtained using isomorphisms. • Our approach supports common extensions: more primitives, overloading, let-sharing, higher derivatives, non-commutativity. [ABSTRACT FROM AUTHOR]
– Name: AbstractSuppliedCopyright
  Label:
  Group: Ab
  Data: <i>Copyright of Science of Computer Programming is the property of Elsevier B.V. and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract.</i> (Copyright applies to all Abstracts.)
PLink https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=egs&AN=172974679
RecordInfo BibRecord:
  BibEntity:
    Identifiers:
      – Type: doi
        Value: 10.1016/j.scico.2023.103010
    Languages:
      – Code: eng
        Text: English
    PhysicalDescription:
      Pagination:
        PageCount: 1
        StartPage: N.PAG
    Subjects:
      – SubjectFull: Automatic differentiation
        Type: general
      – SubjectFull: Kronecker delta
        Type: general
    Titles:
      – TitleFull: Forward- or reverse-mode automatic differentiation: What's the difference?
        Type: main
  BibRelationships:
    HasContributorRelationships:
      – PersonEntity:
          Name:
            NameFull: van den Berg, Birthe
      – PersonEntity:
          Name:
            NameFull: Schrijvers, Tom
      – PersonEntity:
          Name:
            NameFull: McKinna, James
      – PersonEntity:
          Name:
            NameFull: Vandenbroucke, Alexander
    IsPartOfRelationships:
      – BibEntity:
          Dates:
            – D: 01
              M: 01
              Text: Jan2024
              Type: published
              Y: 2024
          Identifiers:
            – Type: issn-print
              Value: 01676423
          Numbering:
            – Type: volume
              Value: 231
          Titles:
            – TitleFull: Science of Computer Programming
              Type: main
ResultId 1