Skip to content

silky/talk-2018-essence-of-ad

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The simple essence of automatic differentiation

An invited talk for PEPM 2018.

Abstract

Automatic differentiation (AD) is often presented in two forms: forward mode and reverse mode. Forward mode is quite simple to implement and package via operator overloading but is inefficient for many problems of practical interest such as deep learning and other uses of gradient-based optimization. Reverse mode (including its specialization, back-propagation) is much more efficient for these problems, but is also typically given much more complicated explanations and implementations, involving mutation, graph construction, and "tapes". This talk develops a very simple specification and Haskell implementation for mode-independent AD based on the vocabulary of categories (generalized functions). Although the categorical vocabulary would be difficult to write in directly, one can instead write regular Haskell programs to be converted to this vocabulary automatically (via a compiler plugin) and then interpreted as differentiable functions. The result is direct, exact, and efficient differentiation with no notational overhead. The specification and implementation are then generalized considerably by parameterizing over an underlying category. This generalization is then easily specialized to forward and reverse modes, with the latter resulting from a simple dual construction for categories. Another instance of generalized AD is automatic incremental evaluation of functional programs, again with no notational impact to the programmer.

About

The simple essence of automatic differentiation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TeX 96.8%
  • Makefile 3.2%