Papers
Topics
Authors
Recent
Search
2000 character limit reached

TOSE: Tiled Operator-Space Evolution in SSMs

Updated 4 January 2026
  • TOSE is a core algorithmic primitive that achieves exact analytical differentiation in linear state-space models with strict O(1) memory usage via tiling.
  • It reframes gradient computation as forward evolution of an augmented dynamical system, detaching intermediate histories to eliminate memory scaling with sequence length.
  • Empirical results show TOSE reduces VRAM usage by up to 94% and improves throughput significantly, making it ideal for large-scale applications like genomics.

Tiled Operator-Space Evolution (TOSE) is a core algorithmic primitive for O(1)-memory exact analytical differentiation through linear state-space models (SSMs), enabling efficient sensitivity analysis for large-scale sequence modeling tasks. TOSE reframes the gradient computation as the forward evolution of an augmented dynamical system, exploiting the associative structure of operator evolution and leveraging a tiling and scan-based protocol to eliminate the memory overhead inherent in conventional backpropagation. TOSE supports applications such as chromosome-scale modeling in genomics, where conventional Autograd approaches encounter prohibitive memory costs.

1. Theoretical Basis and Role in Phase Gradient Flow

TOSE is underpinning the Phase Gradient Flow (PGF) framework, which addresses the memory bottleneck in gradient-based sensitivity analysis for large SSMs. PGF interprets backpropagation through a linear recurrence as the forward evolution of a “tangent” dynamical system. For a discrete-time SSM defined by

xt+1=Axt+But,yt=Cxt+Dut,x_{t+1} = A x_t + B u_t,\qquad y_t = C x_t + D u_t,

the Fréchet derivative product yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t evolves under a linear recurrence isomorphic to the original dynamics.

TOSE leverages this dynamical isomorphism by tiling the sequence into fixed-size blocks. Within each tile, both the primal and tangent systems are evolved via a parallel scan over associative operator products. The computational graph is detached at tile boundaries, resulting in memory usage that does not scale with sequence length LL. This enables strictly O(1) differentiation graph memory in LL (Wang et al., 28 Dec 2025).

2. Mathematical Foundation

2.1 Primal and Tangent Recursions

Given xtRnx_t \in \mathbb{R}^n, ut,ytRdu_t, y_t \in \mathbb{R}^d and allowing for diagonal or block-diagonal, possibly time-varying system matrices (as in Mamba/S4), the tangent dynamics for sensitivity analysis (the variation xt:=xt/uu\nabla x_t := \partial x_t / \partial u \cdot \nabla u) satisfy

xt+1=Axt+(A/utut)xt+(B/utut)ut+But,\nabla x_{t+1} = A \nabla x_t + (\partial A / \partial u_t \cdot \nabla u_t)x_t + (\partial B / \partial u_t \cdot \nabla u_t)u_t + B \nabla u_t,

yt=Cxt+Dut,\nabla y_t = C \nabla x_t + D \nabla u_t,

where, in the diagonal SSM setting, all derivatives and per-step operators remain element-wise linear.

2.2 Augmented Operator-Space

The triplet (xt,xt,1)(x_t, \nabla x_t, 1) is encoded as a single augmented vector, and an augmented block-matrix recurrence is defined: yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t0 where each yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t1 is

yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t2

with yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t3 and yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t4.

The associativity yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t5 allows parallel prefix scan computation of these operator products. The diagonal structure reduces the computation, for each coordinate, to products of compact (yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t6) blocks.

3. Tiling and Parallel Scan Protocol

Sequence length yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t7 is partitioned into tiles of size yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t8. For each tile yt=DF[u]ut\nabla y_t = D\mathcal{F}[u] \cdot \nabla u_t9 spanning steps LL0, the per-step operator LL1 is constructed and a parallel scan (prefix product) is performed over the block. Only the state at the tile boundary is retained for subsequent computation, and intermediate autograd history within the tile is detached, yielding memory complexity independent of LL2.

The TOSE protocol is formalized as follows:

