say hi
FOUNDATIONS · A PREQUEL TO FROM THE LINEAR ODE TO MAMBA-3

What a state is.

The deep-learning literature on state space models begins in medias res: it writes down \(\dot x = Ax + Bu\), \(y = Cx\), and proceeds at once to the question of computing with it quickly. That equation is not new. It is the central object of a mature subject with sixty-five years of theorems attached, and almost every structural fact the modern papers rely on is one of those theorems — usually with a name. These notes develop that subject, from the definition of state up to the point where Part 00 of the companion notes begins.

// HANKEL RANK = STATE SIZE · LIVE
true order n 3
samples seen 0
measured rank—
σ gap —
status filling
the rank of the block on the left is the size of the state — nothing else is
impulse response \(h_j = CA^jB\) Hankel matrix \(\mathcal{H}_{ij}=h_{i+j}\) singular values \(\sigma_k\), log scale the true order \(n\)

Fig. 0 — A system of order \(n\) is switched on and its impulse response streams in. From those numbers alone we build the Hankel matrix and take its singular values. They collapse to zero after exactly \(n\) of them — and not before you have seen about \(2n\) samples, which is the smallest amount of data from which the order can possibly be read. Add measurement noise and the collapse becomes a cliff of finite height: the order is still visible, but only down to the noise floor. Everything in §3 is contained in this picture.

That is the thesis of this document, stated before any of the machinery. The size of the state is not a hyperparameter of the model; it is a property of the operator the model is trying to be, it is computable from data, and there is a classical theory telling you what it costs to use fewer coordinates than the truth requires. The modern literature re-derives large parts of that theory under new names, and reads much more clearly once you have the old ones.

how to read this

Parts 0–4 are classical linear systems theory and are the backbone. If you read only part of this page, read those. Part 5 (discretisation) and Part 7 (the Kalman filter, set up by Part 6) are where the classical theory maps onto a modern architecture almost line for line, and they are the parts most likely to change how you read Mamba. Parts 8–9 are the approximation theory and the algorithmic toolbox, 10–11 the history and the dictionary, 12 the exercises — each with its answer folded away behind a click — and 13 the references.

Prerequisites are honest ones: linear algebra through eigenvalues and the SVD, multivariable calculus, a first course in probability. No control theory is assumed. Every figure computes its own numbers in your browser from the formulas in the text — including the ones that are supposed to fail.

PART 00

What a state is

the definition everything else is downstream of

Everything in this subject follows from one definition, and the definition is not about matrices at all. Consider any system that consumes an input sequence \(u_0,u_1,u_2,\dots\) and emits outputs causally, so that \(y_k\) may depend on \(u_0,\dots,u_k\) and on nothing later. Ask when two different histories become interchangeable.

Declare two histories equivalent if, for every continuation \(v_1,v_2,\dots\), the two futures produce identical outputs. This is an equivalence relation, and the set of its classes is the state space of the system; the class of the history observed so far is the state. A history's class is exactly the information about the past that the future can still detect. Everything else has already been forgotten — by the system, not by us.

the two properties that make the notion useful

Sufficiency. The future output depends on the past only through the state. This is the deterministic form of the Markov property, and it is what makes a fixed-size memory conceivable at all.

Recursiveness. The state can be maintained online. If \(s\) is the class of \(u_{0:k-1}\) and we observe \(u_k\), the class of \(u_{0:k}\) is determined by \(s\) and \(u_k\) alone — otherwise two histories in \(s\) would be distinguished by a continuation beginning with \(u_k\), contradicting equivalence. So there is a well-defined \(s_k=F(s_{k-1},u_k)\) and a readout \(y_k=G(s_k,u_k)\).

This construction is Nerode's in automata theory (1958) — where the classes of a regular language are the states of its minimal automaton — and Kalman's in the linear setting, where the classes form a vector space whose dimension has a name, the McMillan degree. The pair (sufficiency, recursiveness) is precisely what a sequence model wants, which is why this subject is relevant to sequence modelling in the first place. An architecture that keeps a fixed-size vector and updates it token by token is placing a bet: that a state space of that size is large enough for the task.

The figure below is the definition, executed. Two entirely different input histories are constructed to leave the system in the same state; from that moment they are fed the same continuation, and their outputs coincide to machine precision. Then perturb the second history so the states no longer agree, and watch the futures separate.

VIZ 00two pasts, one state · sufficiency made numerical computed live
history A, then the shared continuation history B (different past, same state) the moment the histories end \(\|x_A - x_B\|\) at the junction

Fig. 0.1 — Left of the divider the two inputs have nothing in common; right of it the outputs agree to \(10^{-15}\). Nudge \(\varepsilon\) off zero and the agreement degrades smoothly and immediately: the state is not merely sufficient, it is the only thing that is. Raising \(N\) makes the pair of histories harder to construct but changes nothing about the conclusion.

Specialise now to a linear, time-invariant system. The classes form a vector space, and the system can be written in the standard way — continuous time, one input and one output:

\[ \dot x(t) = Ax(t) + Bu(t), \qquad y(t) = Cx(t) + Du(t) \] (1)

with \(A\in\mathbb{R}^{N\times N}\), \(B\in\mathbb{R}^{N\times1}\), \(C\in\mathbb{R}^{1\times N}\). Discrete time is the same statement with \(x_k=\bar Ax_{k-1}+\bar Bu_k\). This is the base object of the companion notes, and Parts 1–4 here take it apart.

where this is used

Exercise 0.3 of the companion notes asks how many of the \(N^2+2N\) parameters of \((A,B,C)\) are identifiable from the input–output map. The answer is \(2N\), and the reason is the construction above: the map determines the state space only up to a choice of basis. We prove it in §3.4. Everything S4 does when it picks a convenient \(A\) is licensed by that theorem and by nothing else.

PART 01

The exponential, and the trouble with eigenvectors

two facts about matrix functions that decided two architectures

Before the systems theory, the linear algebra — because two properties of the matrix exponential settle questions the companion notes raise much later. The exponential is a similarity invariant, which is what makes canonical forms free; and the price of a similarity is the conditioning of the basis, which is what killed the naive diagonalisation of HiPPO.

1.1 — Definition and the three properties we need

For \(A\in\mathbb{C}^{N\times N}\) define \(e^{At}:=\sum_{k\ge0}(At)^k/k!\), convergent for every \(A\) and \(t\) since the series is dominated by \(e^{\|A\||t|}\). Three properties, each provable straight from the series:

  1. \(\frac{d}{dt}e^{At}=Ae^{At}=e^{At}A\), so \(t\mapsto e^{At}\) solves \(\dot X=AX\), \(X(0)=I\).
  2. \(e^{A(t+s)}=e^{At}e^{As}\) — a one-parameter group. But \(e^{A+B}\ne e^Ae^B\) unless \(AB=BA\).
  3. \(e^{V^{-1}AVt}=V^{-1}e^{At}V\), because the identity holds term by term.

Property 3 is small and load-bearing. It says the exponential does not see the basis, which is the whole content of Exercise 0.1 in the companion notes: \((A,B,C)\) and \((V^{-1}AV,V^{-1}B,CV)\) have the same impulse response \(Ce^{At}B\), hence define the same operator on inputs.

1.2 — Diagonal, Jordan, Schur — and normal

If \(A\) has \(N\) independent eigenvectors then \(A=V\Lambda V^{-1}\) and \(e^{At}=Ve^{\Lambda t}V^{-1}\), reducing a matrix function to \(N\) scalar ones. That is why "diagonalise it" is the reflex. Three refinements matter.

Not every matrix is diagonalisable, but the exceptional set — a repeated eigenvalue that is defective — is a proper algebraic subvariety, hence of measure zero. So "almost every matrix is diagonalisable over \(\mathbb{C}\)" is genuinely-almost rather than secretly-always, and it is doing real work in the diagonal turn of S4D and DSS.

Every matrix is unitarily triangularisable (Schur): \(A=QTQ^*\) with \(Q\) unitary and therefore perfectly conditioned. File this as the safe fallback that numerical linear algebra actually uses.

Normality is the dividing line. Call \(A\) normal if \(AA^*=A^*A\). The spectral theorem: \(A\) is normal exactly when it is diagonalisable by a unitary \(V\). Symmetric, skew-symmetric and orthogonal matrices are normal; a triangular matrix with all its mass on one side is typically as far from normal as a matrix gets. HiPPO-LegS is of the latter kind — and that is not incidental to its usefulness.

1.3 — How wrong a diagonalisation can go

Theorem (Bauer–Fike, 1960)

Let \(A=V\Lambda V^{-1}\) be diagonalisable and \(\kappa(V)=\|V\|\,\|V^{-1}\|\). Every eigenvalue \(\mu\) of \(A+E\) satisfies \(\min_j|\mu-\lambda_j|\le\kappa(V)\|E\|\).

The proof is three lines and worth doing: if \(\mu\notin\operatorname{spec}(A)\) then \((\Lambda-\mu I)^{-1}V^{-1}EV\) has an eigenvalue \(1\), so its norm is at least one; bound the product of norms. Read the theorem as a budget. Floating point guarantees \(\|E\|\approx\varepsilon\|A\|\) with \(\varepsilon\approx2^{-53}\), so eigenvalues are trustworthy to about \(\kappa(V)\varepsilon\|A\|\). For a normal matrix \(\kappa(V)=1\) and you lose nothing. For HiPPO-LegS, S4 Lemma 3.2 computes \(V\) in closed form and finds entries of size \(2^{4N/3}\); at \(N=64\) that is \(2^{85}\), and the budget was exhausted hundreds of orders of magnitude ago. The theorem "\(A\) is diagonalisable" is true and unusable in the same breath, and both halves need saying.

1.4 — Non-normality is a feature, not only a bug

Having met the previous paragraph one is tempted to conclude that non-normal matrices are simply bad. They are inconvenient, but the inconvenience buys something. If \(A\) is normal with spectrum in the open left half-plane then \(\|e^{At}\|\) decays monotonically. If \(A\) is non-normal, \(\|e^{At}\|\) can grow, sometimes by orders of magnitude, before it decays. This transient growth is invisible in the spectrum; it is described by the pseudospectrum instead.

