Weaves, Wires, and Morphisms: Formalizing and Implementing the Algebra of Deep Learning

Vincent Abbott, Gioele Zardini
4/8/2026
cs.LGmath.CT

No confident code implementation found for this paper.

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.

Show full abstract

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 conversion, PyTorch compilation and diagram rendering. This lays the foundation for a systematic, formal approach to deep learning model design and analysis.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{abbott2026weaves,
  title  = {Weaves, Wires, and Morphisms: Formalizing and Implementing the Algebra of Deep Learning},
  author = {Vincent Abbott and Gioele Zardini},
  year   = {2026},
  eprint = {2604.07242},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.07242v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.07242.svg)](https://codeofpaper.com/paper/2604.07242)

Discussion