用统一框架连接学习与力学,揭示梯度下降与波动方程的数学同源性。
Compositional Dynamics in Learning and Mechanics
- 以操作符为语法,将学习与力学统一为可组合的动态系统语义。
- 同一参数化结构下,生成保守的波动方程与耗散的热方程两种动力学。
- 适用于神经网络训练与物理系统建模,支持模块化搭建与直接执行。
我们提出一个统一的组合设置,使基于梯度的学习与哈密顿力学成为函子语义。其语法由操作符Arr构成,对象为输入输出接口(流形对),态射为平滑自适应构型,包含响应式参数空间、由光滑映射定义的透镜及实值势能。论文核心技术是“透镜内化”:任意对称单边闭合范畴C上存在一个松弛对称双幺半群函子Lens(C) → C。利用它,我们构建两个函子Φ_phase、Φ_conf:Arr → PC,进入多项式余代数2-范畴——即输入输出离散动力系统。Φ_phase同时记录位置与动量,Φ_conf仅记录位置。对参数化函数应用Φ_conf,可恢复梯度下降算法,其中反向传播对应透镜的后向传递。对串联或有限有向图连接的谐振粒子系统,同一图示产生两种不同演化:Φ_phase给出离散波动方程(保守、二阶),Φ_conf给出离散热方程(耗散、一阶)。二者源于同一自适应构型,如共享相同势能。由于Arr是操作符,这些图可嵌套——大系统由小系统组合而成,且每种语义均函子性地从局部组装整体动力学。这些动力学还可执行:参数化神经网络与粒子图均通过相同构造编译为显式状态机,可直接运行。
原文摘要 · Abstract (English)
We give a single compositional setting in which gradient-based learning and Hamiltonian-style mechanics appear as functorial semantics. The syntax is an operad Arr whose objects are input-output interfaces (pairs of manifolds) and whose morphisms are *smooth adaptive arrangements*, which consist of a responsive parameter space, a lens given by smooth output and input maps, and a real-valued potential. The main technical result of the paper is what we call *lens internalization*, a lax symmetric monoidal functor Lens(C) $\to$ C associated to any symmetric monoidal closed category C. Using it, we provide two functors $Φ_\text{phase}$, $Φ_\text{conf}$: Arr $\to$ PC into the 2-category of polynomial coalgebras -- input-output discrete dynamical systems -- which we take as the semantics category. $Φ_\text{phase}$ stores both position and momentum, whereas $Φ_\text{conf}$ stores only position. When applied to a parameterized function, $Φ_\text{conf}$ recovers the gradient descent training algorithm, with backpropagation as the lens' backward pass. When applied to harmonic particles wired together -- in series, or according to any finite directed graph -- one diagram yields two different regimes, both of which are governed by the graph Laplacian: $Φ_\text{phase}$ gives the discrete wave equation, which is conservative and second-order, and $Φ_\text{conf}$ gives the discrete heat equation, which is dissipative and first-order. They are two semantics of one adaptive arrangement, e.g. with the same potential in each case. And because Arr is an operad, such diagrams nest -- larger systems wired from smaller ones -- and each semantics assembles a system's dynamics functorially from its parts. These dynamics are moreover executable: a parameterized neural network and a graph of particles both compile, by the same construction, to explicit state machines one can run.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。