VIZ 01transient growth and the Bauer–Fike budget computed live
\(\|e^{At}\|_2\), computed what the spectrum alone predicts, \(e^{\lambda_1 t}\) eigenvalue drift under a perturbation of size \(10^{-8}\) the Bauer–Fike bound \(\kappa(V)\|E\|\)

Fig. 1.4 — At \(\gamma=0\) the matrix is normal, the two curves coincide, and the perturbation bound is tight and tiny. Raise \(\gamma\) and the true norm climbs to a peak that the spectrum gives no hint of, while \(\kappa(V)\) — and with it the eigenvalue error budget — grows in step. Bringing \(\lambda_2\) toward \(\lambda_1\) makes both effects far worse, because the two eigenvectors are becoming parallel. Transient growth and ill-conditioned eigenvectors are the same phenomenon seen twice.

The point for us: a system whose state must retain a long history cannot be a set of independently decaying scalars, because independent scalars forget at their own fixed rates and interact not at all. The transfer of information between state coordinates — the thing that lets coordinate \(n\) still hold a trace of an event coordinate \(0\) absorbed long ago — is exactly what off-diagonal, non-normal structure buys. HiPPO-LegS has spectrum \(\{-1,\dots,-N\}\), which looks like fast forgetting, and yet its gradient norms decay like \(\Theta(1/t)\) rather than exponentially. The resolution is non-normality: the memory lives in the coupling, not in the eigenvalues.

the unresolved tension in the whole lineage

HiPPO's matrix is worth its non-normality; its non-normality is what makes it uncomputable; so the field kept the spectrum (S4D, DSS, Mamba: diagonal \(A\)) and threw the coupling away. That trade is the most interesting open question in the companion notes' Parts 04–05, and it is a linear-algebra question, not a machine-learning one.

PART 02

One object, three descriptions

recurrence, convolution, transfer function

2.1 — Variation of constants

Multiply \(\dot x=Ax+Bu\) by the integrating factor \(e^{-At}\) and the left side becomes an exact derivative, \(\frac{d}{dt}\big(e^{-At}x\big)=e^{-At}Bu\). Integrating from \(0\) to \(t\):

\[ x(t) = e^{At}x(0) + \int_0^t e^{A(t-\tau)}Bu(\tau)\,d\tau . \]

With \(x(0)=0\) and \(D=0\) the output is \(y=h*u\) with impulse response \(h(t)=Ce^{At}B\). The name is literal: feed \(u=\delta\) and \(h\) comes back. That is the first description, the system as a convolution; the differential equation itself is the second, the system as a recurrence. The identity between them is not a modelling choice, it is the solution formula — and the entire computational drama of the companion notes follows from the fact that the two have different costs on different hardware.

2.2 — The transfer function

Take Laplace transforms. With \(x(0)=0\), \(\dot x=Ax+Bu\) becomes \(s\hat x=A\hat x+B\hat u\), so \(\hat y = H(s)\hat u\) with

\[ H(s) = C(sI-A)^{-1}B + D . \] (2)

By Cramer's rule \((sI-A)^{-1}=\operatorname{adj}(sI-A)/\det(sI-A)\), so \(H\) is a rational function whose denominator divides the characteristic polynomial of \(A\) and whose numerator has strictly smaller degree when \(D=0\). Its poles are eigenvalues of \(A\) — possibly not all of them, a subtlety that becomes the entire point in Part 03.

remember this number

A strictly proper rational function of degree \(N\) is determined by \(2N\) coefficients: \(N\) in the numerator, \(N\) in the monic denominator. The triple \((A,B,C)\) carries \(N^2+2N\). The discrepancy is the subject of §3.4.

VIZ 02poles → impulse response → frequency response computed live
poles (×) in the complex plane impulse response \(h(t)=Ce^{At}B\) \(|H(i\omega)|\), log magnitude the stability boundary

Fig. 2.2 — Three views of one system, redrawn together. Pushing \(\sigma\) toward zero makes the response long-lived and the resonant peak sharp — long memory and narrow bandwidth are the same statement. Setting \(\omega=0\) leaves a pure decay: a low-pass filter with no record of when anything happened, which is precisely the regime Mamba-2 restricts itself to and Mamba-3 escapes. Dragging the zero across the imaginary axis leaves \(|H|\) nearly unchanged while inverting the early transient — a reminder that magnitude alone does not determine the system.

2.3 — Stability, and the equation that keeps returning

The system is internally stable when \(e^{At}\to0\), which holds exactly when every eigenvalue of \(A\) has negative real part (\(A\) Hurwitz). It is BIBO stable when \(h\in L^1\), which holds when the poles of \(H\) lie in the open left half-plane. The two notions differ exactly when a pole is cancelled — an unstable mode invisible from the input–output map, which Part 03 will name.

Proposition (Lyapunov)

\(A\) is Hurwitz iff for every positive definite \(Q\) the equation \(A^\top P+PA+Q=0\) has a unique positive definite solution, namely \(P=\int_0^\infty e^{A^\top t}Qe^{At}\,dt\).

The integral formula is the existence proof: differentiate under the integral. Two special cases of this equation — the Gramians of §3.2 — carry most of the structural information about a linear system, and the same equation reappears in Part 06 as the covariance recursion of a noisy system. In discrete time replace the left half-plane by the unit disc and the equation by \(\bar A^\top P\bar A-P+Q=0\); Part 05 is the study of maps carrying the first geometry to the second.

PART 03

Realisation theory: what the state must be

Hankel rank, McMillan degree, and a gauge group

This is the mathematical core of the page. Realisation theory answers three questions at once — what determines the state, how large it must be, and how much freedom is left over — and the answers are Hankel rank, McMillan degree and \(\mathrm{GL}(N)\). All three reappear, renamed, in the modern literature.

3.1 — Markov parameters and the Hankel matrix

Work in discrete time, \(x_k=Ax_{k-1}+Bu_k\), \(y_k=Cx_k\). Unrolling from \(x_{-1}=0\) gives \(y_k=\sum_{i\le k}CA^{k-i}Bu_i\). The numbers \(h_j:=CA^jB\) are the Markov parameters, and they determine the system's action completely. Arrange them so that the row index counts steps into the future and the column index steps into the past:

\[ \mathcal{H}=\begin{pmatrix}h_0&h_1&h_2&\cdots\\ h_1&h_2&h_3&\cdots\\ h_2&h_3&h_4&\cdots\\ \vdots&\vdots&\vdots&\ddots\end{pmatrix},\qquad \mathcal{H}_{ij}=h_{i+j}. \] (3)

Constant along antidiagonals — the defining shape of a Hankel matrix, and not decoration. This matrix is the operator mapping past inputs to future outputs, with the present at the corner. Its rank measures how much of the past the future can still see, which by Part 00 is the size of the state.

Theorem (Kronecker 1881; Ho–Kalman 1966)

The sequence \((h_j)\) is generated by a finite-dimensional linear system if and only if \(\operatorname{rank}\mathcal{H}<\infty\). In that case the minimal state dimension equals \(\operatorname{rank}\mathcal{H}\), and equals the degree of \(H(z)=\sum_j h_jz^{-j-1}\) in lowest terms.

One direction is immediate, and it is the same computation that returns in §3.5 as semiseparability. Define the extended observability and reachability matrices

\[ \mathcal{O}=\begin{pmatrix}C\\ CA\\ CA^2\\ \vdots\end{pmatrix},\qquad \mathcal{R}=\begin{pmatrix}B& AB& A^2B&\cdots\end{pmatrix}. \]

Then \(\mathcal{H}_{ij}=CA^{i+j}B=(CA^i)(A^jB)\), that is \(\mathcal{H}=\mathcal{O}\mathcal{R}\): a product of an \(\infty\times N\) and an \(N\times\infty\) matrix, so \(\operatorname{rank}\mathcal{H}\le N\) always.

Every path from the past to the future goes through an \(N\)-dimensional bottleneck, and \(\mathcal{H}=\mathcal{O}\mathcal{R}\) is that sentence written as an equation.

3.2 — Reachability, observability, and the two Gramians

The factorisation has a degenerate case: either factor may itself be rank-deficient. By Cayley–Hamilton the column space of \(\mathcal{R}\) is already spanned by its first \(N\) blocks, so we may test with the finite matrices \(\mathcal{R}_N=(B\ AB\ \cdots\ A^{N-1}B)\) and \(\mathcal{O}_N\). The system is reachable if \(\operatorname{rank}\mathcal{R}_N=N\) — every state can be reached from the origin by some input — and observable if \(\operatorname{rank}\mathcal{O}_N=N\) — every nonzero initial state eventually shows up at the output.

The continuous-time versions are integral rather than algebraic:

\[ W_c=\int_0^\infty e^{At}BB^\top e^{A^\top t}dt,\qquad W_o=\int_0^\infty e^{A^\top t}C^\top Ce^{At}dt, \]

which for Hurwitz \(A\) solve \(AW_c+W_cA^\top+BB^\top=0\) and \(A^\top W_o+W_oA+C^\top C=0\) — the Lyapunov equation of §2.3, twice. Reachability is \(W_c\succ0\), observability \(W_o\succ0\). These are not merely tests: Part 04 shows they measure how much each direction of the state matters.

Theorem (Kalman decomposition, 1962)

Every linear system is similar to one whose state splits into four blocks: reachable-and-observable, reachable-only, observable-only, and neither. The transfer function depends only on the first.

So a realisation is minimal iff it is both reachable and observable, and a non-minimal one carries coordinates that are either unreachable from the input or invisible at the output — dead weight that still costs memory and FLOPs at inference. There is a lesson here for architectures whose state size is chosen by sweep rather than by measurement.

3.3 — Ho–Kalman: recovering the system from its output

