编织、导线与态射:形式化和实现深度学习的代数
Weaves, Wires, and Morphisms: Formalizing and Implementing the Algebra of Deep Learning
AI总结:
本文提出一种基于范畴论的深度学习框架,通过轴步长和数组广播范畴形式化广播机制,实现模型架构的数学表达与组合操作,并提供Python和TypeScript实现展示其通用性。
摘要:
尽管深度学习模型运行着明确的数学函数,但我们缺乏描述模型架构的正式数学框架。本文引入了一个针对深度学习模型的范畴框架,通过新颖的轴步长和数组广播范畴形式化广播机制。这使得架构底层的数学函数能够以组合的方式精确表达和操作。这些数学定义被转化为人类可理解的图表和机器可处理的数据结构。我们提供了Python(pyncd)和TypeScript(tsncd)的镜像实现,以展示该框架的通用性,包括代数构造、图转换、PyTorch编译和图表渲染等功能。这为深度学习模型设计和分析提供了系统、正式的方法基础。
英文摘要:
Despite deep learning models running well-defined mathematical functions, we lack a formal mathematical framework for describing model architectures. Ad-hoc notation, diagrams, and pseudocode poorly handle nonlinear broadcasting and the relationship between individual components and composed models. This paper introduces a categorical framework for deep learning models that formalizes broadcasting through the novel axis-stride and array-broadcasted categories. This allows the mathematical function underlying architectures to be precisely expressed and manipulated in a compositional manner. These mathematical definitions are translated into human manageable diagrams and machine manageable data structures. We provide a mirrored implementation in Python (pyncd) and TypeScript (tsncd) to show the universal aspect of our framework, along with features including algebraic construction, graph conversion, PyTorch compilation and diagram rendering. This lays the foundation for a systematic, formal approach to deep learning model design and analysis.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。