Why discretization matters
Zero-order hold, stability regions, and why Mamba-3 swapped its integrator: the numerical analysis inside modern sequence models.
Mamba-3 landed this spring (Lahoti et al., ICLR 2026), from a team that includes the original Mamba authors. Its abstract lists three improvements, and the first is easy to read past: “a more expressive recurrence derived from SSM discretization.” Unpacked, it means something striking. Mamba-3 swapped its numerical integrator (the rule that converts a continuous-time model into the discrete steps a GPU actually runs), replacing a first-order update with a second-order trapezoidal rule.
There is no exotic neural machinery in that. The trapezoidal rule is textbook numerical analysis, and the theory that explains why it is the right upgrade was worked out by Dahlquist and the ODE community in the 1950s and ’60s. Yet in 2026 it sits at the center of a frontier sequence-model architecture.
This page is a short tour of why. The claim: for state-space models, discretization is not plumbing. It is a design axis, and stability, memory, and accuracy all hang off it.
A sequence model is an ODE in disguise
A structured state-space model (SSM) starts life as a linear ordinary differential equation:
The state is a vector of memory; the input is the signal — for a language model, ultimately the token stream. This is the same object control engineers have studied since the 1960s.
But a GPU does not see continuous time. It sees a sequence , so the model must be discretized: pick a step size and a rule that turns the continuous matrices into discrete counterparts , giving a recurrence
that approximates the flow of the ODE. That conversion rule is a numerical integrator, and everything in this story turns on which one you pick.
S4, the architecture that launched the modern SSM line, discretized with the bilinear transform — a rule we will meet properly below. Later SSMs, Mamba included, settled on discretizations built around the exact exponential , the zero-order hold (ZOH) and its close cousins: hold the input constant across each step and integrate the rest exactly. The recipe is the same either way, and one detail is crucial: is a learnable parameter — the network tunes its own timescale by gradient descent. Mamba pushes this further; we will get there. First: what could possibly go wrong?
Stability is geometry
The simplest integrator anyone writes down is forward Euler: follow the local slope, . To see why it can fail, look at one mode at a time (take diagonalizable — every matrix in this story is). If is an eigenvalue of , the discretization maps it to an eigenvalue of , and the recurrence multiplies that mode by at every step. After a thousand tokens, that is . The discrete model survives precisely when .
So the continuous and discrete worlds have different stability geographies. A continuous mode decays when — the left half-plane. A discrete mode survives when lies in the unit disk. A discretization is a map between these two pictures, and the whole question is where it sends the stable region.
ZOH sends , and whenever — for every step size . Decay in, decay out, unconditionally. Numerical analysts call such schemes A-stable; ZOH earns the label trivially, since is the exact solution map and exactness preserves decay. Forward Euler instead sends : a point marching along a straight line away from . For any decaying mode there is a finite threshold (for real , ) beyond which the image exits the disk, and the discrete model blows up even though the continuous system it approximates decays perfectly.

The eigenvalue map at a small step (): a damped oscillator’s two continuous eigenvalues (left) and their discrete images under forward Euler, ZOH, and bilinear (right). At this everyone agrees: all images sit safely inside the unit disk.
Small steps are safe for everyone. Trouble starts as grows — drag it:
For SSMs this is not a hypothetical, because is learned, and in Mamba it is computed per token from the input. Training explores -space freely. With an A-stable scheme, every the optimizer can reach yields a stable recurrence: HiPPO initialization is built to place ‘s eigenvalues in the left half-plane, and an A-stable rule (bilinear for S4, the family for Mamba) keeps their images inside the disk. That stability is a theorem, not a lucky hyperparameter (ch. 4).
Operator stability is the same dichotomy
The slider above moved the time-step and watched the discretization itself fail. The very same explicit-versus-implicit split lives one level in — inside the recurrence’s own update rule, on the learning step. Two modern sequence-model operators, DeltaNet and Longhorn, both run an online associative memory on a state : each token nudges toward writing value at key , one step of regression on a recall loss. The deviation from that fixed point contracts by a per-step factor in the key direction, and the two operators differ in exactly one place — whether that write step is taken explicitly or implicitly: forward Euler versus backward Euler again, now on the learning step instead of the time step.
DeltaNet writes with an explicit rate , so it is forward Euler on the online-learning flow — safe for gentle writes, unstable once the write is too large:
Longhorn writes implicitly — it solves for the step instead of extrapolating it — which makes the effective rate shrink to meet the key. That is backward Euler’s A-stability guarantee, replayed:
Fix and both radii live on one axis — the write strength . Drag it past and watch only the explicit operator leave the stable band:
Drag ‖k‖² past 2 — which operator blows up?
The harder the write, the harder Longhorn contracts it ( as ), so there is no boundary to cross. The two radii even obey a conservation law, : whatever contraction Longhorn gives up, it spends on a self-limiting write, so the effective approaches but never reaches — not even half the explicit boundary of , no matter how large the key. The closed forms, the Rayleigh-quotient drift guard that pins them to the materialized iteration matrix, and the chunkwise-parallel implementations are in ch. 12 of the book (runnable companion code).
Accuracy is a ladder
Staying stable is not the same as being right: the discrete model should also track the continuous one. The standard yardstick is the order of accuracy: error shrinking like as the step refines. ZOH is exact on the unforced system ( is the true flow map), but it freezes the input across each step, which costs it accuracy on forced systems: first order, .

