Everything on this site about state space models, in the order to read it: a page is listed after the pages it builds on. The figures below are the ones those pages use to explain it; each is live: move a slider and it recomputes.
One step of the memory. One channel, B = C = 1. Left: Ā (old state kept) and B̄ (new input written) against the step Δ. Right: the weight an input still has k steps later, the kernel of a fixed model. "As a gate" sets Δ = softplus(z) with A = −1, so Ā = 1 − σ(z) and B̄ = σ(z) (Theorem 1), with the paper's rule.
A fixed filter against a choosing one. A toy with one channel (A = −1, B = C = 1). Filled squares are data tokens, empty ones noise. The fixed model uses one Δ everywhere, so every row is the row above shifted by one: a convolution. The choosing model takes a large Δ on data and a small one on noise, so its state holds between data tokens.
How a recurrence runs in parallel. Eight steps of h_t = a_t · h_(t−1) + b_t with toy values, each a pair (a_t, b_t). Each round combines every slot with the one 1, 2, then 4 places to its left; after three rounds every slot holds h_t, the same as the loop on top. "What is kept": the values one layer holds while generating. Mamba's state does not grow with the length; a Transformer layer's K and V cache does.
The matrix behind the layer. The whole layer as one 9 × 9 matrix, a toy at the size of the paper's chunk example (T = 9, state size N = 2; the decays, B and C are my numbers). Row j is an output step, column i an input step. Blue cells are positive, rust negative, darker is larger. The mask L holds the decays, the scores hold C·B, and the layer's matrix M is the two multiplied cell by cell. The lines cut it into chunks; every block below the diagonal has rank at most 1 in L and at most N = 2 in M.
Four steps, one answer. A toy at the size of the paper's chunk example (my numbers): nine steps cut into chunks, a state of 2 × 2 numbers. Step through the four parts of the chunked algorithm. The bars are the outputs it has so far (blue: from inside the chunk; rust: from the state handed in), the dashed outlines the outputs computed step by step. After step 4 they are the same numbers. Chunks of 1 are the plain recurrence, one chunk of 9 is the plain matrix form.
FLOPs, not time. Arithmetic for one head as the sequence grows: the attention form (the whole T × T matrix), the plain scan, and the chunked algorithm (SSD). Counts, not time: SSD does about three times the scan's arithmetic and still runs faster, because it is all matrix multiplies. The dashed rule is the paper's measurement.
Hold one end or average both. A toy, h′ = −h + sin 3t. Left: one step's area; λ = 1 keeps the right end (Mamba-2), λ = ½ averages both ends. Right: the error at t = 4 as the step shrinks. Measured gain: Tab. 8, 15.81 → 15.72 perplexity.
Turning instead of shrinking. A toy, not a trained model. The arrow is a two-number state. Shrinking never changes its direction; turning by an input-set angle counts the ones, a fixed angle counts the steps. Measured (Tab. 5b): parity 100.00 with input angles, 1.56 fixed, 2.27 none.
Same memory traffic, more work. Left, from the formulas of Tab. 2: FLOPs per byte of one decode step as R grows, against an H100 matrix multiply (about 295, p. 9). Even R = 16 sits far below it. Right, measured: one decode step of the 1.5B models (Tab. 6, BF16, state size 128).
Four ways to read a grid. Each small grid is one route, numbered in the order the scan reads it; the rust dashes are the jumps back to the start of the next row or column, as in the released code. Drag the ring to pick a pixel. In the reach view the shaded cells are the ones whose information can arrive at it; the nearness view is a toy with one fixed decay per step (the real step size depends on the input), and the measured version is Tab. 10.
From the first block to the released one. VMamba-T, one change at a time, each on top of the last: images per second against ImageNet top-1, as printed in Tab. 5 (A100, batch 128). Steps (a)–(c) are faster code for the same network, so their accuracy does not move. Press play and watch where the speed comes from.
Tokens, cost and MambaOut's line. Multiply-adds, not time, on a log scale: one token mixer (or one whole block, with its feed-forward layer) at each place, for VMamba's scan, global attention and 7 × 7 windows. The shaded places are the ones MambaOut would call long, L > 6D, its line for a block with a feed-forward layer of 4D. My count; for the whole VMamba-T it lands within 1 % of the paper's.
One pipeline, five versions. The RT-DETR pipeline for a 640 × 640 image, block by block. Step through the stages to see each block's output shape; switch the version to see which blocks it changes (rust outline), and switch to training to see the dashed parts that exist only while the model learns and are removed at inference.
Where the encoder spends its attention. Counts: how many attention scores one encoder layer computes as the input grows, if every token of the three maps attended to every other, if each map attended only to itself, or if only the 20 × 20 map did (AIFI); the rust line is what a deformable encoder samples instead. These are counts, not time. Measured: the paper's own walk from variant A to E, AP against latency.
Where a scan could save time. My placements, not measured on RT-DETRv4. Costs are my multiply-add counts at 640 × 640: what each change adds (+) or saves (−), next to the nearest timing someone published. Start at "as deployed" to see where the encoder's work goes; the dashed parts exist only in training, and F5 is the map the teacher is aligned to.