Hostname: page-component-74656f9884-c52kr Total loading time: 0 Render date: 2026-11-07T09:35:49.017Z Has data issue: false hasContentIssue false

Differentiable causal computations via delayed trace (extended version)

Published online by Cambridge University Press:  22 April 2025

David Sprunger*
Affiliation:
Indiana State University, Terre Haute, IN, USA
Shin-ya Katsumata
Affiliation:
National Institute of Informatics, Chiyoda, Tokyo, Japan
*
Corresponding author: David Sprunger; Email: david.sprunger@indstate.edu
Rights & Permissions [Opens in a new window]

Abstract

We investigate causal computations, which take sequences of inputs to sequences of outputs such that the $n$th output depends on the first $n$ inputs only. We model these in category theory via a construction taking a Cartesian category $\mathbb{C}$ to another category $\mathrm{St}(\mathbb{C})$ with a novel trace-like operation called “delayed trace,” which misses yanking and dinaturality axioms of the usual trace. The delayed trace operation provides a feedback mechanism in $\mathrm{St}(\mathbb{C})$ with an implicit guardedness guarantee. When $\mathbb{C}$ is equipped with a Cartesian differential operator, we construct a differential operator for $\mathrm{St}(\mathbb{C})$ using an abstract version of backpropagation through time (BPTT), a technique from machine learning based on unrolling of functions. This obtains a swath of properties for BPTT, including a chain rule and Schwartz theorem. Our differential operator is also able to compute the derivative of a stateful network without requiring the network to be unrolled.

Information

Type
Special Issue: Differential Structures
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Figure 1. A basic causal device.

Figure 1

Figure 2. A simple RNN.

Figure 2

Figure 3. 2-cells in a double category.

Figure 3

Figure 4. Underlying morphisms for composites of 2-cells.

Figure 4

Figure 5. A stateful morphism sequence and a truncation.

Figure 5

Figure 6. Composition of stateful morphism sequences.

Figure 6

Figure 7. Equalities satisfied by delayed trace operator.

Figure 7

Figure 8. Underlying morphisms for Definition 31.

Figure 8

Figure 9. String diagrams for property 1.