Selectivity Makes State-Space Models Universal Sequence Approximators

Yoshihiro MaruyamaNeurIPS 2026

TL;DR

Architectures like Mamba have recently challenged the Transformer's throne by processing long sequences in linear time using "selective" state-space models (SSMs)—recurrent memories whose transition rules adapt to each incoming token. While we know selectivity works brilliantly in practice, was it just a clever engineering trick, or did it fundamentally alter what these models can compute? This paper proves mathematically that token-dependent selectivity alone turns a simple, linear-readout state-space scan into a universal approximator capable of learning any well-behaved causal sequence rule.

What Problem Does This Paper Address?

For years, sequence modeling has been caught in a tug-of-war between expressivity and efficiency. Transformers are extraordinarily expressive because attention compares every token to every other token, but that comes with a brutal quadratic cost as sequences grow.

Classical State-Space Models (SSMs) offer a fast, linear-time alternative by compressing the past into a single hidden state updated via a fixed mathematical rule. However, because that transition rule doesn't change based on the current input, classical SSMs struggle to decide on the fly what to remember or forget. Mamba solved this empirically by making the state transitions input-dependent—a mechanism called selectivity.

What remained unclear was the fundamental math behind this leap. Existing universal approximation theorems rely on heavy machinery like attention, nonlinear activations inside the recurrent loop (like standard RNNs), or giant multilayer perceptrons (MLPs) tacked onto the end. Nobody knew if the bare-bones selective SSM scan itself—updating a state with a simple diagonal matrix and reading it out linearly—was strong enough to capture complex interactions across time.

Methods

Because this is a pure theory paper, the "method" is a constructive mathematical proof—meaning the author literally builds a working blueprint from scratch to show how a selective SSM can approximate any continuous causal sequence-to-sequence function (over a bounded input space and finite sequence length $T$).

Here is how the blueprint works:

  1. Soft Partitioning: The input space is covered with a grid of $M$ representative reference points, using normalized Gaussian functions to measure how closely an incoming token matches each point.
  2. Selective Tensor Products: As tokens arrive one by one, the SSM updates its hidden state. Instead of using standard nonlinear activations, it uses its input-dependent diagonal gates ($\lambda \in (0,1)$) to multiply the stored state by the current token’s Gaussian match weights. Step by step, each coordinate in the hidden state tracks a specific path of tokens, building a giant family of product features over the sequence history.
  3. Linear Readout: Because all the complex, high-order interactions between past tokens have already been multiplied together inside the hidden state, the final step is shockingly simple: a linear matrix multiplication combines those state features with pre-sampled target outputs.
  4. Internal Clock: While a one-layer model needs an external "clock" signal to know what step $t$ it is on, the author shows that stacking just two selective SSM layers allows the bottom layer to act as an autonomous scalar pacemaker ($c_t = \rho c_{t-1} + 1$) for the top layer.

Datasets

Not discussed in the paper. (This is a purely theoretical work proving mathematical guarantees rather than running empirical benchmarks.)

Key Insights and Ideas

  • Multiplication is the secret sauce: Why can't classical, fixed-transition SSMs do this? A fixed SSM can only accumulate sums of transformed past tokens. If you ask it at step 3 to compute the product of token 1 and token 2 ($x_1 x_2$), it literally cannot do it—its mixed interactions vanish. Selectivity turns the memory gate itself into a multiplicative operator, allowing the state to weave tokens together across time.
  • No MLP crutch required: You don't need attention or a massive nonlinear feedforward network at the end of the encoder to create cross-token interactions. The selective scan brews those nonlinear interactions right inside the recurrent memory, even while keeping the state update strictly contractive (meaning old memories naturally fade unless reinforced).
  • Trading width for depth (and structure): In the worst case, tracking every possible sequence path requires a massive hidden state width. However, the author shows two neat escapes: you can slice a wide layer into a stack of narrower residual blocks without losing a single feature, or, if the target rule has an underlying low-rank tensor structure, compress the state dramatically so each product term only takes up a single recurrent coordinate.

Key Results

  • Universal Approximation (Theorem 3.1 & Corollary 5.2): Any continuous causal sequence map on a compact domain over horizon $T$ can be approximated to within any arbitrary error $\varepsilon > 0$ by a clocked 1-layer selective SSM, or an unclocked, fully autonomous 2-layer selective SSM stack.
  • Strict Mathematical Separation (Proposition 4.2): On a simple 3-step sequence over $[-1, 1]^3$ where the goal is to output $G_3(x_1, x_2, x_3) = x_1 x_2$, no finite-dimensional fixed-transition additive SSM can achieve a uniform approximation error strictly better than $1$—even if its input and readout maps are allowed to depend nonlinearly on the current token and the clock. Meanwhile, a selective SSM approximates it to arbitrary precision.
  • Explicit Resource Bounds: Using a grid of $M$ points over sequence length $T$, the brute-force universal construction requires a state width of $N = \sum_{\ell=1}^T M^\ell = \Theta(M^T)$, while still maintaining $O(TN)$ linear-time scan operations with respect to sequence length at a fixed model size.

Limitations and Future Work

The author notes a few clear boundaries to these guarantees:

  • Finite Horizons and Exponential Width: Standard uniform approximation requires compact input domains and a fixed, finite sequence horizon $T$. Furthermore, the general worst-case construction requires a hidden state width that grows exponentially with the horizon ($\Theta(M^T)$) unless the target map admits a compact tensor factorization.
  • Idealized vs. Stock Mamba: The proofs analyze a generalized selective scan interface. "Stock" Mamba/S6 architectures used in the wild impose extra parameter-sharing and low-rank projection constraints across channels for hardware efficiency, which are stricter than the unconstrained continuous (or growing neural) selectors used in the main theorem.

Summary updated

Abstract

Selective state-space models such as Mamba replace fixed linear state transitions by input-dependent transitions, yielding recurrent sequence models that retain linear-time inference at fixed model size while adapting their memory dynamics to the current token. We show that even a simple form of this selective memory update has universal approximation power. Specifically, for every compact input domain, finite horizon, and continuous causal sequence-to-sequence map, a clocked diagonal selective state-space scan with strictly contractive gates and a linear-in-state readout uniformly approximates the target map. The proof is constructive: input-dependent diagonal propagation generates tensor-product partition features over prefixes, and the linear-in-state readout combines these features with sampled target values. Thus the high-order interactions required for universality are produced inside the selective scan itself, rather than by attention, nonlinear hidden-state dynamics, or a universal multilayer perceptron applied after a sequence encoder. These results identify selectivity as a mathematically sufficient mechanism for expressive linear-time state-space sequence modeling. Selectivity lets the model decide, token by token, which parts of the past should be preserved, faded, or combined with the present. The universal approximation theorem shows that this adaptive use of memory is sufficient to reproduce any well-behaved causal sequence rule.
BibTeX
@inproceedings{maruyama2026selectivity,
  author = {Yoshihiro Maruyama},
  title = {{Selectivity Makes State-Space Models Universal Sequence Approximators}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=lD881YL8Tk},
}
Figure