State-Space Models Are Alternatives, Not Transformer Variants

Contrast explicit query-key interactions and K/V history with recurrent state updates, while preserving implementation and empirical boundaries.

A state-space sequence model and a Transformer can solve similar sequence tasks while using different mechanisms. Calling both “attention variants” hides the important change.

Compare the State Contracts

A simplified recurrent state update has the form

st=Atst1+Btxt,yt=Ctst.s_t=A_ts_{t-1}+B_tx_t, \qquad y_t=C_ts_t.

The current state sts_t summarizes earlier inputs. In a selective state-space model, some update parameters depend on the current input. A causal Transformer instead retains position records or their K/V projections and computes explicit query-key interactions.

PropertyCausal self-attentionRecurrent state-space mixer
cross-position mechanismexplicit query-key/value mixingstate update and readout
main retained decode stateper-layer K/V historyrecurrent state
T×TT\times T attention matrixconceptually present in full passabsent
shared goalcontextual sequence recordscontextual sequence records

The shared goal does not make the internal contracts equivalent.

Read Performance Claims with Their Implementation

Mamba combines a selective state-space mechanism with a hardware-aware parallel algorithm. Its paper reports results for specified scales, modalities, implementations, and benchmarks. Those results do not show that attention is obsolete, nor do they reduce the method to the two equations above.

Q1. Classify the sequence mixer

A model replaces pairwise query-key interactions with an input-dependent recurrent state update. Is this best described as a sparse-attention pattern or an alternative sequence mixer?

Choose one

Select one choice, then check.

Hint
A sparse graph removes attention edges but retains the attention operation.
Solution
It is an alternative sequence mixer. The model uses recurrent state rather than a sparse subset of query-key interactions.
Not attempted
Review

Not marked done.

Preserve the Curriculum Boundary

This comparison supplies vocabulary and a contract. Deriving state-space models, discretization, selective scans, kernels, and full empirical evaluation belongs to a later frontier-architectures subject.

Pause and reflect

In your own words, note what you understood, what remains unclear, or what you want to revisit. The note stays with this lesson.

0 of 1 exercises marked done

Review

Not marked done.

LLM PrimerState-Space Models Are Alternatives, Not Transformer Variantshttps://llmprimer.com/transformers/variants-scaling-and-boundaries/state-space-models-are-alternatives-not-transformer-variants© 2026 LLM Primer