arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.11624math.GMcs.LG
收藏

Token Space:AI计算的一个范畴论框架

Token Space: A Category Theory Framework for AI Computations

College of Computer Science, Sichuan University(四川大学计算机学院)

Wuming Pan

AI总结:

本文提出Token Space范畴论框架,将AI计算建模为Token映射,证明其范畴性质,并应用于Transformer自注意力与知识蒸馏,实现结构保持的压缩。

摘要:

我们引入了Token Space,一个用于AI计算的范畴论框架。Token是一个有限元组,其条目是载体集的元素或固定核心的符号;Token类是一个集合连同这样的Token的一个堆(heap),Token映射是保持每个Token的函数。Token Space通过并置恒等集合范畴、形成乘积并取子集扩展,从集合范畴构建而来。我们证明了所得范畴具有所有有限极限、有限余积和指数对象,但与Set不同,它们不是topoi。然后我们引入了代数tokenization:一个结构化集合的常量、关系和运算图被记录为以核心符号为首的Token。这给出了每个有限范畴的忠实且全忠实嵌入,将结构化对象(点集、序、图、环、向量空间)嵌入到Token Space中,并保持二元乘积和等化子;拓扑空间也忠实嵌入。树Token捕获嵌套结构,算子演算作用于Token类。作为应用,我们描述了序列数据和Transformer的自注意力层:置换等变层恰好是序列类之间的Token映射,层是指数类的点,因此架构是Token映射而参数是基的点。知识蒸馏成为保持结构的压缩:当且仅当学生是从教师诱导类的Token映射时,学生对教师是忠实的;教师的对称性由学生继承;既不丢失也不发明结构事实的最小压缩是关于不可区分同余的商。

英文摘要:

Token Space is a categorical framework and mathematical language for AI computations. It connects internal relations, program descriptions, execution states and observations, locating questions about structure, behavior and cost at their appropriate levels. Five guiding positions concern structural interiors, categorical self-description, interfaces, occurrence identity and extensible computation. Tokens are finite records of carrier elements and fixed symbols; Token maps preserve selected heaps. The elementary category is a quasitopos, hence locally cartesian closed, but not a topos. Algebraic tokenization is fully faithful for fixed finitary signatures. Represented finite mappings admit concurrent graph execution, gluing, functorial frontiers and exact state migration characterized by kernel inclusion. Transformers are one implementation family. Coherent occurrence prefixes yield natural numerical maps, and a cache invariant proves agreement with full-prefix evaluation. A prescribed access policy determines the least retained index set under a no-reconstruction discipline. Parameterised state expresses changing interfaces. For a specified future-observation heap, structural indiscernibility is behavioral equivalence. An encoding admits exact incremental execution precisely when its kernel is a right congruence contained in that equivalence; every reachable exact realization maps uniquely onto the behavioral quotient. Teacher-induced heaps and declared readouts connect these constructions to distillation and explicit knowledge. The definitions, examples and theorems demonstrate how the language joins lines of reasoning while distinguishing representation, execution and observation. Effective implementations and quantitative performance remain further questions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