The converse direction of the theorem is an algorithm, and it is short enough to state in full. Take a large finite block \(\mathcal{H}_0\) of (3) and the same block shifted by one, \(\mathcal{H}_1\). Compute a rank-\(r\) SVD \(\mathcal{H}_0=U\Sigma V^\top\) and split the singular values evenly between the factors, \(\mathcal{O}=U\Sigma^{1/2}\), \(\mathcal{R}=\Sigma^{1/2}V^\top\). Then read off

\[ A=\mathcal{O}^{+}\mathcal{H}_1\mathcal{R}^{+},\qquad B=\mathcal{R}e_1,\qquad C=e_1^\top\mathcal{O}. \]

The middle identity is the shift-invariance \(\mathcal{O}A=\mathcal{O}^{\uparrow}\) solved in the least-squares sense. That is the entire method — fifteen lines of NumPy, and the figure below runs it on data you control.

VIZ 03Ho–Kalman · a system rebuilt from its impulse response computed live
singular values of \(\mathcal{H}_0\) the ones kept at rank \(r\) true impulse response reconstruction from \((A,B,C)\)

Fig. 3.3 — With clean data and \(r=n\) the reconstruction error is \(10^{-14}\): the algorithm is exact, and it never saw the matrices, only the output. Set \(r<n\) and the error settles at roughly \(\sigma_{r+1}\), which is Part 04's theorem arriving early. Set \(r>n\) and nothing breaks but nothing improves — the extra coordinates are unreachable or unobservable, and the Kalman decomposition says the map cannot see them. Add noise and watch the singular-value cliff turn into a shelf whose height is the noise level: below it, order is no longer decidable.

3.3ssm/ho_kalman.py
import numpy as np

def ho_kalman(h, r, R=20):
    """Recover (A,B,C) of order r from Markov parameters h[0..2R]."""
    H0 = np.array([[h[i + j]     for j in range(R)] for i in range(R)])
    H1 = np.array([[h[i + j + 1] for j in range(R)] for i in range(R)])
    U, s, Vt = np.linalg.svd(H0)                # the only nontrivial step
    U, s, Vt = U[:, :r], s[:r], Vt[:r]
    O  = U * np.sqrt(s)                          # split Sigma evenly …
    Rc = np.sqrt(s)[:, None] * Vt                # … between the two factors
    A  = np.linalg.pinv(O) @ H1 @ np.linalg.pinv(Rc)
    return A, Rc[:, 0], O[0]                     # A, B, C

# The state sequence is estimated before the matrices are: no iteration,
# no local minima, no initialisation. Subspace identification (N4SID)
# is this procedure generalised to arbitrary inputs.

3.4 — Minimality, uniqueness, and the gauge group

Theorem (uniqueness of minimal realisations)

If \((A_1,B_1,C_1)\) and \((A_2,B_2,C_2)\) are minimal realisations of the same input–output map, there is a unique invertible \(V\) with \(A_2=V^{-1}A_1V\), \(B_2=V^{-1}B_1\), \(C_2=C_1V\).

The proof is the same factorisation once more: both satisfy \(\mathcal{O}_i\mathcal{R}_i=\mathcal{H}\) with full rank \(N\); set \(V=\mathcal{R}_1\mathcal{R}_2^{+}\) and verify. Now count. The triple has \(N^2+2N\) parameters, the transfer function \(2N\); the discrepancy is \(N^2=\dim\mathrm{GL}(N)\), and the theorem says the discrepancy is the orbit of the conjugation action. A gauge group, in the physicist's sense: a redundancy of description that no measurement can resolve.

VIZ 04the gauge orbit · \(N^2\) parameters that change nothing computed live
\(A\) (HiPPO-LegS, \(N=6\)) \(V^{-1}AV\), same operator impulse responses, overlaid where float64 gives out

Fig. 3.4 — The two matrices share no entry, no sparsity pattern and no symmetry, and produce the same impulse response to \(10^{-14}\) — until \(\kappa(V)\) passes about \(10^{8}\), where the agreement degrades one digit per decade and finally collapses. Both facts matter: the exact theory says every \(V\) is free, and floating point says only the well-conditioned ones are. That gap is the whole of S4 §4.1, reproduced here in six dimensions instead of sixty-four.

the consequence that licenses the modern literature

Because the redundancy is exactly \(\mathrm{GL}(N)\), one may impose any \(N^2\)-dimensional normalisation on \(A\) without losing a single degree of freedom the input–output map could have distinguished. Companion form, modal (diagonal) form, balanced form: all free. The diagonal turn of S4D and DSS is therefore not an approximation of the dense parameterisation — generically it is a choice of gauge.

What is lost is not expressivity but interpretation: a specific \(\Lambda\) no longer corresponds to a specific measure and basis, so the HiPPO initialisation must be transplanted rather than derived. That is the honest statement of the trade, and the answer to Exercise 5.1 of the companion notes.

3.5 — Semiseparability is the Hankel bound, localised

We can now retire the last genuinely mysterious definition in the Mamba-2 paper. The input–output map of a discrete linear system is a lower-triangular matrix \(M\) with \(M_{ji}=C_jA_j\cdots A_{i+1}B_i\), and \(M\) is called \(N\)-semiseparable when every submatrix contained in the lower triangle has rank at most \(N\). Here is the proof, in the time-varying case, in one line. Fix rows \(j\in\{j_0..j_1\}\) and columns \(i\in\{i_0..i_1\}\) with \(i_1\le j_0\); then

\[ M_{ji}=\underbrace{\big(C_jA_j\cdots A_{j_0+1}\big)}_{\text{depends on }j}\cdot \underbrace{\big(A_{j_0}\cdots A_{i_1+1}\big)}_{\text{constant}}\cdot \underbrace{\big(A_{i_1}\cdots A_{i+1}B_i\big)}_{\text{depends on }i}, \]

a product of a \((\cdot\times N)\), an \((N\times N)\) and an \((N\times\cdot)\) factor. Rank at most \(N\). \(\square\)

That is all semiseparability is: the statement \(\mathcal{H}=\mathcal{O}\mathcal{R}\) of §3.1, applied not once at the origin but at every cut point along the sequence. Two payoffs follow at once, and they are the two halves of Mamba-2. Algorithmically, an off-diagonal block need never be materialised — it is stored and applied as its two thin factors, and the "running state" the chunked algorithm carries between chunks is literally the middle term above. Conceptually, linear attention with a decay mask has the same rank structure by construction, which is why the duality theorem exists at all; Mamba-2's Theorem 5.2 — efficient autoregressive masked attention forces a semiseparable mask — is the converse of the paragraph you have just read.

terminology, once and for all

LSSL's \((p,q)\)-quasiseparability (Eidelman–Gohberg) bounds submatrices lying strictly off the diagonal; Mamba-2's \(N\)-semiseparability bounds submatrices lying on or below it. The difference is whether the diagonal is included, which shifts the rank counts by one and nothing else. Both are instances of what numerical linear algebra calls rank-structured matrices.

PART 04

How large must the state be?

Hankel singular values, balancing, and a theorem about recall

Realisation theory says the minimal \(N\) is \(\operatorname{rank}\mathcal{H}\). In practice that rank is either huge or infinite, and the real question is how well a state of size \(r<N\) can do. This has a complete answer, and it is the classical theory that the "state size versus recall" experiments in the modern literature are re-measuring empirically.

4.1 — Balancing

Both Gramians transform under \(x\mapsto V^{-1}x\), but in opposite directions: \(W_c\mapsto V^{-1}W_cV^{-\top}\) and \(W_o\mapsto V^\top W_oV\). So the product \(W_cW_o\) transforms by similarity, and its eigenvalues are invariants of the system — they do not depend on the gauge choice of §3.4. Define the Hankel singular values

\[ \sigma_i=\sqrt{\lambda_i(W_cW_o)},\qquad \sigma_1\ge\sigma_2\ge\cdots\ge\sigma_N>0 . \] (4)

They are the singular values of the Hankel operator, which is the cleaner way to see the invariance: \(\mathcal{H}=\mathcal{O}\mathcal{R}\) with \(W_o=\mathcal{O}^*\mathcal{O}\) and \(W_c=\mathcal{R}\mathcal{R}^*\), so \(\mathcal{H}^*\mathcal{H}\) and \(W_cW_o\) are similar. Moore (1981) showed one can always choose a basis in which \(W_c=W_o=\operatorname{diag}(\sigma_i)\) — the balanced realisation, in which every coordinate is equally easy to excite and to observe, and \(\sigma_i\) says how much it contributes.

Theorem (Enns 1984; Glover 1984)

Truncating the balanced realisation to its leading \(r\) coordinates preserves stability and satisfies \(\;\|H-H_r\|_{\mathcal{H}^\infty}\le 2\sum_{i>r}\sigma_i\). Moreover no degree-\(r\) system can do better than \(\sigma_{r+1}\).

Read as guidance for architecture: the useful state size is set by the decay of the Hankel singular values of the operator you want to represent. Geometric decay means a small state is provably enough and doubling \(N\) buys exponentially little. Slow decay means no small state suffices — and the deficit is a theorem, not a training problem. The figure makes the two regimes sit side by side.

VIZ 05Hankel singular values, and what truncation costs computed live
\(\sigma_i\), log scale kept by the truncation original impulse response truncated to rank \(r\)

Fig. 4.1 — The single pole has exactly one nonzero \(\sigma\): a state of size 1 is not an approximation, it is the truth. Four resonant modes give four plateaus and then a cliff. HiPPO decays steadily — a smooth trade, which is why \(N\) is a genuine knob there. The delay line — a system that reproduces its input verbatim \(n\) steps later, i.e. exact recall — has \(\sigma_1=\cdots=\sigma_n=1\): a perfectly flat spectrum, no direction is more important than any other, and truncation buys nothing at any \(r<n\). That flat spectrum is the theorem behind every recall benchmark a fixed-state model loses.

where this is used

Companion notes, Part 07.4: state size \(N=16\to64\to256\) improves MQAR recall monotonically, and Mamba-2 spends its restriction-bought speed on state. That monotone curve is a Hankel singular value spectrum being sampled. It is also why hybrid attention/SSM stacks persist: attention is the mechanism that gives up on a finite \(N\) altogether.

