HackerPapers

arXiv:1711.10455math.CT

Backprop as Functor: A compositional perspective on supervised learning

Brendan Fong, David I. Spivak, Rémy Tuyéras

Abstract

A supervised learning algorithm searches over a set of functions $A \to B$ parametrised by a space $P$ to find the best approximation to some ideal function $f\colon A \to B$. It does this by taking examples $(a,f(a)) \in A\times B$, and updating the parameter according to some rule. We define a category where these update rules may be composed, and show that gradient descent---with respect to a fixed step size and an error function satisfying a certain property---defines a monoidal functor from a category of parametrised functions to this category of update rules. This provides a structural perspective on backpropagation, as well as a broad generalisation of neural networks.

arXiv comments
13 pages + 4 page appendix
Journal reference
LICS 2019
DOI
Subjects
math.CTCategory Theory cs.AIArtificial Intelligence cs.LGMachine Learning

On Hacker News

Linked by 5 identifiable commenters in 6 comments across 6 threads, from Feb 2018 to Apr 2021. Found in 1 HN submission from Dec 2018 to Dec 2018. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments6 threads

    • In fact, the compositional structure underlying that of predictive coding [0,1] is abstractly the same as that underlying backprop [2]. (Disclaimer: [0,1] are my own papers; I'm working on a more precise and extensive version of [1] right now!) [0]…

      tsmitheView on HNParent context

  1. Applied Category Theory 1 comment
    • You may be interested in this paper too https://arxiv.org/abs/1711.10455 I think given a language with AD you already don't need to have a separate language for graph building and my understanding is that's one of the goals for the Julia team and I've seen other nice looking…

      formalsystemView on HNParent context

  2. Applied Category Theory 1 comment
    • David Spivak has done lots of cool work on applying category theory to many concrete systems like databases [1]. Brendan Fong has worked on applying category theory to things that act like interconnected networks, such as electrical circuits. This fits into a larger ambitious…

      danharajView on HNParent context

    • After reading "Backprop as Functor: A compositional perspective on supervised learning", it came to my attention that the spaCy backend (thinc) is built with higher order functions instead of a computational graph (unlike tensorflow, chainer, or pytorch)…

      f00_View on HNParent context

Submitted to Hacker News

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