Step Operation Memory Effect
a) Load block inputs LL3 No graph growth
b) Build per-step operators Construct LL4 for tile Per-step, local
c) ParallelScan over LL5 Compute LL6 Intra-tile only
d) Output sensitivity LL7 Store external output
e) Boundary state detach LL8 updated via .detach() Limits recursive history

TOSE relies on an arbitrary associative parallel prefix-product implementation (e.g., tree-based scan) to combine per-step operators within each tile.

4. Memory Complexity and Differentiation Graph Architecture

By detaching computational history at tile boundaries, the memory footprint for automatic differentiation is proportional to LL9, a strict constant in LL0 as LL1. All input and output tensors (e.g., LL2) retain linear scaling in LL3, but these are not part of the recursive differentiation graph. TOSE thus guarantees strictly O(1) memory scaling for the differentiation graph with respect to sequence length.

5. Numerical Stability in Stiff ODE Regimes

Conventional parallel scan algorithms exhibit catastrophic underflow or overflow for very stiff ODEs (e.g., LL4 with eigenvalues LL5) in finite precision arithmetic. TOSE incorporates a "log-shifting stabilizer," normalizing intermediate products within each tile by subtracting the local maximum log-magnitude prior to exponentiation and restoring the shift post-scan. Analytical error analysis demonstrates that the relative error after LL6 steps is bounded by

LL7

with LL8 governed by the spectral radius of LL9 (xtRnx_t \in \mathbb{R}^n0 in typical scenarios). Empirical regression of error versus xtRnx_t \in \mathbb{R}^n1 shows no slope (xtRnx_t \in \mathbb{R}^n2), confirming no error accumulation with increasing sequence length. This distinguishes TOSE from naive parallel prefix schemes, which fail under extreme stiffness for large xtRnx_t \in \mathbb{R}^n3 (Wang et al., 28 Dec 2025).

6. Empirical Performance and Scalability

6.1 Memory Utilization

Standard Autograd backpropagation incurs xtRnx_t \in \mathbb{R}^n4 activation storage; at xtRnx_t \in \mathbb{R}^n5, a single layer exceeds xtRnx_t \in \mathbb{R}^n6 GB VRAM. TOSE maintains graph memory at a constant level irrespective of xtRnx_t \in \mathbb{R}^n7. Across xtRnx_t \in \mathbb{R}^n8, PGF achieves a xtRnx_t \in \mathbb{R}^n9 reduction in peak VRAM usage on NVIDIA RTX 5090 hardware.

6.2 Throughput

On an RTX 5060 Laptop GPU, PGF demonstrates ut,ytRdu_t, y_t \in \mathbb{R}^d0 throughput improvement over reverse-mode Autograd at ut,ytRdu_t, y_t \in \mathbb{R}^d1, and sustains ut,ytRdu_t, y_t \in \mathbb{R}^d2 higher throughput for ut,ytRdu_t, y_t \in \mathbb{R}^d3 (“chromosome scale”). This efficiency was evaluated via samples per second (see Figures 1 and 3 in (Wang et al., 28 Dec 2025)).

6.3 Sensitivity Analysis Benchmarks

In a ut,ytRdu_t, y_t \in \mathbb{R}^d4-step impulse-response (“Ghost Pulse”) benchmark, TOSE precisely recovers micro-perturbations at late timesteps (ut,ytRdu_t, y_t \in \mathbb{R}^d5) without numerical leakage, a regime where Autograd encounters out-of-memory failure in multi-layered models.

7. Applications and Significance

TOSE enables feasible genome-scale sensitivity analysis (ut,ytRdu_t, y_t \in \mathbb{R}^d6) on single 8–12 GB GPUs. This bridges the practical gap between infinite-context theoretical models and existing hardware constraints. The protocol is applicable to any linear SSM and directly supports models with diagonal or block-diagonal system matrices, including Mamba and S4 variants.

A plausible implication is that TOSE could generalize to other operator evolution domains beyond SSMs, provided they admit associative and scan-friendly forms. The minimal error accumulation and strict memory guarantees position TOSE as a foundational tool for large-scale differentiable modeling, particularly in genomics, signal processing, and other sequence analysis contexts where computational memory was previously prohibitive (Wang et al., 28 Dec 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Tiled Operator-Space Evolution (TOSE).