Paper commentary
On Feature Learning in Structured State Space Models
Feature learning theory shows how to scale Mamba-style state-space models
- Problem Maximal Update Parametrization cannot be applied to state-space models because they fall outside Tensor Programs. Without a width-stable scaling, optimal hyper-parameters do not carry over from small to large models.
- Method µP-SSM rescales Mamba's initialization and learning rates so its features stay width-stable. Unlike the usual approach, it sets the B and C weight scales and the learning rates for the SSM layers directly.
- Results In a Mamba learning-rate sweep on wikitext-103, the optimal learning rate transferred from small to large widths under µP-SSM. Standard Parametrization did not show this transfer.
Why SSM scaling at infinite width matters
State-space models such as Mamba have emerged as alternatives to transformers, and they handle long contexts well. Their sequential recurrence also makes them hard to train, so their scaling with width needs a clear theory.
Infinite-width analysis with the neural tangent kernel has been a central tool, but in that limit features don't move. Feature learning is the more realistic regime, where network parameters move freely during training.
Maximal Update Parametrization, or µP, addresses this by searching a wider hyper-parameter space that includes layer-wise learning rates. Under that scaling, features in each layer evolve in a width-independent way, and optimal hyper-parameters carry over from small to large models.
What counts as feature learning in a sequence layer
The analysis treats a sequence layer as a map from input vectors u_l to output vectors y_l, with widths N_u and N_y. Rather than tracking single coordinates, it tracks the l2 norm of each vector, which is of order \(\sqrt{N_u}\) when coordinates are order one.
A layer meets the initialization condition (INIT) when some feature norm has order \(\sqrt{N_k}\) at initialization, so activations stay coordinate-wise order one. It meets the update condition (Δ) when some feature update after one gradient step has the same order, so updates neither vanish nor blow up.
The corrected Mamba scaling aims higher: every trainable weight should change the activations and outputs non-trivially. This is the sense in which the authors call the sequence model effectively feature learning.
Why µP and spectral scaling don't carry over
Tensor Programs give the general tool here, and the NE⊗OR⊤ program is their most general form. Architectures whose forward pass is such a program, like transformers and convolutional networks, admit a unique µP under which features evolve width-independently.
The authors state that structured SSMs, including S4 and Mamba trained by SGD or ADAM, aren't generally representable as NE⊗OR⊤ programs. The obstruction is the HiPPO-based transition matrix, whose diagonal entries decay fast, so the initial hidden state isn't identically distributed even at initialization.
Spectral scaling conditions require the spectral norms of each weight matrix and its update to scale like \(\sqrt{N_l/N_{l-1}}\). The authors show that meeting these conditions doesn't generally give feature learning in SSMs.
The intuition is that the hidden-state norm \(\|B'u_1\|_2\) is a sum of independent terms that concentrates, following the strong law of large numbers. The ratio \(\|B'u\|_2/(\|B'\|_*\|u_1\|_2)\) comes out of order \(1/\sqrt{N_u}\), which breaks the required condition.
Forward scales of a Mamba layer
A Mamba layer makes B_l, C_l and τ_l depend on the input, and it treats each of the N_u input channels as a 1D SSM. Under ZOH the discrete transition is \(A'^{(i)}_l=\exp(\tau^{(i)}_l A^{(i)})\), and the discrete input matrix is \(B'^{(i)}_l=(A'^{(i)}_l-I)(A^{(i)})^{-1}B^{(i)}_l\). The hidden state then updates as \(x^{(i)}_l=A'^{(i)}_l x^{(i)}_{l-1}+u^{(i)}_l B'^{(i)}_l\).
The weights W_B and W_C are drawn as Gaussians with standard deviations σ_B and σ_C, and biases start at zero. Assumption 3.1 says all other components are NE⊗OR⊤ programs under µP, so the SSM inputs are i.i.d. and correctly scaled.
The squared norm of the first hidden state scales with σ_B squared, the input norm and the constant ζ(2). Stability then needs σ_B in \(\Theta(\sqrt{N_x/N_u})\), whereas standard and spectral initializations give order \(1/\sqrt{N_u}\), so the hidden states vanish.
The first output is Gaussian with mean zero and a standard deviation of order σ_B σ_C times the squared input norm. Stable outputs need σ_C in \(\Theta(1/\sqrt{N_x N_u})\), while standard scaling uses \(1/\sqrt{N_u}\) and lets outputs diverge. Under spectral scaling the outputs keep the right size only because the hidden states vanish.
For later positions the state is a sum over decayed terms, \(x^{(i)}_l=\sum_{m=0}^{l-1}(A'^{(i)}_l)^m B'^{(i)}_{l-m}u^{(i)}_{l-m}\). The matrix power only scales norms by \(e^{-m\tau/2}\), so it doesn't change the width scaling. The authors summarise the stability conditions as σ_B in \(\Theta(\sqrt{N_x/N_u})\) and σ_C in \(\Theta(1/\sqrt{N_x N_u})\).
Learning rates for non-trivial updates
After one SGD step, the squared norm of the hidden-state update scales with η_B, σ_C and a power of the input norm, with ζ(4) a constant. With σ_C fixed by the stability condition, hidden-state updates reach order \(\sqrt{N_x}\) only if η_B is in \(\Theta(N_x/\sqrt{N_u})\). Spectral scaling gives an η_B that leaves those updates vanishing with width, so the first SSM block falls in the lazy regime.
For outputs, the squared update is of order η_C times σ_B squared, with a power of the input norm. Correct updates need η_C in \(\Theta(1/(N_x\sqrt{N_u}))\), while spectral scaling uses a larger η_C, which the authors view as a compensating error.
The transition learning rate η_a doesn't affect stability at initialization or the size of non-trivial updates. It must still be in \(\Theta(N_u)\), since otherwise the transition matrix A is never updated. The full set of update conditions is σ_B in \(\Theta(\sqrt{N_x/N_u})\), σ_C in \(\Theta(1/\sqrt{N_x N_u})\), η_a in \(\Theta(N_u)\), η_B in \(\Theta(N_x/\sqrt{N_u})\) and η_C in \(\Theta(1/(N_x\sqrt{N_u}))\).
Checking the scalings in trained Mamba
Mamba was trained with 3 SSM blocks on wikitext using plain SGD, with the Hugging Face implementation and the µP package. The authors scale N_x and N_u together with N_u = N_x/8, because a small N_u lets N_x grow large and reduces finite-sample effects.
Under Standard Parametrization, latent states and outputs explode at initialization, and their updates explode too. With spectral scaling and ZOH for B, latent states and their updates shrink with width while outputs keep the predicted scale. With spectral scaling and Euler for B, latent states keep their scale but outputs explode.
Under µP-SSM, latent states and outputs both have the expected scale at initialization, and their updates match, for ZOH and Euler alike. A slight shift at small width is attributed to finite-sample effects, which fade once width is large.
Test loss, stability and learning-rate transfer
The authors trained Mamba as a generative model on wikitext-103 with single-epoch training for 20K iterations. They swept the learning rate across widths with N_u = 16 N_x and plotted test loss on a logarithmic learning-rate axis.
Both µP-SSM and µP (heuristic) substantially improve test performance relative to Standard Parametrization. At large learning rates, µP-SSM stays more stable than µP (heuristic).
Under µP-SSM, performance improves monotonically with width, whereas under standard scaling it drops after a certain width. The optimal learning rate transfers from small to large widths under µP-SSM and also appears to transfer under spectral scaling.
The authors note that why optimal hyper-parameters transfer across scales isn't completely understood. They point to transformer depth transfer under residual scaling, and they see the lazy first block under spectral scaling as similar to transformer residual blocks.
Limitations
The derivations take N_u to infinity before N_x. The proportional limit, with N_x N_u roughly constant, isn't rigorously analysed.
Extending Tensor Programs to SSMs would need relaxing the assumption that vectors are asymptotically identically distributed, which the authors leave to future work. The forward and backward analysis assumes all other components are µP-parameterized NE⊗OR⊤ programs.
Experiments use Mamba on wikitext and wikitext-103, with N_u = N_x/8 for the scaling runs and N_u = 16 N_x for the sweep. The reasons optimal hyper-parameters transfer remain open.
Paper info
- Authors
- Chennuru Vankadara, Leena, Xu, Jin, Haas, Moritz, Cevher, Volkan
- Venue
- Advances in Neural Information Processing Systems · Published
- First published
- 2024-12-16
- Added
- 2026-11-26
- DOI
- 10.52202/079017-2736
- Original paper terms
- Check in the original ↗
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Chennuru Vankadara, Leena, Xu, Jin, Haas, Moritz, Cevher, Volkan (2024). On Feature Learning in Structured State Space Models. Advances in Neural Information Processing Systems. https://doi.org/10.52202/079017-2736
BibTeX
@article{leena2024feature,
title = {{On Feature Learning in Structured State Space Models}},
author = {Chennuru Vankadara, Leena and Xu, Jin and Haas, Moritz and Cevher, Volkan},
year = {2024},
journal = {Advances in Neural Information Processing Systems},
doi = {10.52202/079017-2736},
url = {https://papers.nips.cc/paper_files/paper/2024/hash/9c7eeda2dc98e61baa9a5884afd231bc-Abstract-Conference.html}
}