Weaves, Wires, and Morphisms: Formalizing and Implementing the Algebra of Deep Learning
Vincent Abbott, Gioele Zardini

TL;DR
This paper introduces a formal categorical framework for deep learning architectures, enabling precise, compositional mathematical descriptions and implementations across multiple programming languages.
Contribution
It develops a novel categorical approach with axis-stride and array-broadcasted categories, translating mathematical models into diagrams and code for systematic deep learning design.
Findings
Framework formalizes broadcasting and model composition.
Provides Python and TypeScript implementations.
Enables algebraic construction, graph conversion, and diagram rendering.
Abstract
Despite deep learning models running well-defined mathematical functions, we lack a formal mathematical framework for describing model architectures. Ad-hoc notation, diagrams, and pseudocode poorly handle nonlinear broadcasting and the relationship between individual components and composed models. This paper introduces a categorical framework for deep learning models that formalizes broadcasting through the novel axis-stride and array-broadcasted categories. This allows the mathematical function underlying architectures to be precisely expressed and manipulated in a compositional manner. These mathematical definitions are translated into human manageable diagrams and machine manageable data structures. We provide a mirrored implementation in Python (pyncd) and TypeScript (tsncd) to show the universal aspect of our framework, along with features including algebraic construction, graph…
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.
