Compositional Dynamics in Learning and Mechanics

📅 2026-06-27
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the absence of a unified framework that integrates gradient-based learning with Hamiltonian mechanics for dynamic modeling. It proposes a compositional semantic framework grounded in the category of arrays (Arr), unifying parameterized learning systems and physical particle systems as input–output discrete dynamical systems within polynomial coalgebras via internalized lens functors. For the first time, this framework derives two fundamentally distinct dynamical semantics—gradient descent and wave/heat equations—within a single structural setting, while supporting nested system composition. Leveraging tools from category theory and differential geometry, including symmetric monoidal closed categories, lenses, and graph Laplacians, the approach compiles both neural network training and particle network dynamics into executable state machines. Empirical validation demonstrates the framework’s expressiveness and unifying capacity by successfully reproducing three distinct classes of dynamical behavior.
📝 Abstract
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 reactive 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.
Problem

Research questions and friction points this paper is trying to address.

compositional dynamics
gradient-based learning
Hamiltonian mechanics
functorial semantics
adaptive arrangements
Innovation

Methods, ideas, or system contributions that make the work stand out.

compositional dynamics
lens internalization
functorial semantics
operad
polynomial coalgebras
🔎 Similar Papers