ssm-scan -- the selective state-space scan (Mamba / S6)

A model of the usual kind answers a question about earlier text by re-reading all of it, which gets slower the longer the text is. This is the other approach: keep one small fixed-size running summary and update it once per word, so each new word costs the same whether it is the tenth or the ten thousandth. What makes the modern version work is that the model decides, per word, how much to write in and how much to leave alone — a striking name is written hard, filler barely moves the summary. The cost is that the summary is all there is: whatever it did not keep cannot be recovered later, because the original words were never stored.

Interactive page: how a selective state-space model carries a recurrent state through a sequence -- the scan hₜ = Āₜ ⊙ hₜ₋₁ + B̄ₜ · xₜ, yₜ = C · hₜ -- and what makes it selective: the timestep Δₜ (hence the decay Āₜ and the input gain B̄ₜ) depends on the input. Anchor: N1 sequence mixer / N2 recurrent state (Family E Mamba/SSM).

What it shows

A scalar input sequence x [L] is scanned into an N-dim hidden state. At each step:

The panels share a horizontal time axis: input x, the selective Δ, the state trajectory [N×L] heatmap, and the output y. A side inset shows the current step's per-dim retention Ā and new state hₜ. The scan steps left to right (auto-plays + loops).

Drag an input bar to change xₜ and watch the state + output re-scan from that point (memory in action); set the state size N and sequence length L with the steppers; hover any cell. Companion: mamba-block (the full block).

Render tier

T2 (WebGL2 heatmap for the state trajectory; Canvas2D for the bars, the time axis, and the recurrence inset).

Wiring

layout.mount + controls (N, L, sel, dbias, seed) + an L-step Transport (scan step by step) + onPointer input-bar drag + hover. ?step / ?drag / ?sel / ?hover hooks. Source: page.js.