Error vs step size on a forced damped oscillator (log–log). Forward Euler and ZOH converge at first order (slope ); the bilinear transform converges at second order (slope ). Empirical slopes, measured against a high-accuracy implicit reference (SciPy’s Radau integrator, rtol ).
Climbing the ladder means letting the input vary across the step, and the classical way to do that is the trapezoidal rule: average the endpoints. In the SSM world it shows up in two guises:
- The bilinear (Tustin) transform: , a Möbius transformation that maps the left half-plane exactly onto the unit disk. A-stable and second-order.
- The exponential-trapezoidal family: keep the exact for the state and apply the trapezoid only to the input integral. Exact on the unforced system and second-order on the forced one: ZOH’s best property and bilinear’s, simultaneously.

The exponential-trapezoidal scheme joins bilinear at second order (slope ) while retaining ZOH’s exact treatment of the autonomous flow — the combination Mamba-3’s discretization builds on (same Radau reference).
More precision: the Dahlquist barrier
Dahlquist’s second barrier theorem (1963): an A-stable linear multistep method cannot exceed order 2, and among A-stable order-2 methods the trapezoidal rule has the smallest error constant. If you insist on unconditional stability in that family, second order is the ceiling — and the trapezoidal rule sits exactly at it. Explicit methods such as forward Euler cannot be A-stable at all: their stability regions are bounded sets. The full machinery — Butcher tableaus, stability functions, region plots for the schemes above — is in ch. 5 of the book.
More precision: computing and
ZOH’s input matrix is — awkward when is singular or badly conditioned. The standard trick: build the augmented block matrix with and in the top row and zeros below, and take one matrix exponential; and appear as blocks of the result, no inverse required (a construction going back to Van Loan 1978). The -functions of the exponential-trapezoidal scheme fall out of the same construction with one more block (Al-Mohy & Higham 2011 give the modern treatment). Derivation in ch. 4, production implementations in the companion code.
Selectivity is adaptive stepping
Through this lens, Mamba’s signature “selectivity” reads as something an ODE person already knows. Mamba computes from the current token: the network runs an adaptive step size, the same idea every production ODE solver has used for decades. A small barely advances the state (hold your memory); a large one integrates far (reset toward the new input); is simultaneously the stability knob and the memory horizon. The discretization is the gating mechanism.
Which makes Mamba-3’s headline change read like the natural next move from the numerical-analysis playbook. The first-order update was the accuracy bottleneck (the paper pins its predecessors’ rule down as exponential-Euler: exact exponential for the state, Euler for the input), so it is replaced with a generalized trapezoidal rule — in its own terms an exponential-trapezoidal discretization: exact exponential for the state, trapezoid for the input, second-order and A-stable, the very ceiling Dahlquist’s barrier sets in the classical constant-step theory. Mamba-3 combines it with a second, independent upgrade, a complex-valued state, so each mode can rotate as well as decay (ch. 10 develops the scheme in full). The reported payoff is concrete, for the system as a whole: perplexity comparable to Mamba-2 with half the state size, plus gains on retrieval and state-tracking. The paper credits its three changes together; better numerics helped buy that memory.
The theory underneath (A-stability, order conditions, the barrier theorems, the equivalence results that tie consistency and stability to convergence) was finished before “sequence model” meant anything neural. None of this is my invention, and that is the point: the bridge between classical numerical analysis and modern architectures is short, load-bearing, and still being crossed. If this page pulled you across it, the book below walks the whole span, with derivations, exercises, and runnable companions.
Sources & going deeper
- The paper: Lahoti, Li, Chen, Wang, Bick, Kolter, Dao & Gu, Mamba-3: Improved Sequence Modeling using State Space Principles, ICLR 2026 (OpenReview · arXiv:2603.15569).
- The derivations, in my in-progress foundations book: ch. 4 — discretization theory · ch. 5 — stability regions · ch. 10 — Mamba-3’s integrator · ch. 12 — the delta-rule lineage (DeltaNet, Longhorn).
- The architectural context: ch. 7 — HiPPO · ch. 8 — S4/S4D/S5 · ch. 9 — selective SSMs.
- The figures on this page are regenerated from the book’s JAX companion code; the slopes in the captions reproduce on every run.
- Also in the lab: an interactive citation graph of the RL + optimal-control literature, built on the same research pipeline.
- Back to: the Lab gallery · the research threads this explainer supports.