Reference. Fundamental Components of Deep Learning: A category-theoretic approach
Deep learning, despite its remarkable achievements, is still a young field. Like the early stages of many scientific disciplines, it is marked by the discovery of new phenomena, ad-hoc design decisions, and the lack of a uniform and compositional mathematical foundation. From the intricacies of the implementation of backpropagation, through a growing zoo of neural network architectures, to the new and poorly understood phenomena such as double descent, scaling laws or in-context learning, there are few unifying principles in deep learning. This thesis develops a novel mathematical foundation for deep learning based on the language of category theory. We develop a new framework that is a) end-to-end, b) unform, and c) not merely descriptive, but prescriptive, meaning it is amenable to direct implementation in programming languages with sufficient features. We also systematise many existing approaches, placing many existing constructions and concepts from the literature under the same umbrella. In Part I we identify and model two main properties of deep learning systems parametricity and bidirectionality by we expand on the previously defined construction of actegories and Para to study the former, and define weighted optics to study the latter. Combining them yields parametric weighted optics, a categorical model of artificial neural networks, and more. Part II justifies the abstractions from Part I, applying them to model backpropagation, architectures, and supervised learning. We provide a lens-theoretic axiomatisation of differentiation, covering not just smooth spaces, but discrete settings of boolean circuits as well. We survey existing, and develop new categorical models of neural network architectures. We formalise the notion of optimisers and lastly, combine all the existing concepts together, providing a uniform and compositional framework for supervised learning.
Cite
Cited by (1)
Reinforcement Learning in Categorical Cybernetics hedges-2025-reinforcement
Cites 261 works (15 here)
With notes (15)
Profunctor Optics, a Categorical Update clarke-2024-profunctor
Optics are bidirectional data accessors that capture data transformation patterns such as accessing subfields or iterating over containers. Profunctor optics are a particular choice of representation supporting modularity, meaning that we can construct accessors for complex structures by combining simpler ones. Profunctor optics have previously been studied only in an unenriched and non-mixed setting, in which both directions of access are modelled in the same category. However, functional programming languages are arguably better described by enriched categories; and we have found that some structures in the literature are actually mixed optics, with access directions modelled in different categories. Our work generalizes a classic result by Pastro and Street on Tambara theory and uses it to describe mixed V-enriched profunctor optics and to endow them with V-category structure. We provide some original families of optics and derivations, including an elementary one for traversals. Finally, we discuss a Haskell implementation.
Bayesian open games bolt-2023-bayesian
This paper generalises the treatment of compositional game theory as introduced by Ghani et al. in 2018, where games are modelled as morphisms of a symmetric monoidal category. From an economic modelling perspective, the notion of a game in the work by Ghani et al. is not expressive enough for many applications. This includes stochastic environments, stochastic choices by players, as well as incomplete information regarding the game being played. The current paper addresses these three issues all at once.
Diegetic Representation of Feedback in Open Games capucci-2023-diegetic
Value Iteration is Optic Composition hedges-2023-value
Compositional thermostatics baez-2023-compositional
We define a thermostatic system to be a convex space of states together with a concave function sending each state to its entropy, which is an extended real number. This definition applies to classical thermodynamics, classical statistical mechanics, quantum statistical mechanics, and also generalized probabilistic theories of the sort studied in quantum foundations. It also allows us to treat a heat bath as a thermostatic system on an equal footing with any other. We construct an operad whose operations are convex relations from a product of convex spaces to a single convex space and prove that thermostatic systems are algebras of this operad. This gives a general, rigorous formalism for combining thermostatic systems, which captures the fact that such systems maximize entropy subject to whatever constraints are imposed upon them.
The Compositional Structure of Bayesian Inference braithwaite-2023-the
Bayes’ rule tells us how to invert a causal process in order to update our beliefs in light of new evidence. If the process is believed to have a complex compositional structure, we may observe that the inversion of the whole can be computed piecewise in terms of the component processes. We study the structure of this compositional rule, noting that it relates to the lens pattern in functional programming. Working in a suitably general axiomatic presentation of a category of Markov kernels, we see how we can think of Bayesian inversion as a particular instance of a state-dependent morphism in a fibred category. We discuss the compositional nature of this, formulated as a functor on the underlying category and explore how this can used for a more type-driven approach to statistical inference.
Towards Foundations of Categorical Cybernetics capucci-2022-towards
Translating Extensive Form Games to Open Games with Agency capucci-2022-translating
Lenses for Composable Servers videla-2022-lenses
We implement the semantics of server operations using parameterised lenses. They allow us to define endpoints and extend them using classical lens composition. The parameterised nature of lenses models state updates while the lens laws mimic properties expected from HTTP. This first approach to server development is extended to use dependent parameterised lenses. An upgrade necessary to model not only endpoints, but entire servers, unlocking the ability to compose them together.
Fibre optics braithwaite-2021-fibre
Lenses, optics and dependent lenses (or equivalently morphisms of containers, or equivalently natural transformations of polynomial functors) are all widely used in applied category theory as models of bidirectional processes. From the definition of lenses over a finite product category, optics weaken the required structure to actions of monoidal categories, and dependent lenses make use of the additional property of finite completeness (or, in case of polynomials, even local cartesian closure). This has caused a split in the applied category theory literature between those using optics and those using dependent lenses. The goal of this paper is to unify optics with dependent lenses, by finding a definition of fibre optics admitting both as special cases.
Syntax and Semantics of Quantitative Type Theory atkey-2018-syntax
Compositional Game Theory ghani-2018-compositional
A convenient category for higher-order probability theory heunen-2017-a
Profunctor Optics: Modular Data Accessors pickering-2017-profunctor
Kan Extensions for Program Optimisation Or: Art and Dan Explain an Old Trick hinze-2012-kan
External (246)
- Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations (2024)
- Rainbow array algebra (2023)
- Bicategories of automata, automata in bicategories (2023)
- Composing Bridges (2023)
- Actegories for the Working Amthematician (2023)
- Reverse tangent categories (2023)
- Category Theory Resources (2023)
- Theory and Applications of Lenses and Optics (2023)
- Two kinds of Prisms (2023)
- The Lie Derivative for Measuring Learned Equivariance (2023)
- The GAN Zoo (2023)
- A Compositional Framework for Convex Model Predictive Control (2023)
- Cartesian Differential Comonads and New Models of Cartesian Differential Categories (2023)
- OpenAI’s CEO Says the Age of Giant AI Models Is Already Over (2023)
- Category Theory is like Java - General (2023)
- A category-theoretic proof of the ergodic decomposition theorem (2023)
- Internal Grothendieck construction for enriched categories (2023)
- Polynomial Functors: A Mathematical Theory of Interaction (2023)
- Architectures of Topological Deep Learning: A Survey on Topological Neural Networks (2023)
- Compositionality and functorial invariants in machine learning (2023)
- Superhuman Artificial Intelligence Can Improve Human Decision Making by Increasing Novelty (2023)
- Functorial aggregation (2023)
- A reference for categorical structures on Poly (2023)
- Entanglement of Sections: The pushout of entangled and parameterized quantum information (2023)
- CCRL 40/15 - Index (2023)
- Everything is connected: Graph neural networks (2023)
- Dependent Optics (2023)
- Transformers learn in-context by gradient descent (2023)
- Making Concurrency Functional (2023)
- Distilling Text into Circuits (2023)
- Applied Category Theory in chemistry, computing, and social networks (2022)
- Categorical composable cryptography (2022)
- String Diagrammatic Electrical Circuit Theory (2022)
- Seeing double through dependent optics (2022)
- Categorical Foundations of Gradient-Based Learning (2022)
- Monoidal reverse differential categories (2022)
- Graph Neural Networks are Dynamic Programmers (2022)
- Lenses to the left of me, Prisms to the right (2022)
- Space-time tradeoffs of lenses and optics via higher category theory (2022)
- Graph Convolutional Neural Networks as Parametric CoKleisli morphisms (2022)
- Meta-Learning in Neural Networks: A Survey (2022)
- A survey of deep learning optimizers-first and second order methods (2022)
- Towards Understanding Grokking: An Effective Theory of Representation Learning (2022)
- Parametric monads and enriched adjunctions (2022)
- Transformers are Meta-Reinforcement Learners (2022)
- Compound Optics (2022)
- The Challenge of Compositionality for AI (2022)
- Fast Left Kan Extensions Using the Chase (2022)
- Flexibly Graded Monads and Graded Algebras (2022)
- Categorical Systems Theory (2022)
- The Para Construction as a Distributive Law (2022)
- Folding over Neural Networks (2022)
- Markov Categories and Entropy (2022)
- Formal Algorithms for Transformers (2022)
- High-level axioms for graphical linear algebra (2022)
- Hyperbolic Deep Neural Networks: A Survey (2022)
- High-Resolution Image Synthesis with Latent Diffusion Models (2022)
- Hierarchical Text-Conditional Image Generation with CLIP Latents (2022)
- Kan Extensions in Data Science and Machine Learning (2022)
- Mathematical Foundations for a Compositional Account of the Bayesian Brain (2022)
- Generalized Lens Categories via functors C^op → Cat (2022)
- Learners' Languages (2022)
- Efficient Transformers: A Survey (2022)
- Message passing all the way up (2022)
- CHAD: Combinatory Homomorphic Automatic Differentiation (2022)
- Categories of Differentiable Polynomial Circuits for Machine Learning (2022)
- Functorial String Diagrams for Reverse-Mode Automatic Differentiation (2021)
- Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges (2021)
- Explaining Neural Scaling Laws (2021)
- Autoencoders (2021)
- A Survey of Complex-Valued Neural Networks (2021)
- Entropy as a Topological Operad Derivation (2021)
- Differential Equations in a Tangent Category I: Complete Vector Fields, Flows, and Exponentials (2021)
- Delta lenses as coalgebras for a comonad (2021)
- Named Tensor Notation (2021)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale (2021)
- Backprop as functor: a compositional perspective on supervised learning (2021)
- Meta-learning and Monads (2021)
- Escrows are optics (2021)
- TENSOR-RESTRICTION CATEGORIES (2021)
- Early Stopping in Deep Networks: Double Descent and How to Eliminate it (2021)
- 2-Dimensional Categories (2021)
- Entropy and Diversity: The Axiomatic Approach (2021)
- (Co)end Calculus (2021)
- A graph placement methodology for fast chip design (2021)
- Deep double descent: where bigger models and more data hurt* (2021)
- Category Theory in Machine Learning (2021)
- Differentiable causal computations via delayed trace (2021)
- Diagrammatic Differentiation for Quantum Machine Learning (2021)
- Reverse AD at Higher Types: Pure, Principled and Denotationally Correct (2021)
- A Comprehensive Survey on Graph Neural Networks (2021)
- Reverse Derivative Ascent: A Categorical Approach to Learning Boolean Circuits (2021)
- Change actions: from incremental computation to discrete derivatives (2020)
- Language Models are Few-Shot Learners (2020)
- String Diagrams for Optics (2020)
- Reverse Derivative Categories (2020)
- Internal lenses as functors and cofunctors (2020)
- Natural Graph Networks (2020)
- General Supervised Learning as Change Propagation with Delta Lenses (2020)
- Linear Mode Connectivity and the Lottery Ticket Hypothesis (2020)
- A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statistics (2020)
- Category Theory in Machine Learning (2020)
- Learning Functors using Gradient Descent (2020)
- The Crossroads of Categorical Algebra and Game Semantics (2020)
- A Categorical Semantics for Guarded Petri Nets (2020)
- Gaussian Error Linear Units (GELUs) (2020)
- Differentiable Weighted Finite-State Transducers (2020)
- Correctness of Automatic Differentiation via Diffeologies and Categorical Gluing (2020)
- Scaling Laws for Neural Language Models (2020)
- Unifying graded and parameterised monads (2020)
- Binary Neural Networks: A Survey (2020)
- Machine Learning Needs a Langlands Programme (2020)
- Poly: An abundant categorical setting for mode-dependent dynamics (2020)
- Automata Learning: An Algebraic Approach (2020)
- Dioptics: a common generalization of gradient-based learners and open games (2019)
- Category Theory for Autonomous and Networked Dynamical Systems (2019)
- Multiple model synchronization with multiary delta lenses with amendment andK-Putput (2019)
- Dioptics: a Common Generalization of Open Games and Gradient-Based Learners (2019)
- Towards safe artificial general intelligence (2019)
- The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks (2019)
- Lenses and Learners (2019)
- An Invitation to Applied Category Theory: Seven Sketches in Compositionality (2019)
- A 2-Categorical Study of Graded and Indexed Monads (2019)
- Compositional Deep Learning (2019)
- Higher Dimensional Categories: From Double To Multiple Categories (2019)
- Characterizing the invariances of learning algorithms using category theory (2019)
- Limits of bimorphic lenses (2019)
- A Brief History of Artificial Intelligence: On the Past, Present, and Future of Artificial Intelligence (2019)
- Universal Properties in Quantum Theory (2019)
- Categories for Quantum Theory: An Introduction (2019)
- Compositionality for Recursive Neural Networks (2019)
- Category Theory for Programmers (2019)
- PyTorch: An Imperative Style, High-Performance Deep Learning Library (2019)
- Recent Progress on Generative Adversarial Networks (GANs): A Survey (2019)
- Competitive Gradient Descent (2019)
- Recurrent Neural Networks (RNNs): A gentle Introduction and Overview (2019)
- Context and Compositionality in Biological and Artificial Neural Systems (2019)
- Grandmaster level in StarCraft II using multi-agent reinforcement learning (2019)
- Explainable AI: A Brief Survey on History, Research Areas, Approaches and Challenges (2019)
- A Review of Recurrent Neural Networks: LSTM Cells and Network Architectures (2019)
- A Compositional Framework for Passive Linear Networks (2018)
- JAX: composable transformations of Python+NumPy programs (2018)
- Neural Ordinary Differential Equations (2018)
- Speech-Transformer: A No-Recurrence Sequence-to-Sequence Model for Speech Recognition (2018)
- The simple essence of automatic differentiation (2018)
- Video recording of "The Simple Essence of Automatic Differentiation" (2018)
- An embedding theorem for tangent categories (2018)
- Lenses for philosophers (2018)
- AI researchers allege that machine learning is alchemy (2018)
- Deep Reinforcement Learning Doesn't Work Yet (2018)
- Bias Amplification in Artificial Intelligence Systems (2018)
- A Simple Neural Attentive Meta-Learner (2018)
- NIPS 2017 Test of Time Award "Machine learning has become alchemy.” Ali Rahimi, Google (2018)
- Categories of Optics (2018)
- Reinforcement Learning: An Introduction (2018)
- A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play (2018)
- Wasserstein GAN (2017)
- Nesterov's accelerated gradient and momentum as approximations to regularised update descent (2017)
- A Compositional Framework for Reaction Networks (2017)
- Automatic differentiation in machine learning: a survey (2017)
- The Calculus of Signal Flow Diagrams I: Linear relations on streams (2017)
- Picturing Quantum Processes: A First Course in Quantum Theory and Diagrammatic Reasoning (2017)
- Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks (2017)
- Diagrammatic Semantics for Digital Circuits (2017)
- Closure Conversion as CoYoneda (2017)
- Research Debt (2017)
- Attention is All you Need (2017)
- Unpaired Image-to-Image Translation Using Cycle-Consistent Adversarial Networks (2017)
- Learning to learn by gradient descent by gradient descent (2016)
- Layer Normalization (2016)
- Type-driven Development With Idris (2016)
- Group Equivariant Convolutional Networks (2016)
- Training Deep Nets with Sublinear Memory Cost (2016)
- Inverting Visual Representations with Convolutional Networks (2016)
- Incorporating Nesterov Momentum into ADAM (2016)
- Hybrid computing using a neural network with dynamic external memory (2016)
- Binarized Neural Networks (2016)
- Deep Residual Learning for Image Recognition (2016)
- Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks (2016)
- Categories in Control (2015)
- Batch normalization: accelerating deep network training by reducing internal covariate shift (2015)
- Adam: A Method for Stochastic Optimization (2015)
- Human-level control through deep reinforcement learning (2015)
- Inceptionism: Going Deeper into Neural Networks (2015)
- Understanding deep image representations by inverting them (2015)
- Deep neural networks are easily fooled: High confidence predictions for unrecognizable images (2015)
- Neural Networks, Types, and Functional Programming - colah's blog (2015)
- Categorical Probability Theory (2015)
- Polynomials and models of type theory (2015)
- Differential Structure, Tangent Structure, and SDG (2014)
- Deep AutoRegressive Networks (2014)
- Generative Adversarial Nets (2014)
- Neural Turing Machines (2014)
- Automata Learning: A Categorical Perspective (2014)
- Basic Category Theory (2014)
- Chasing Diagrams in Cryptography (2014)
- Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps (2014)
- Polynomial functors and polynomial monads (2013)
- Unifying structured recursion schemes (2013)
- Call-By-Push-Value (2013)
- Rectifier Nonlinearities Improve Neural Network Acoustic Models (2013)
- A Categorical Theory of Patches (2013)
- On the difficulty of training recurrent neural networks (2013)
- Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank (2013)
- Introduction to “This is Watson” (2012)
- Monoidal indeterminates and categories of possible worlds (2012)
- Monoidal categories in, and linking, geometry and algebra (2012)
- The Faà di Bruno construction (2011)
- Adaptive Subgradient Methods for Online Learning and Stochastic Optimization (2011)
- The Magnitude of an Enriched Category (2011)
- A Survey of Graphical Languages for Monoidal Categories (2011)
- Higher-Order Containers (2010)
- Lectures on N-Categories and Cohomology (2010)
- Mathematical Foundations for a Compositional Distributional Model of Meaning (2010)
- Icons (2010)
- Grothendieck construction for bicategories (2009)
- Cartesian differential categories (2009)
- Reverse-mode AD in a functional framework: Lambda the ultimate backpropagator (2008)
- Recursive coalgebras from comonads (2006)
- The Data-Flow Equations of Checkpointing in Reverse Automatic Differentiation (2006)
- Recursion Schemes for Dynamic Programming (2006)
- DIFFEOLOGICAL SPACES (2006)
- Why dependent types matter (2006)
- Categories of Containers (2003)
- Derivatives of Containers (2003)
- A NOTE ON ACTIONS OF A MONOIDAL CATEGORY (2001)
- Algorithm 799: revolve: an implementation of checkpointing for the reverse or adjoint mode of computational differentiation (2000)
- Universal coalgebra: a theory of systems (2000)
- Age of Spiritual Machines: When Computers Exceed Human Intelligence (1999)
- Categorical logic and type theory (1998)
- Monoidal Bicategories and Hopf Algebroids (1997)
- Long short-term memory (1997)
- Learning task-dependent distributed representations by backpropagation through structure (1996)
- Convolutional Networks for Images, Speech, and Time-Series (1995)
- A method of solving a convex programming problem with convergence rate O(1/k^2) (1993)
- The Dialectica categories (1989)
- Braided Monoidal Categories (1986)
- Basic Concepts of Enriched Category Theory (1982)
- V-indexed categories (1978)
- Coalgebras and cartesian categories (1976)
- Indicial methods for relative categories (1976)
- A Categorist's view of automata and systems (1975)
- Cognitron: A self-organizing multilayered neural network (1975)
- More Is Different (1972)
- Some methods of speeding up the convergence of iteration methods (1964)
- Computing Machinery and Intelligence (1950)