4.2 — Aside: where the matrices come from

Three classical answers, worth naming because the modern framings map onto them. Realisation from exact data is §3.3; with noisy data it becomes the Eigensystem Realisation Algorithm (Juang–Pappa 1985), still standard in structural dynamics. Subspace identification (Van Overschee–De Moor's N4SID, 1994) generalises it to arbitrary inputs by projecting future outputs onto the row space of past data — the state sequence is estimated before the matrices are, geometrically, with no iteration and no local minima. Prediction error methods instead maximise the likelihood, which for a linear-Gaussian model is computed by the Kalman filter of Part 07; this is the framing closest to deep learning.

The "test-time regression" lens that Mamba-3 §5.4 argues against is a fourth position: read the state update as an online least-squares fit refreshed per token. It is a good lens for the delta-rule branch, whose update is a rank-one Householder correction, and a poor one for the discretisation-derived branch, which has no notion of step size in that language. Knowing the classical taxonomy makes clear that these are four different answers to "where do the matrices come from", not four descriptions of one answer.

PART 05

Discretisation, as numerical analysis

stability regions, Padé, and the φ-functions hiding inside Mamba

The companion notes derive \(\bar A\) for four schemes and observe that gating falls out of one of them. This part supplies the theory those computations sit in, because the choices are not arbitrary and the classical names carry results.

5.1 — Stability functions

For a linear system every one-step method reduces to a stability function \(R\) with \(\bar A=R(\Delta A)\), and the order of the method is the order to which \(R(z)\) matches \(e^z\) at the origin. The four schemes are four choices of \(R\):

schemeR(z)orderstability
forward Euler1 + z1conditional: \(|1+z|<1\)
backward Euler(1 − z)⁻¹1A-stable and L-stable
bilinear / Tustin(1 + z/2)/(1 − z/2)2A-stable, not L-stable
zero-order holdezexactexact

Call a method A-stable if \(|R(z)|<1\) whenever \(\operatorname{Re}z<0\): it contracts exactly when the true system does, at every step size. The bilinear case deserves its own name — \(z\mapsto(1+z/2)/(1-z/2)\) is a Cayley transform, a Möbius map carrying the open left half-plane bijectively onto the open unit disc and the imaginary axis onto the unit circle. That is the sharpest possible statement of stability preservation: not "stable maps to stable" but "the two stability regions are conformally the same region". Exercise 1.2 of the companion notes is this fact in coordinates.

Dahlquist's barriers (1963)

First. A stable \(s\)-step linear multistep method has order at most \(s+1\) (\(s\) odd) or \(s+2\) (\(s\) even). Second. An A-stable linear multistep method has order at most \(2\) — and among those, the trapezoidal rule has the smallest error constant.

So the bilinear transform is not one option among many: in the multistep world it is the optimal A-stable choice, which is a real reason S4 uses it rather than a matter of taste. One caveat has teeth, though. A-stable is not L-stable: write \(R(\infty)=\lim_{|z|\to\infty}R(z)\). For the bilinear map \(|R(\infty)|=1\), so a very stiff mode — a very negative \(\lambda\), or a large step — is not damped but flipped in sign each step, oscillating at Nyquist instead of dying. Backward Euler and ZOH both have \(R(\infty)=0\). This is one honest technical reason the field moved from bilinear (S4) to ZOH (S4D, S5, Mamba) once \(\Delta\) became learned and free to grow.

VIZ 06stability regions in the complex plane computed live
\(|R(z)|<1\) — the scheme contracts here \(|R(z)|>1\) — it amplifies the point \(z=\Delta\lambda\) the true boundary, \(\operatorname{Re}z=0\)

Fig. 5.1 — Forward Euler's region is a disc of radius 1 about \(-1\): stable poles fall outside it as soon as \(\Delta|\lambda|>2\), and the readout turns red. The other three cover the entire left half-plane, which is A-stability drawn rather than asserted. Watch the L-stability readout as you push \(\operatorname{Re}\lambda\) far left: bilinear's \(|R|\) creeps back toward 1 — the stiff mode survives, ringing, instead of dying — while backward Euler and ZOH send it to zero. The right panel shows the resulting step response so the failure is visible in time as well as in the plane.

5.2 — Zero-order hold and the exponential integrators

ZOH is not a quadrature rule at all; it is an exact solution under an assumption about the input. If \(u\) is constant on the interval, variation of constants integrates exactly:

\[ \bar A=e^{\Delta A},\qquad \bar B=\Big(\int_0^\Delta e^{sA}ds\Big)B=A^{-1}\big(e^{\Delta A}-I\big)B . \]

Introduce the \(\varphi\)-functions of the exponential-integrator literature, \(\varphi_1(z)=(e^z-1)/z\) and \(\varphi_2(z)=(e^z-1-z)/z^2\). Then the ZOH input matrix is exactly \(\bar B=\Delta\,\varphi_1(\Delta A)B\) — an identity worth internalising, because it places Mamba's shipped update inside a family with a literature.

what Mamba actually ships

Mamba-1 and Mamba-2 use \(\bar B_t=\Delta_tB_t\), which is \(\Delta\varphi_1(\Delta A)B\) with \(\varphi_1\) replaced by its value at the origin — exponential Euler, first order in \(\Delta\), exact only as \(\Delta\to0\). Mamba-3's exponential-trapezoidal scheme replaces the one-point rule by a weighted two-point rule on the same integral, which in the classical taxonomy is an ETD2-type method. Hochbruck and Ostermann's Acta Numerica survey is the reference — and it will tell you that the genuinely second-order weights involve \(\varphi_2\), not the free convex weight \(\lambda_t\) that Mamba-3 learns. Which is exactly the companion notes' observation that the released model does not satisfy the hypothesis of its own accuracy theorem.

5.3 — Gating, with the classical name attached

The identity of LSSL Lemma 3.1 — that \(\sigma(z)\) is a step size — is backward Euler on the leaky integrator \(\dot x=-x+u\) with \(\Delta=e^z\). Nothing about it is specific to machine learning: the implicit-Euler update of a first-order lag is a convex combination of old state and new input with weight \(\Delta/(1+\Delta)\), and reparameterising the step logarithmically turns that weight into a logistic function. What is specific to machine learning is the choice among quadratures, since each scheme gives a different curve with the same saturating shape. Part 07 will add a third member to the family, derived from a completely different principle, and it will land on top of the other two.

VIZ 07φ₁, the approximation Mamba makes, and three gates computed live
exact \(\Delta\varphi_1(\Delta A)\) (ZOH) Mamba's \(\Delta\) sigmoid gate (backward Euler) ZOH gate \(1-e^{-e^z}\) steady-state Kalman gain

Fig. 5.3 — Left: the approximation \(\bar B=\Delta B\) is within a per cent for \(\Delta\lesssim 0.02\), off by 58% at \(\Delta=1\) and by 216% at \(\Delta=3\). Note which regime that is: large \(\Delta\) is the open gate, the token the model decided to absorb, so the error is largest exactly where the model is paying attention. Right: three gate curves derived from three unrelated principles — implicit Euler, exact hold, and optimal filtering (Part 07) — plotted against a log signal-to-noise axis. They very nearly coincide. Saturating convex-combination gates are not a design; they are what the mathematics keeps producing.

PART 06

Linear systems with noise

the Gauss–Markov model, and the Lyapunov equation for the third time

6.1 — The Gauss–Markov model

Take the linear system driven by noise: \(x_k=Ax_{k-1}+Bu_k+w_k\) and \(y_k=Cx_k+v_k\), with \(w_k\sim\mathcal{N}(0,Q)\), \(v_k\sim\mathcal{N}(0,R)\) independent across time. Everything is jointly Gaussian, so everything is determined by means and covariances, and both propagate in closed form: \(\operatorname{Cov}(x_k)=A\operatorname{Cov}(x_{k-1})A^\top+Q\) — the discrete Lyapunov equation of §2.3, once again, now in dynamic form.

If \(A\) is stable the covariance converges to the unique stationary covariance \(P_\infty\) solving \(P=APA^\top+Q\), and the state becomes a stationary Gaussian process whose second-order statistics are fixed by \((A,Q)\) alone. In continuous time the analogue is the linear SDE \(dx = Ax\,dt + G\,dW\) — an Ornstein–Uhlenbeck process when \(A\) is a stable scalar — with stationary covariance solving \(AP+PA^\top+GG^\top=0\). That is the same Lyapunov equation as the reachability Gramian of §3.2, and the coincidence is not one: the Gramian is the stationary covariance of the system driven by white noise, which is why a direction that is hard to reach is also a direction the noise rarely visits.

6.2 — The prehistory: Wiener

Wiener's 1949 theory had already solved optimal filtering by spectral factorisation, and it has three defects Kalman's formulation removes: it assumes stationarity, it needs the whole observation record, and it returns a transfer function rather than a recursion. Kalman's move — and the reason the 1960 paper is one of the most cited in engineering — was to put a state in the middle. Once the signal is generated by a finite-dimensional Markov model, the optimal estimate can be maintained recursively in fixed memory. The philosophical content is exactly Part 00: the state is a sufficient statistic, so an estimator that tracks a distribution over it need never revisit the past.

PART 07

The Kalman filter

the other answer to "what should the state be" — and the line between scheduled and selective

7.1 — The one lemma

Lemma (Gaussian conditioning)

If \(\binom{a}{b}\sim\mathcal{N}\big(\binom{\mu_a}{\mu_b}, \left(\begin{smallmatrix}\Sigma_{aa}&\Sigma_{ab}\\ \Sigma_{ba}&\Sigma_{bb}\end{smallmatrix}\right)\big)\) with \(\Sigma_{bb}\succ0\), then \(a\,|\,b\sim\mathcal{N}\big(\mu_a+\Sigma_{ab}\Sigma_{bb}^{-1}(b-\mu_b),\; \Sigma_{aa}-\Sigma_{ab}\Sigma_{bb}^{-1}\Sigma_{ba}\big)\).

Proof, in the form worth remembering: set \(\tilde a=a-\Sigma_{ab}\Sigma_{bb}^{-1}b\) and check \(\operatorname{Cov}(\tilde a,b)=0\). For jointly Gaussian variables uncorrelated implies independent, so conditioning on \(b\) leaves \(\tilde a\) alone; solve for \(a\). The Schur complement in the covariance is the residual variance after that projection — and every appearance of the Woodbury identity in this field is a cousin of this computation.

7.2 — Predict and update

Prediction is the model applied to the current belief; the update is the lemma:

\[ \hat x_{k|k-1}=A\hat x_{k-1|k-1}+Bu_k,\qquad P_{k|k-1}=AP_{k-1|k-1}A^\top+Q, \]
\[ \nu_k=y_k-C\hat x_{k|k-1},\quad S_k=CP_{k|k-1}C^\top+R,\quad K_k=P_{k|k-1}C^\top S_k^{-1}, \] (5)
\[ \hat x_{k|k}=\hat x_{k|k-1}+K_k\nu_k,\qquad P_{k|k}=(I-K_kC)P_{k|k-1}. \]

\(\nu_k\) is the innovation — the part of the observation that was not predictable — and \(K_k\) the Kalman gain. In implementations one prefers the Joseph form \(P=(I-KC)P(I-KC)^\top+KRK^\top\), manifestly symmetric positive semidefinite; the naive form loses definiteness after enough steps, and the Apollo guidance computer ran a square-root filter for precisely this reason.

There is a second derivation in one paragraph, and it is the one to keep. Work in the Hilbert space of finite-variance random variables with \(\langle X,Y\rangle=\mathbb{E}[XY]\). The conditional expectation is the orthogonal projection of \(x_k\) onto the span of the observations; the innovations are, by construction, an orthogonal basis of that span (Gram–Schmidt in time order). Projection onto an orthogonal basis is a sum of one-dimensional projections, which is why the filter is recursive: one more observation adds one more basis vector and hence one more correction term \(K_k\nu_k\). No Gaussian assumption is needed for this version — it gives the best linear estimator regardless of distribution.

7.3 — The scalar case is a gate

Take \(N=1\), \(A=C=1\), process noise \(q\), observation noise \(r\). Then \(K_k=P_{k|k-1}/(P_{k|k-1}+r)\in(0,1)\) and

\[ \hat x_{k|k}=(1-K_k)\,\hat x_{k|k-1} + K_k\,y_k . \]

An exponential moving average with a time-varying weight — a leaky integrator with a gate. Compare §5.3, where the convex weight was \(\Delta/(1+\Delta)\); here it is \(P/(P+r)\). The steady-state gain solves a quadratic, \(K_\infty=\big(\sqrt{(q/r)^2+4q/r}-q/r\big)/2\), increasing in \(q/r\): the more the world moves relative to how noisy your sensor is, the more you weight the new observation. That is a derived forget gate, with an interpretation for its value — and it is the third curve in Fig. 5.3.

7.4 — The structural point

Here is the observation I would most like you to take from this page, because it locates Mamba precisely against sixty years of prior art. The Kalman filter's coefficients change with time, so the filter is a linear time-varying recurrence, exactly like Mamba's. But look at (5): the gain involves \(A,C,Q,R\) and nothing else. It does not involve \(y\). In the linear-Gaussian setting the entire gain schedule can be computed offline, before a single observation arrives. The filter adapts to how long it has been running and to the noise model — never to the values it observes.

VIZ 08the filter running — and the gain that ignores the data computed live
measurements \(y_k\) truth filtered estimate ± 2σ gain \(K_k\), realisation A gain \(K_k\), realisation B

Fig. 7.4 — Move the seed, or press the button to swap in a signal with a different amplitude, frequency and noise draw. The estimate changes completely; the two gain curves stay bit-for-bit identical, and the readout prints their maximum difference as exactly zero. Raising \(q/r\) lifts the whole schedule — the filter trusts the data more — but still without consulting it.

the dividing line

LTI (S4): fixed coefficients — convolutional, FFT-trainable.
LTV with a precomputable schedule (the Kalman filter; also any positional schedule, such as vanilla RoPE): coefficients vary with \(t\) but not with the data. Still no per-token decisions — and still fully parallelisable, since the schedule is known in advance.
Selective (Mamba): coefficients are functions of the observed token. This is what breaks the fixed filter, and it is a genuinely different regime.

Where does data dependence enter classically? Exactly where the model stops being linear-Gaussian. The extended Kalman filter evaluates its Jacobians at the current estimate, so its gain depends on the data; the particle filter is data-dependent throughout. Selectivity is not an invention of 2023 — it is the classical signature of a nonlinear filtering problem, imported into a linear recurrence by letting a network compute the coefficients.

The same lens explains a result in the companion notes that otherwise looks like a curiosity: standard RoPE scores 1.56% on parity while a data-dependent rotation scores 100%. A fixed frequency schedule is a precomputable LTV recurrence; it can encode position and nothing else. That is not a fact about rotations — it is a fact about which of the three regimes above you are in.

7.5 — Beyond linear-Gaussian, briefly

  • Smoothing. If you may look at the whole record, the Rauch–Tung–Striebel smoother makes a backward pass over the filtered estimates. Filtering is causal, smoothing is bidirectional; the relation between them is the relation between a decoder-only and an encoder architecture, and the backward recursion looks a great deal like a backward pass.
  • EKF and UKF. Linearise around the estimate, or propagate sigma points and refit a Gaussian (Julier–Uhlmann 1997). Both keep the parametric representation and give up exactness.
  • Particle filters (Gordon–Salmond–Smith 1993) give up the parametric form entirely, at a cost that grows badly with dimension.
  • The discrete-state analogue. Replace the Gaussian by a distribution over a finite set and you have a hidden Markov model, whose forward algorithm is the identical recursion — predict by the transition matrix, update by the emission likelihood, renormalise — in a different semiring. "Linear recurrence, then readout" describes the HMM forward pass, the Kalman filter and an SSM layer alike; what differs is the algebra the state lives in.
PART 08

What should the state contain?

orthogonal polynomials, and the floor HiPPO stands on

Kalman answers "what should the state be" by positing a generative model and computing the optimal estimate. HiPPO answers the same question with no generative model at all, by positing an approximation criterion. This part builds the approximation theory, because otherwise HiPPO's matrix is a magic array of square roots.

8.1 — Orthogonal polynomials

Let \(\mu\) be a measure with all moments finite and give polynomials the inner product \(\langle f,g\rangle_\mu=\int fg\,d\mu\). Gram–Schmidt on \(1,Y,Y^2,\dots\) produces orthonormal \(p_n\) with \(\deg p_n=n\).

Theorem (three-term recurrence; Favard's converse)

\(Y\,p_n(Y)=a_np_{n+1}(Y)+b_np_n(Y)+a_{n-1}p_{n-1}(Y)\) for real \(a_n>0\). Conversely, any sequence satisfying such a recurrence is orthonormal for some positive measure.

The forward direction is one line of orthogonality: \(Yp_n\) has degree \(n+1\) so it expands in \(p_0..p_{n+1}\), and \(\langle Yp_n,p_k\rangle=\langle p_n,Yp_k\rangle=0\) whenever \(k<n-1\). Three terms survive, so multiplication is tridiagonal in this basis — a Jacobi matrix, the ancestor of every "structured \(A\)" in the literature.

8.2 — Why HiPPO's matrix is triangular

The fact that does the work is about differentiation, and it is one line of calculus: if \(p\) has degree \(n\) then \(p'\) has degree at most \(n-1\). So in an expansion of \(\partial_tp_n\), only \(p_0,\dots,p_{n-1}\) can appear. Now take HiPPO's construction — \(x_n(t)=\int u(Y)p_n(t,Y)\omega(t,Y)dY\), the coefficients of the \(L^2(\mu^{(t)})\)-projection of the history. Differentiating under the integral produces a boundary term (which supplies \(Bu(t)\)), a term in \(\partial_tp_n\) that closes into \(x_0..x_{n-1}\) by the degree fact, and a term in \(\partial_t\omega\) that closes when the measure's time dependence can be re-expressed through the measure. The result is \(\dot x=A(t)x+B(t)u\) with triangular \(A\), and the triangularity is forced by calculus rather than chosen.

A translated window (LegT) carries a horizon hyperparameter \(\theta\); a scaled window (LegS, \(\omega^{(t)}=\tfrac1t\mathbf{1}_{[0,t]}\)) grows with the history and is equivariant to time dilation — replay the input at half speed and the state trajectory is the same, replayed at half speed. That equivariance is why LegS has no timescale hyperparameter, and it is a theorem (HiPPO Prop. 3), not a heuristic.

8.3 — Rates, and why the advertised rate is pessimistic

Projection onto the first \(N\) orthogonal polynomials is the best degree-\((N-1)\) approximation in \(L^2(\mu)\), so classical approximation theory applies directly: Jackson-type bounds give algebraic rates for functions of finite smoothness (\(O(N^{-1/2})\) in HiPPO's weighted setting for Lipschitz inputs, \(O(N^{-k})\)-type for \(k\) derivatives), while Bernstein-type bounds give \(O(\rho^{-N})\) — geometric — for functions analytic in a Bernstein ellipse. The figure measures all three regimes on inputs you choose.

VIZ 09Legendre projection · the state as a compression computed live
the signal reconstruction from N coefficients the coefficients themselves — the state \(L^2\) error against N, log–log

Fig. 8.3 — The analytic signal reaches \(10^{-14}\) by \(N\approx30\): geometric convergence, machine precision, done. The kink gives roughly \(N^{-1.5}\) and the step roughly \(N^{-0.5}\) — the latter being exactly the worst-case rate HiPPO Prop. 6 advertises. This is the resolution of Exercise 2.3 of the companion notes: the bound is a worst case over a rough function class, and real inputs are smoother than Lipschitz, so a fixed-size state does far better than the theorem promises. Note also that the coefficient stem plot is the state vector: that, and nothing else, is what the system remembers.

Kalman filterHiPPO
what is assumeda generative model \(A,C,Q,R\)a measure \(\mu^{(t)}\) and a degree bound
what is optimisedmean-squared error of the estimate\(L^2(\mu^{(t)})\) error of the reconstruction
what the state isthe posterior mean and covariancethe projection coefficients
what is derivedthe gain schedule \(K_k\)the matrices \(A,B\) in closed form
what is learnednothing (or \(Q,R\), by likelihood)nothing — later, only how hard to lean on it, via \(\Delta_t\)
failure modemodel mismatchinputs outside the smoothness class

Both are answers to "what should the state be", derived rather than searched. That both are derivable, and that the derivations look nothing alike, is the strongest available evidence that the question is well posed.

PART 09

Computing with linear recurrences

Toeplitz, Vandermonde, Cauchy — and why they are one zoo

The last body of prerequisite material is algorithmic. A causal LTI system in discrete time is multiplication by a lower-triangular Toeplitz matrix \(T_{ki}=h_{k-i}\). Toeplitz matrices are not diagonalised by the DFT, but circulant ones are: \(C=F^{-1}\operatorname{diag}(Fc)F\). Embedding an \(L\times L\) Toeplitz matrix in a \(2L\times2L\) circulant is therefore the standard trick, and it turns a convolution into two forward FFTs, a pointwise product and one inverse FFT. That is the entire computational advantage of the convolutional view — and it is available only when there is a single fixed kernel to transform, which is the precise sense in which selectivity destroys it.

The kernel is a Krylov sequence \(h_i=CA^iB\), whose generating function is \(\sum_i CA^iBz^i = C(I-Az)^{-1}B\). Truncating at \(L\) terms and using \((I-Az)\sum_{i<L}(Az)^i=I-(Az)^L\) gives the exact truncated form; evaluating at the \(L\)-th roots of unity is the DFT of the kernel. The structural gain is that powers of a matrix have become one inverse — and inverses respect low-rank corrections (Woodbury) while powers do not. S4's algorithm is that observation plus bookkeeping.

Three structured families appear in that bookkeeping: Vandermonde \(V_{ij}=z_i^j\), what the kernel becomes when \(A\) is diagonal; Cauchy \(M_{ij}=1/(\omega_i-\lambda_j)\), what the resolvent becomes when \(A\) is diagonal; and Toeplitz/Hankel, the convolution operator itself. All three have low displacement rank — there are simple operators \(L,R\) for which \(M-LMR\) has small rank — and that is the unifying theory (Kailath, Gohberg, Olshevsky) which lets fast algorithms transfer between the families. When the companion notes say S4's algorithm is trustworthy where LSSL's was not, this forty-year literature is the reason.

VIZ 10the structured zoo · one number explains all of them computed live
the matrix \(M\) the displacement \(M - LMR\) its numerical rank

Fig. 9.1 — Each matrix is full rank, and each has a displacement of rank at most two. That single number is what every fast algorithm in this area consumes: it is why an \(n\times n\) Cauchy matrix–vector product costs \(O(n\log^2 n)\) rather than \(O(n^2)\), and why S4's kernel evaluation can be converted between Cauchy and Vandermonde form without losing the structure. S4's algorithm is a walk through this zoo, and it is stable because the zoo is well studied.

Two more items complete the toolbox. An affine recurrence \(h_t=a_th_{t-1}+b_t\) is the prefix scan of the monoid \((a_2,b_2)\circ(a_1,b_1)=(a_2a_1,a_2b_1+b_2)\), whose associativity is a one-line check; Blelloch's up-sweep/down-sweep computes all prefixes in \(O(\log L)\) depth (Martin and Cundy brought this to linear RNNs in 2018, and it is the algorithmic hinge of the whole field — the reward for giving up per-step nonlinearity is parallelism over the sequence). And arithmetic intensity: FLOPs performed per byte moved. The roofline model puts a ridge at peak/bandwidth — about \(989/3.35\approx295\) ops per byte for an H100 in bf16 — and an algorithm far below it is memory-bound, so it can be made to do several times more arithmetic at almost no cost in wall-clock time. That sentence is the whole argument for Mamba-3's MIMO lift.

PART 10

A history, told as a sequence of binding constraints

1949 to 2026, as one story rather than two

The mathematics above was developed by control theorists between roughly 1949 and 1985; the deep-learning line reuses it under different pressures. It is worth seeing both halves as one story, because the pattern is more informative than either half.

erathe binding constraintthe response
1940s–50sno recursion: the optimal filter needs the whole record Wiener and Kolmogorov solve the stationary problem by spectral factorisation
1960–63online estimation, non-stationary, finite memory Kalman puts a state in the middle; reachability, observability, minimality
1966–85which state, and how much of it Ho–Kalman from the Hankel matrix; Moore's balancing; Glover's error bounds
1980s–90strainability: gradients across many steps the vanishing-gradient diagnosis; LSTM's additive path; unitary RNNs
2018–20parallelism: a sequential loop wastes the machine drop the per-step nonlinearity, scan the affine recurrence; linear attention arrives from the other side
2020–21what should \(A\) be? HiPPO derives it from a projection; LSSL names the layer — and fails on conditioning
2022–throughput, then expressivity, then memory bandwidth S4, the diagonal turn, selectivity, SSD, Mamba-3 — the companion notes

Two episodes deserve a sentence each, because they are the ones the modern papers inherit directly. The vanishing gradient (Bengio, Simard and Frasconi 1994) is the observation that the gradient across \(T\) steps is a product of \(T\) Jacobians, so contraction — which stability requires — implies exponential gradient decay; every fix since, from LSTM's additive path to unitary RNNs' \(|\lambda|=1\), is a statement about the spectrum of the transition, and Part 01 is the language for them. And LSSL's failure is a conditioning failure, exactly the phenomenon §1.3 measures: a theorem correct in exact arithmetic, unusable in float64, which is the most instructive event in the whole sequence.

the pattern worth extracting

In each era the binding constraint was different — recursion, then minimality, then reduction, then trainability, then parallelism, then memory bandwidth. The mathematics did not change. What changed is which property of the same object was expensive. If you want to predict the next move in this field, the productive question is not "what is a better architecture" but "what is currently the expensive property", and that is a question about hardware and workload as much as about mathematics.

PART 11

The dictionary

everything above, mapped onto the vocabulary of the companion notes
classical namemodern name / usehere
impulse response, Markov parametersthe convolution kernel \(\mathcal{K}_L\)§2.1, §3.1
transfer function, McMillan degreethe \(2N\) identifiable parameters§2.2, §3.4
similarity / gauge freedom \(\mathrm{GL}(N)\)licence for diagonal \(A\) (S4D, DSS)§3.4
Hankel factorisation \(\mathcal{H}=\mathcal{OR}\)\(N\)-semiseparability, SSD chunking§3.5
Hankel singular values, balanced truncationchoosing \(N\); the limits of recall§4.1
Bauer–Fike, \(\kappa(V)\)why HiPPO cannot be diagonalised in float64§1.3
non-normality, transient growthwhy coupling, not spectrum, holds memory§1.4
Cayley transform, Padé, A-stabilitythe bilinear discretisation of S4§5.1
\(\varphi\)-functions, exponential integratorsZOH; Mamba's \(\Delta B\); Mamba-3's trapezoid§5.2
backward Euler on a leaky integratorthe sigmoid gate (LSSL Lemma 3.1)§5.3
Kalman gain schedulean LTV but non-selective recurrence§7.4
EKF: the gain depends on the estimateselectivity, input-dependent \(\Delta_t\)§7.4
orthogonal polynomials, FavardHiPPO's basis; the triangular \(A\)§8.1–8.2
Jackson / Bernstein ratesHiPPO Prop. 6, and why it is pessimistic§8.3
circulant diagonalisation, FFTthe convolutional training path§9
displacement rank: Vandermonde, CauchyS4's kernel evaluation§9
parallel prefix (Blelloch)the selective scan§9
roofline, arithmetic intensityMamba-3's MIMO argument§9
where to go now

Read Part 00 of From the linear ODE to Mamba-3. It should now contain no step you cannot justify: the closed-form solution is §2.1 here, the two algorithms are §2.1 and §9, and the similarity invariance that its Exercise 0.1 asks you to verify is §1.1, property 3.

The single most useful thing to carry forward is the factorisation \(\mathcal{H}=\mathcal{O}\mathcal{R}\). It is the reason a state exists, the reason its size is what it is, the reason semiseparability holds, and the reason chunking works. Four apparently distinct results, one identity.

PART 12

Exercises

answers folded away — the value is in the attempt

★ marks the four to do if you do only four. [hand] is pen and paper, [calc] a pocket calculator, [code] under twenty lines of NumPy. Every answer is checkable against a computation you can run or a statement proved above; several are checkable against the figures on this page.

EX 1 ★code

Let \(h_j=CA^jB\) for \(A=\operatorname{diag}(\tfrac12,\tfrac13)\), \(B=(1,1)^\top\), \(C=(1,1)\). Build the \(5\times5\) Hankel matrix and compute its rank. Now set \(C=(1,0)\) and recompute. Explain the drop using §3.2, and say which of reachability and observability failed.

›answer

With \(C=(1,1)\) the rank is 2. With \(C=(1,0)\) it is 1. Nothing about reachability changed — \(\mathcal{R}_2=(B\;AB)\) still has rank 2, since both modes are excited. What failed is observability: \(\mathcal{O}_2=\binom{C}{CA}=\binom{1\;\;0}{1/2\;\;0}\) has rank 1, because the second coordinate never reaches the output. By the Kalman decomposition the transfer function sees only the reachable-and-observable part, so \(h_j=(1/2)^j\) — a first-order sequence, and \(\operatorname{rank}\mathcal{H}=1\).

The moral: a state coordinate can be perfectly alive inside the model and completely invisible from outside it. Two of the four Kalman blocks cost memory and FLOPs at inference and contribute nothing.

EX 2hand

Show directly that \(W_c=\int_0^\infty e^{At}BB^\top e^{A^\top t}dt\) solves \(AW_c+W_cA^\top+BB^\top=0\). Where did you use stability?

›answer

Differentiate the integrand: \(\frac{d}{dt}\big(e^{At}BB^\top e^{A^\top t}\big) = A\,e^{At}BB^\top e^{A^\top t} + e^{At}BB^\top e^{A^\top t}A^\top\). Integrate both sides from \(0\) to \(\infty\). The right side gives \(AW_c+W_cA^\top\); the left telescopes to \(\big[e^{At}BB^\top e^{A^\top t}\big]_0^\infty = 0 - BB^\top\).

Stability enters exactly twice, and in the same place: it makes the integral converge at all, and it kills the boundary term at \(t=\infty\). For an unstable \(A\) neither holds and \(W_c\) does not exist — which is why the Lyapunov equation is a stability certificate and not merely an identity.

EX 3 ★code

Take \(A=\left(\begin{smallmatrix}-1&\gamma\\ 0&-2\end{smallmatrix}\right)\), stable for every \(\gamma\). Plot \(\|e^{At}\|_2\) for \(t\in[0,5]\) and find its maximum at \(\gamma=25\). Compare with \(e^{-t}\). Then compute \(\kappa(V)\) and relate the two numbers. (Fig. 1.4 does this; do it yourself first.)

›answer

At \(\gamma=25\) the norm rises to about \(6.3\) near \(t\approx0.7\) before decaying — the state grows by more than a factor of six while every eigenvalue says "decay". The eigenvector matrix is \(V=\left(\begin{smallmatrix}1&\gamma\\0&-1\end{smallmatrix}\right)\) up to scaling, with \(\kappa(V)\) growing linearly in \(\gamma\), and the peak of \(\|e^{At}\|\) tracks it.

Two lessons. First, the spectrum does not determine the transient: a stable system can behave like an unstable one over the horizon you actually care about. Second, transient growth and ill-conditioned eigenvectors are the same phenomenon — the eigenvectors are nearly parallel, so a state can have small coordinates in a basis that is itself nearly degenerate. Bring \(\lambda_2\to\lambda_1\) and both blow up together.

EX 4code

Implement Ho–Kalman from the listing in §3.3. Verify on a random stable system of order 3 that you recover the Markov parameters to machine precision, and that taking \(r=2\) gives an error controlled by \(\sigma_3\).

›answer

You should see \(\sim10^{-14}\) at \(r=3\) and an error of order \(\sigma_3\) at \(r=2\) — not \(\sigma_3\) exactly, since plain SVD truncation of the Hankel matrix is not the same as balanced truncation, but the same order of magnitude. The bound \(2\sum_{i>r}\sigma_i\) of §4.1 is the guaranteed version.

Two things to notice while it runs. The algorithm never sees \(A,B,C\) — only the output — so it is an identification method, not a factorisation of something you already had. And the recovered \(A\) will not resemble the true \(A\) at all: it is a different point in the same \(\mathrm{GL}(N)\) orbit (§3.4), and that is not an error.

EX 5hand

Compute the Hankel singular values of the system with \(h_j=\alpha^j\). How many are nonzero, and why? Now take the delay line — \(h_j=1\) for \(j=n-1\) and \(0\) otherwise, i.e. exact recall at lag \(n\). What do its Hankel singular values look like, and what does balanced truncation therefore promise about representing exact recall in a small state?

›answer

Exactly one. \(h_j=\alpha^j\) is generated by the scalar system \(A=\alpha,B=C=1\), so the Hankel matrix is the outer product \((\alpha^i)(\alpha^j)\) — rank one — and \(\sigma_1=1/(1-\alpha^2)\), which is what Fig. 4.1's "one pole" panel prints.

The delay line is the opposite extreme: \(W_c=W_o=I\) in the shift basis, so \(\sigma_1=\cdots=\sigma_n=1\). The spectrum is perfectly flat. Balanced truncation therefore promises nothing: every direction matters equally, discarding any one costs the full \(\sigma=1\), and by Glover's lower bound no degree-\(r\) system with \(r<n\) does better.

This is the cleanest available statement of why a fixed-size linear state cannot do exact recall over long ranges. It is not an optimisation failure or a missing inductive bias; the operator has no small approximation, and the theorem says so. It is also why hybrid stacks keep an attention layer around.

EX 6 ★hand

Verify that \(z\mapsto(1+z/2)/(1-z/2)\) maps \(\{\operatorname{Re}z<0\}\) bijectively onto \(\{|w|<1\}\), and compute the image of the imaginary axis. Then compute \(R(\infty)\) for backward Euler, bilinear and ZOH, and explain what a nonzero \(|R(\infty)|\) does to a very stiff mode over many steps.

›answer

\(|1+z/2|^2-|1-z/2|^2 = 2\operatorname{Re}z\), so \(|R(z)|<1\) exactly when \(\operatorname{Re}z<0\) — the map is the Cayley transform, a Möbius bijection of the open left half-plane onto the open disc, carrying the imaginary axis onto the unit circle (\(|R(iy)|=1\) identically) and \(0\mapsto1\).

\(R(\infty)\): backward Euler \(0\), ZOH \(0\), bilinear \(-1\). The last is A-stable but not L-stable, and \(|R(\infty)|=1\) means a very stiff mode is not damped at all — it is multiplied by roughly \(-1\) each step, so it survives indefinitely while alternating in sign, which is a Nyquist-frequency oscillation that no amount of further integration removes.

This is a real reason to prefer ZOH once \(\Delta\) is learned rather than fixed: a learned \(\Delta_t\) will happily wander into the stiff regime, and under bilinear the model's "forgotten" modes ring instead of dying. S4 used bilinear with a fixed \(\Delta\); S4D, S5 and Mamba use ZOH.

EX 7calc

Show that the ZOH input matrix equals \(\Delta\varphi_1(\Delta A)B\) with \(\varphi_1(z)=(e^z-1)/z\), and expand to first order to recover Mamba's \(\bar B=\Delta B\). At \(A=-1\), tabulate the relative error for \(\Delta=0.01,0.1,1,3\). In which of Mamba's two regimes is the approximation worst, and does that matter?

›answer

\(\int_0^\Delta e^{sA}ds = A^{-1}(e^{\Delta A}-I) = \Delta\cdot\frac{e^{\Delta A}-I}{\Delta A} = \Delta\varphi_1(\Delta A)\). Since \(\varphi_1(0)=1\), the first-order truncation is \(\Delta\). Errors at \(A=-1\): 0.5%, 5.1%, 58%, 216%.

Worst by far at large \(\Delta\) — which is the open gate, the token the model has decided is worth absorbing. So the approximation is least accurate exactly where the model is paying attention, and it systematically over-weights strongly-gated tokens (\(\Delta\) instead of \(1-e^{-\Delta}\), which saturates at 1).

Does it matter? Arguably not much, because \(B_t\) is learned and can absorb a smooth monotone reweighting of \(\Delta_t\). That is the honest answer, and it is also why Mamba-3's more accurate quadrature buys only 15.81 → 15.72 perplexity. The discretisation frame's real contribution was a new degree of freedom, not accuracy.

EX 8calc

Derive the scalar steady-state Kalman gain for \(A=C=1\): solve \(P=P-P^2/(P+r)+q\) for \(P_\infty\), hence \(K_\infty\). Plot \(K_\infty\) against \(q/r\) over four decades. Then find the \(z\) at which the sigmoid gate matches \(K_\infty\), and interpret \(z\).

›answer

The fixed point satisfies \(P^2/(P+r)=q\), i.e. \(P^2-qP-qr=0\), so \(P_\infty=\tfrac12\big(q+\sqrt{q^2+4qr}\big)\) and \(K_\infty=P_\infty/(P_\infty+r)=\tfrac12\big(\sqrt{\rho^2+4\rho}-\rho\big)\) with \(\rho=q/r\). It is increasing in \(\rho\), tends to \(0\) as \(\rho\to0\) and to \(1\) as \(\rho\to\infty\).

Setting \(\sigma(z)=K_\infty(\rho)\) makes \(z\) a monotone function of \(\log\rho\): the gate pre-activation is a log signal-to-noise ratio. That is the interpretation the sigmoid gate of an LSTM does not come with, and the Kalman derivation supplies for free — the network's learned \(z\) is estimating how much the world moves relative to how noisy the evidence is. Fig. 5.3 overlays the two curves.

EX 9 ★code

Write the Kalman filter for a constant-velocity model (\(A=\left(\begin{smallmatrix}1&\Delta\\0&1\end{smallmatrix}\right)\), \(C=(1,0)\)) and run it on simulated data. Then answer from the code, not from memory: does any quantity in the gain computation depend on the simulated observations? Now make the measurement noise variance a function of the measurement itself, rerun, and identify exactly which line becomes data-dependent.

›answer

No. \(P_{k|k-1}=AP_{k-1|k-1}A^\top+Q\), \(S_k=CP_{k|k-1}C^\top+R\), \(K_k=P_{k|k-1}C^\top S_k^{-1}\), \(P_{k|k}=(I-K_kC)P_{k|k-1}\): the recursion is closed in \(P\) and touches \(y\) nowhere. Only \(\hat x\) sees the data, through \(K_k\nu_k\). Run two wildly different realisations and the gain sequences agree bit for bit — Fig. 6.5 prints the difference as exactly \(0\).

Making \(R\) depend on \(y_k\) changes exactly one line, \(S_k=CP_{k|k-1}C^\top+R(y_k)\), and from that moment the whole schedule is data-dependent and can no longer be precomputed. That one line is the entire distance between a scheduled LTV recurrence (S4 with a positional schedule; vanilla RoPE) and a selective one (Mamba). It is also, structurally, what the extended Kalman filter does when it evaluates its Jacobians at the current estimate.

The useful reframing: selectivity is the signature of a nonlinear filtering problem, imported into a linear recurrence by letting a network compute the coefficients.

EX 10code

Prove the localised rank bound of §3.5 for the time-invariant case, then check it numerically: build \(M_{ki}=CA^{k-i}B\) for a random system with \(N=4\), take a \(20\times20\) block strictly below the diagonal and report its numerical rank; then take a block straddling the diagonal and report that. Explain the difference.

›answer

Strictly below: rank 4. Straddling: full rank (20). The proof is the factorisation \(M_{ki}=(CA^{k-k_0})A^{k_0-i_0}(A^{i_0-i}B)\), valid only when every row index exceeds every column index — which is exactly the condition that the block lies below the diagonal. A straddling block contains entries on both sides of the diagonal, where the factorisation does not apply, and the diagonal band carries \(h_0\) on every entry, so nothing collapses.

This is the whole reason chunking works: diagonal blocks must be computed densely (but they are small), while off-diagonal blocks are applied through their thin factors — and the factor in the middle is what the algorithm calls the running state.

EX 11hand

Using the three-term recurrence, show that the matrix of multiplication by \(Y\) in an orthonormal polynomial basis is symmetric tridiagonal, while the matrix of differentiation is strictly lower triangular. Which of the two is HiPPO's \(A\) built from, and why does that answer why \(A\) is triangular rather than tridiagonal?

›answer

Multiplication: \(\langle Yp_n,p_k\rangle=\langle p_n,Yp_k\rangle\) is symmetric, and vanishes unless \(|n-k|\le1\) by the degree argument — a Jacobi matrix. Differentiation: \(\deg p_n' \le n-1\), so \(\langle p_n',p_k\rangle=0\) for \(k\ge n\) — strictly lower triangular, and not banded, because \(p_n'\) generally has nonzero components on every lower index.

HiPPO's dynamics come from differentiating the projection with respect to time, and the time derivative acts on the basis through \(\partial_tp_n\), which is the differentiation operator (composed with the measure's rescaling). Hence triangular, densely so. If the dynamics had come from multiplication you would get a tridiagonal \(A\) — which is what happens in classical Jacobi-matrix models, and it is a different and much sparser structure.

EX 12code

Project \(u(t)=e^{-t}\sin 6t\) onto the first \(N\) Legendre polynomials for \(N=4,\dots,48\) and plot the \(L^2\) error on log axes; fit an exponent. Repeat with a step function. Which theorem of §8.3 applies to each, and what does the comparison say about HiPPO Prop. 6?

›answer

The analytic signal converges geometrically and hits machine precision near \(N\approx30\) (Bernstein). The step converges like \(N^{-1/2}\) in \(L^2\) (Jackson, at the roughest end of the scale, with Gibbs oscillations near the jump). A Lipschitz kink sits between the two at roughly \(N^{-1.5}\).

HiPPO Prop. 6's \(O(N^{-1/2})\) is therefore a worst-case statement over a rough class, and it is the rate you observe only for genuinely discontinuous inputs. Real signals — and the intermediate activations of a trained network, which are smoothed by everything upstream — are far smoother, so a fixed-size state does far better than the theorem promises. This is the resolution of Exercise 2.3 of the companion notes: the measured exponent is supposed to be steeper than the bound.

EX 13hand

Show the scan monoid \((a_2,b_2)\circ(a_1,b_1)=(a_2a_1,\,a_2b_1+b_2)\) is associative but not commutative, and construct a two-element example in which composing on the wrong side gives the correct transitions and the wrong increments.

›answer

Associativity: both bracketings give \((a_3a_2a_1,\;a_3a_2b_1+a_3b_2+b_3)\). Non-commutativity: \((2,1)\circ(3,0)=(6,3)\) while \((3,0)\circ(2,1)=(6,1)\).

Note what the counterexample does: the first component agrees in both orders, because it is just a product of scalars. Only the increment differs. So a down-sweep that applies the incoming prefix on the wrong side produces a scan whose transitions are right and whose values are wrong — a bug that passes any test checking decay rates or shapes and fails only on exact values. This is the standard way the sum-scan's ordering silently corrupts an affine scan.

EX 14calc

Compute the arithmetic intensity of a dense \(N\times N\) matrix–vector product and of an \(N\times N\) matrix–matrix product in bf16, as functions of \(N\). Place both against a ridge of 295 ops/byte, and state in one sentence why every efficiency argument in this field eventually becomes an argument about turning matvecs into matmuls.

›answer

Matvec: \(2N^2\) FLOPs against \(2(N^2+2N)\) bytes, so the intensity tends to \(1\) op/byte — independent of \(N\). Matmul: \(2N^3\) FLOPs against \(6N^2\) bytes, so intensity \(\approx N/3\), which crosses the ridge at \(N\approx885\) and at \(N=128\) already reaches \(\sim43\).

One sentence: a matvec is memory-bound at every size, so its arithmetic units idle no matter how large you make the state, while a matmul's intensity grows with the tile — which is why Mamba-2 reshapes the scan into batched matmuls and why Mamba-3's MIMO lift adds FLOPs that cost almost no time. Note the parallel with §4: enlarging \(N\) buys memory but not intensity, and those are separate axes that the roofline keeps separate.

PART 13

References

the classical half of the bibliography, which the modern papers assume
#workwhere
1Nerode — Linear automaton transformationsProc. AMS 9 (1958) 541–544
2Kalman — A new approach to linear filtering and prediction problemsJ. Basic Eng. 82 (1960) 35–45
3Kalman, Bucy — New results in linear filtering and prediction theoryJ. Basic Eng. 83 (1961) 95–108
4Kalman — Mathematical description of linear dynamical systemsSIAM J. Control 1 (1963) 152–192
5Ho, Kalman — Effective construction of linear state-variable models from input/output functionsRegelungstechnik 14 (1966) 545–548
6Kronecker — Zur Theorie der Elimination einer Variabeln (finite Hankel rank ⇔ rationality)Monatsber. Berlin (1881)
7Wiener — Extrapolation, Interpolation, and Smoothing of Stationary Time SeriesMIT Press, 1949
8Rauch, Tung, Striebel — Maximum likelihood estimates of linear dynamic systemsAIAA J. 3 (1965) 1445–1450
9Anderson, Moore — Optimal FilteringPrentice-Hall, 1979
10Durbin, Koopman — Time Series Analysis by State Space MethodsOUP, 2nd ed. 2012
11Julier, Uhlmann — A new extension of the Kalman filter to nonlinear systems (UKF)Proc. SPIE 3068 (1997)
12Gordon, Salmond, Smith — Novel approach to nonlinear/non-Gaussian Bayesian state estimationIEE Proc. F 140 (1993) 107–113
13Rabiner — A tutorial on hidden Markov modelsProc. IEEE 77 (1989) 257–286
14Moore — Principal component analysis in linear systems (balancing)IEEE TAC 26 (1981) 17–32
15Glover — All optimal Hankel-norm approximations and their \(L^\infty\) error boundsInt. J. Control 39 (1984) 1115–1193
16Antoulas — Approximation of Large-Scale Dynamical Systems (best single reference for Parts 03–04)SIAM, 2005
17Kailath — Linear SystemsPrentice-Hall, 1980
18Juang, Pappa — An eigensystem realization algorithm (ERA)J. Guid. Control Dyn. 8 (1985) 620–627
19Van Overschee, De Moor — N4SIDAutomatica 30 (1994) 75–93
20Ljung — System Identification: Theory for the UserPrentice-Hall, 2nd ed. 1999
21Bauer, Fike — Norms and exclusion theoremsNumer. Math. 2 (1960) 137–141
22Trefethen, Embree — Spectra and PseudospectraPrinceton, 2005
23Moler, Van Loan — Nineteen dubious ways to compute the exponential of a matrixSIAM Review 45 (2003) 3–49
24Dahlquist — A special stability problem for linear multistep methodsBIT 3 (1963) 27–43
25Hairer, Wanner — Solving ODEs II: Stiff and Differential-Algebraic ProblemsSpringer, 2nd ed. 1996
26Hochbruck, Ostermann — Exponential integrators (the \(\varphi\)-function family)Acta Numerica 19 (2010) 209–286
27Tustin — A method of analysing the behaviour of linear systems in terms of time seriesJ. IEE 94 (1947)
28Szegő — Orthogonal PolynomialsAMS, 1939
29Trefethen — Approximation Theory and Approximation PracticeSIAM, 2013
30Cooley, Tukey — An algorithm for the machine calculation of complex Fourier seriesMath. Comp. 19 (1965) 297–301
31Eidelman, Gohberg — On a new class of structured matricesIntegr. Equ. Oper. Theory 34 (1999)
32Vandebril, Van Barel, Mastronardi — Matrix Computations and Semiseparable MatricesJHU Press, 2008
33Pan — Fast approximate computations with Cauchy matrices and polynomials1506.02285
34Blelloch — Prefix sums and their applicationsCMU-CS-90-190, 1990
35Williams, Waterman, Patterson — RooflineCACM 52 (2009) 65–76
36Bengio, Simard, Frasconi — Learning long-term dependencies with gradient descent is difficultIEEE TNN 5 (1994) 157–166
37Hochreiter, Schmidhuber — Long short-term memoryNeural Comput. 9 (1997) 1735–1780
38Arjovsky, Shah, Bengio — Unitary evolution recurrent neural networks1511.06464
39Voelker, Kajić, Eliasmith — Legendre Memory UnitsNeurIPS 2019
40Martin, Cundy — Parallelizing linear recurrent neural nets over sequence length1709.04057
41Katharopoulos et al. — Transformers are RNNs (linear attention)2006.16236
42Gu et al. — HiPPO2008.07669
43Gu et al. — LSSL2110.13985
44Gu, Goel, Ré — S42111.00396
45Gu, Dao — Mamba2312.00752
46Dao, Gu — Mamba-2 / SSD2405.21060
47Lahoti et al. — Mamba-32603.15569

Companion to From the linear ODE to Mamba-3 and its exercise and office-hours sheets. Every figure on this page computes its own numbers in your browser from the formulas in the text. Written and verified August 2026 · corrections welcome — l@muehrke.de