Before you can read the parent note, you must own every piece of notation it throws at you. This page builds each one from nothing, in the order they depend on each other. Nothing here assumes you have seen a matrix, an ODE, or a convolution before.
Why start at 1 and not 0? It is purely a bookkeeping choice — nothing mathematical hinges on it. Starting at k=1 lets us say "x1 is the first real input" and, later, reserve a separate label for the memory before any input has arrived (that memory is h0, built in §5). If you preferred k=0 for the first input, you would just shift every subscript down by one; the formulas are identical.
The picture: imagine words on a page read left to right, or beads threaded on a string. Each bead sits at a position k=1,2,3,…,L
Why the topic needs it: the whole point of these models is processing sequences — sentences, audio, DNA — where order matters. The counter k lets us talk about "the past" (steps before k) and "the future" (steps after).
The picture: an arrow in space, or more simply, a set of N dials each holding a value. If N=2 you can draw it as a point on a flat plane; if N=1000 you can't draw it, but it's still "just a list".
Why the topic needs it: the model's memory — the hidden state h — is a vector. Each of its N slots stores one running summary of the past. Bigger N = more memory capacity.
The picture: a small whiteboard the model scribbles notes on. At each step it erases a bit, adds the new input's contribution, and keeps the board for next time.
Why the topic needs it: this single vector is the entire summary of everything the model has seen so far. That is what makes the model fast — it never re-reads the past; it only reads the whiskered-down summary h.
The picture: feed an arrow in, get a rotated/stretched arrow out. See the figure below — the left dial-panel is h, the grid is A, the right panel is Ah.
Why the topic needs it. The three letters A,B,C are all matrices, and they do three different jobs:
A∈RN×N — mixes the old memory into the new memory (state → state).
B∈RN×1 — injects the current input into the memory (input → state).
C∈R1×N — reads the memory out into an answer (state → output).
Reading the bar. The overline marks the discrete (per-step) version of a matrix. So Aˉ ("A-bar") is the discrete version of A, and likewise Bˉ ("B-bar") is the discrete version of B. The un-barred A,B are the continuous versions (§7 explains why they differ). C needs no bar — it reads the state out the same way in both worlds.
The picture: a bucket of water starting empty (h0=0). Each step the bucket drains a fraction (that's Aˉ, which keeps a portion of the old level) and you pour in a splash proportional to the input (that's Bˉxk). The water level is the state; the reading on a gauge attached to it is yk.
Why the topic needs it: this pair of lines is the model at inference time. It runs in O(L) — one cheap update per token — which is exactly the linear-time promise state-space models (SSMs) make over the O(L2) Transformer. Compare this to RNNs and LSTMs, which also carry a state forward step by step; SSMs are that idea with a cleaner, controllable update rule.
— an equation that says "the change in h is determined by where h is now (Ah) plus the current input (Bx)". We give it the label (⋆) so we can point back to it. Physics and control theory have centuries of exact tools for such laws. Working continuously first, then converting to steps, gives an exact update rule instead of the crude approximation you'd get by naively subtracting neighbouring samples.
Why this specific tool? The solution of the ODE (⋆) (with input held constant over a step) over one full step of width Δ is exactly multiply-by-eAΔ. So the discrete decay matrix is Aˉ=eAΔ: it is the honest, exact answer to "if the state obeys this law, where is it one tick later?" A crude method (Euler's Aˉ≈I+AΔ) drops all the higher terms and drifts off over long sequences.
The picture — why decay: in the scalar case eaΔ with a<0 is a number between 0 and 1. Multiplying the state by it each step shrinks it — that is forgetting. The figure shows how the size of that number sets memory length: near 1 ⇒ long memory, near 0 ⇒ fast forgetting. This is exactly the worked example's 0.9 (slow) vs. 0.5 (fast).
The picture: a stencil dragged along the sequence; at every stop it multiplies-and-adds the values under it. This is the same operation at the heart of Convolutional Neural Networks — only there the stencil slides over an image, here over a time axis.
Why the topic needs it: unlike the step-by-step recurrence, a convolution can be computed for all positions in parallel, which is why the S4 model trains as a convolution but generates as a recurrence.
Recall Why two views of the same model?
Recurrence :::: cheap O(L) generation, one token at a time, no parallelism.
Convolution :::: parallel over the whole sequence, ideal for training on GPUs.
Why the topic needs it: this is the scoreboard of the whole chapter. Transformers are O(L2); SSMs are O(L) recurrent / O(LlogL) convolutional. Linear Attention is another route to O(L) — SSMs are a cousin, reaching the same linear budget through a state recurrence instead of a reweighted attention sum.