A Rose by Any Other Name Would Smell as Sweet: Categorical Homotopy Theory for Large Language Models
Not on the map. Why?
Abstract (arXiv)
Natural language is replete with superficially different statements, such as ``Charles Darwin wrote" and ``Charles Darwin is the author of", which carry the same meaning. Large language models (LLMs) should generate the same next-token probabilities in such cases, but usually do not. Empirical workarounds have been explored, such as using k-NN estimates of sentence similarity to produce smoothed estimates. In this paper, we tackle this problem more abstractly, introducing a categorical homotopy framework for LLMs. We introduce an LLM Markov category to represent probability distributions in language generated by an LLM, where the probability of a sentence, such as ``Charles Darwin wrote" is defined by an arrow in a Markov category. However, this approach runs into difficulties as language is full of equivalent rephrases, and each generates a non-isomorphic arrow in the LLM Markov category. To address this fundamental problem, we use categorical homotopy techniques to capture ``weak equivalences" in an LLM Markov category. We present a detailed overview of application of categorical homotopy to LLMs, from higher algebraic K-theory to model categories, building on powerful theoretical results developed over the past half a century.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 21 of its 60 references that are in the map. First posted on arXiv 7 Aug 2025.
Builds on
21 of 60 references.
References · 21
- 2017Attention Is All You Needcited by 60,361
- 2019Generative Modeling by Estimating Gradients of the Data Distributioncited by 4,101
- 2018UMAP: Uniform Manifold Approximation and Projection for Dimension Reductioncited by 2,898
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
- 2018Self-Attention with Relative Position Representationscited by 1,120
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 800
- 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 737
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
- 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 139
- 2019An Attentive Survey of Attention Modelscited by 124
- 2019A synthetic approach to Markov kernels, conditional independence and theorems on sufficient statisticscited by 56
- 2017Backprop as Functor: A compositional perspective on supervised learningcited by 44
9 more
- 2021lambeq: An Efficient High-Level Python Library for Quantum NLPcited by 44
- 2024Logits of API-Protected LLMs Leak Proprietary Informationcited by 40
- 2017Disintegration and Bayesian Inversion via String Diagramscited by 32
- 2018Causal Inference by String Diagram Surgerycited by 24
- 2019The Mathematics of Text Structurecited by 24
- 2017A* CCG Parsing with a Supertag and Dependency Factored Modelcited by 22
- 2021An enriched category theory of language: from syntax to semanticscited by 22
- 2022The d-separation criterion in Categorical Probabilitycited by 12
- 2024Can You Learn Semantics Through Next-Word Prediction? The Case of Entailmentcited by 9
Built on by
Citing papers per year: 2025: 1.
1 paper.