Categorical Deep Learning: A Unified Theory for All Neural Architectures
New paper uses category theory to formally describe every neural network architecture.
The paper "Categorical Deep Learning is an Algebraic Theory of All Architectures" (Gavranović et al.) tackles the longstanding gap between deep learning's empirical success and its theoretical foundations. While architectures like transformers and CNNs evolved through scaling and experimentation, a unifying mathematical language remained elusive. The authors propose using category theory—specifically the universal algebra of monads valued in a 2-category of parametric maps—to elegantly subsume all neural network design patterns into a single framework. This allows representation of sequential computation, recurrence, and other operations through the compositionality of monads.
Beyond architecture theory, the article categorizes deep learning theory into three sub-domains: optimization theory (explaining optimizers like AdamW), functional theory (explaining generalization, grokking, double descent), and architecture theory (where CDL fits). CDL stands out by providing a formal bridge between abstract constraints and practical implementations, grounding itself in functional programming to make the theory directly applicable. The framework extends earlier work in Geometric Deep Learning and Topological Deep Learning, which focused on data with nontrivial internal structures, but now covers all architectures uniformly.
- Categorical Deep Learning (CDL) uses category theory monads to describe all neural architectures in a unified framework.
- The paper bridges the gap between mathematical constraints and functional programming implementations.
- CDL generalizes Geometric and Topological Deep Learning, covering transformers, RNNs, and CNNs as specific instances.
Why It Matters
A mathematical foundation for neural architecture design could accelerate both theoretical understanding and practical implementation of future models.