~/talk

Efficient Dual-Numbers Reverse AD via Well-Known Program Transformations

links:none on file
links:none on file
slides:none on file

Presents a semantics-preserving optimization path from naive dual-numbers reverse AD to an implementation with the expected time complexity and a practical Haskell98 subset implementation. Key steps: add monotonic IDs and monadic staging to enforce the reverse-of-forward evaluation order, apply linear factoring to merge duplicate backpropagator calls, use the difference-list/kleisli trick for sparse vector accumulation, replace maps with mutable arrays and de-functionalize to produce a tape; prototype exists and benchmarks show roughly comparable performance (within a constant factor) to an existing Haskell AD library.

AI-written summary · about

  1. 0:00Efficient reverse AD intro
  2. 1:27Naive algorithm optimizations
  3. 3:12Dual numbers for reverse AD
  4. 7:50Call graph explosion
  5. 8:33Linear factoring via distributive law
  6. 10:40Evaluation order for linear factoring
  7. 13:09Staging function calls with IDs
  8. 15:16Sparse vectors and difference lists
  9. 17:00Replacing tree maps with arrays
  10. 18:23Classic tape algorithm derivation
  11. 19:05Efficiency and results
  12. 19:34Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.