arXiv:2508.08293cs.AI2025-08被引 1

用范畴论拓扑构建新型生成模型架构,让大语言模型具备数学完备性。

Topos Theory for Generative AI and LLMs

  • 基于拓扑理论设计可组合的生成模型新结构
  • 证明语言模型类别具备完备性和集合类性质
  • 适合对模型数学基础感兴趣的学者和架构研究者

我们提出使用拓扑理论(topos theory)设计新型范畴化生成人工智能架构(GAIAs),这类范畴具有类似集合的性质:包含所有(余)极限、笛卡尔闭合,并拥有子对象分类器。已有理论表明,Transformer 是一个通用序列到序列函数逼近器,在嵌入空间上连续函数的紧支集空间中稠密。在此基础上,我们探索了利用语言模型作为函数时所构成的范畴具有的拓扑性质。以往研究集中于链式线性结构或专家混合模型,本文则通过范畴论中的泛构造,基于语言模型范畴的泛性质,构建全新的可组合结构,包括拉回、推出、(余)等化子、指数对象和子对象分类器。我们理论上验证了该范畴的(余)完备性,即所有图都有解(以(余)极限形式)。进一步,我们证明语言模型范畴构成一个拓扑,即“集合类”范畴,需满足指数对象与子对象分类器的存在性。最后,通过反向传播的函子化刻画,定义了拓扑语言模型架构的潜在实现方式。

原文摘要 · Abstract (English)

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.

生成模型范畴论大模型架构

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。