Programming Backpropagation with Reverse Handlers for Arrows
Takahiro Sanada, Keisuke Hoshino, Kenshin Hirai, Shin-ya Katsumata

TL;DR
This paper presents a new programming language with categorical semantics that uses algebraic effects and handlers for arrows to symbolically construct neural networks and implement backpropagation through reverse handlers.
Contribution
It introduces reverse handlers for arrows and a formal categorical framework for neural networks, enabling high-level symbolic network descriptions with flexible backpropagation implementations.
Findings
Developed a type system and operational semantics for the language.
Introduced reverse handlers for backpropagation in neural networks.
Provided a categorical semantics with soundness and adequacy proofs.
Abstract
We introduce a new programming language and its categorical semantics in order to design and implement neural networks within the framework of algebraic effects and handlers for arrows. Our language enables us to construct neural networks symbolically, in the same manner as algebraic effects, and to assign implementations -- such as backpropagation computations -- to them via handlers. The advantage of this language design is that network descriptions become abstract and high-level, while implementations can be flexibly assigned to networks. We establish a rigorous foundation for our language by developing a type system, an operational semantics, a categorical semantics, and soundness and adequacy theorems. The technical core is the introduction of \emph{reverse handlers}, a novel handler mechanism for arrows for implementing backpropagation, together with new algebras of strong…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Topic Modeling · Scientific Computing and Data Management
