HackerPapers

arXiv:1804.00746cs.PL

The simple essence of automatic differentiation

Conal Elliott

Abstract

Automatic differentiation (AD) in reverse mode (RAD) is a central component of deep learning and other uses of large-scale optimization. Commonly used RAD algorithms such as backpropagation, however, are complex and stateful, hindering deep understanding, improvement, and parallel execution. This paper develops a simple, generalized AD algorithm calculated from a simple, natural specification. The general algorithm is then specialized by varying the representation of derivatives. In particular, applying well-known constructions to a naive representation yields two RAD algorithms that are far simpler than previously known. In contrast to commonly used RAD implementations, the algorithms defined here involve no graphs, tapes, variables, partial derivatives, or mutation. They are inherently parallel-friendly, correct by construction, and usable directly from an existing programming language with no need for new data types or programming style, thanks to use of an AD-agnostic compiler plugin.

arXiv comments
37 pages with proof appendices and 15 figures. Extended version of a paper appearing at ICFP 2018. More info at http://conal.net/papers/essence-of-ad/
Journal reference
DOI
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 3 identifiable commenters in 3 comments across 3 threads, from Dec 2018 to Sep 2022. Found in 1 HN submission from Feb 2020 to Feb 2020. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments3 threads

    • Related: The Simple Essence of Automatic Differentiation - Conal Elliot - https://www.youtube.com/watch?v=ne99laPUxN4 - https://arxiv.org/abs/1804.00746

      dangirshView on HNParent context

    • > Meanwhile, the idea of ML models fundamentally being differentiable algorithms – often called differentiable programming – has caught on. > We need a language to write differentiable algorithms, and Flux takes Julia to be this language. Recently on HN there was some discussion…

      MyrmornisView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.