mlsanityData to 14 Oct 2026

Topos Theory for Generative AI and LLMs

arXiv 2508.08293 ↗First posted 5 Aug 2025cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

We propose the design of novel categorical generative AI architectures (GAIAs) using topos theory, a type of category that is ``set-like": a topos has all (co)limits, is Cartesian closed, and has a subobject classifier. Previous theoretical results on the Transformer model have shown that it is a universal sequence-to-sequence function approximator, and dense in the space of all continuous functions with compact support on the Euclidean space of embeddings of tokens. Building on this theoretical result, we explore novel architectures for LLMs that exploit the property that the category of LLMs, viewed as functions, forms a topos. Previous studies of large language models (LLMs) have focused on daisy-chained linear architectures or mixture-of-experts. In this paper, we use universal constructions in category theory to construct novel LLM architectures based on new types of compositional structures. In particular, these new compositional structures are derived from universal properties of LLM categories, and include pullback, pushout, (co) equalizers, exponential objects, and subobject classifiers. We theoretically validate these new compositional structures by showing that the category of LLMs is (co)complete, meaning that all diagrams have solutions in the form of (co)limits. Building on this completeness result, we then show that the category of LLMs forms a topos, a ``set-like" category, which requires showing the existence of exponential objects as well as subobject classifiers. We use a functorial characterization of backpropagation to define a potential implementation of an LLM topos architecture.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 13 of its 27 references that are in the map. First posted on arXiv 5 Aug 2025.

Builds on

13 of 27 references.

References · 13

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
  3. 2018Self-Attention with Relative Position Representationscited by 1,120
  4. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
  5. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
  6. 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 139
  7. 2019An Attentive Survey of Attention Modelscited by 124
  8. 2023Tighter Bounds on the Expressivity of Transformer Encoderscited by 66
  9. 2019A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statisticscited by 56
  10. 2017Backprop as Functor: A compositional perspective on supervised learningcited by 44
  11. 2024Position: Categorical Deep Learning is an Algebraic Theory of All Architecturescited by 32
  12. 2021An enriched category theory of language: from syntax to semanticscited by 22
1 more
  1. 2024What makes Models Compositional? A Theoretical View: With Supplementcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023An Automated Survey of Generative Artificial Intelligence: Large Language Models, Architectures, Protocols, and Applications
  2. 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systems
  3. 2025Speed Always Wins: A Survey on Efficient Architectures for Large Language Models
  4. 2024LLM Augmented LLMs: Expanding Capabilities through Composition
  5. 2025Developing a Foundation of Vector Symbolic Architectures Using Category Theory
  6. 2025Detailed balance in large language model-driven agents
  7. 2024Designing Algorithms Empowered by Language Models: An Analytical Framework, Case Studies, and Insights
  8. 2023Beyond Words: A Mathematical Framework for Interpreting Large Language Models