Differentiable Functional Programming
summary
Deep learning is framed as supervised learning of parameterized functions optimized by gradient descent, and automatic differentiation is implemented concretely: forward mode via dual numbers and a flatMap monad, reverse mode via continuations so storing a tape lets you run gradients backward; Scala prototypes compile to GPU, code lives on GitHub, and examples (sine^2) give identical derivatives. Reverse-mode AD is preferred when outputs are small, and a toy differentiable system is claimed doable in a day or two; experimental projects include Nexus and reverse-mode AD in language forks.
AI-written summary · about
chapters (27)
- 0:00Intro
- 2:24Parametrised functions Supervised learning Gradient descent
- 4:04Choose parameters to fit data
- 5:20Algorithmically choose parameters
- 6:50Calculate the derivative of the loss function with respect to the parameters
- 7:31Calculate gradient for current parameters
- 8:43Deep learning is supervised learning of parameterised functions by gradient descent
- 9:49Tensor multiplication and non-linearity
- 10:01Tensors: multidimensional arrays
- 13:26Conditionals and loops
- 14:47Algorithms for calculating gradients
- 15:08Composition of Derivatives
- 17:17Symbolic differentiation
- 17:46No loops or conditionals
- 18:39Inexact. Choosing e is hard
- 19:05Two main algorithms: forward and reverse
- 19:26Calculate with dual numbers
- 25:33There is a monad for Dual
- 26:20Forward-mode scales in the size of the input dimension
- 27:02Chain rule doesn't care about order
- 28:26Use a monad (or continuations)
- 29:43Reverse-mode scales in the size of the output dimension
- 32:27Tensor dimensions must agree
- 33:31Solution: expressive type systems
- 34:35Linear logic and differential A-calculus
- 35:34Need compilation (to GPU) for performance
- 37:34Scala is well positioned for the next generation of DL systems
related talks
34mDifferentiable Functional Programming
36mProgramming Languages for Automatic Differentiation: What Now?
59mDifferentiable Programming in C++
35mDerivatives - Important Concept. Simple to grasp in Kotlin
26mAdding AD to Scheme by Differentiating the Interpreter
54mGeneralized Physics-Informed Learning through Language-Wide Differentiable Programming
29mPartial Evaluation of Automatic Differentiation for Differential-Algebraic Equati...
14mNominal Semantics for First-class Automatic Differentiation
