Academic Journal

Parallel dual-numbers reverse AD.

Λεπτομέρειες βιβλιογραφικής εγγραφής
Τίτλος: Parallel dual-numbers reverse AD.
Συγγραφείς: SMEDING, TOM J., VÁKÁR, MATTHIJS I. L.
Πηγή: Journal of Functional Programming; 2025, Vol. 35, p1-66, 66p
Θεματικοί όροι: Automatic differentiation, Parallel programming, Parallel processing, Functional programming (Computer science)
Περίληψη: Where dual-numbers forward-mode automatic differentiation (AD) pairs each scalar value with its tangent value, dual-numbers reverse-mode AD attempts to achieve reverse AD using a similarly simple idea: by pairing each scalar value with a backpropagator function. Its correctness and efficiency on higher-order input languages have been analysed by Brunel, Mazza and Pagani, but this analysis used a custom operational semantics for which it is unclear whether it can be implemented efficiently. We take inspiration from their use of linear factoring to optimise dual-numbers reverse-mode AD to an algorithm that has the correct complexity and enjoys an efficient implementation in a standard functional language with support for mutable arrays, such as Haskell. Aside from the linear factoring ingredient, our optimisation steps consist of well-known ideas from the functional programming community. We demonstrate the use of our technique by providing a practical implementation that differentiates most of Haskell98. Where previous work on dual numbers reverse AD has required sequentialisation to construct the reverse pass, we demonstrate that we can apply our technique to task-parallel source programs and generate a task-parallel derivative computation. [ABSTRACT FROM AUTHOR]
Copyright of Journal of Functional Programming is the property of Cambridge University Press 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.)
Βάση Δεδομένων: Complementary Index
Περιγραφή
ISSN:09567968
DOI:10.1017/S0956796825100051