TL;DR
Current state space models (SSMs) and linear RNNs require fragile training heuristics—such as delicate ring initializations, stable exponential parameterizations, and bespoke normalizations—to prevent training collapse on tasks requiring long-term memory. Drawing on the theory of spectral filtering for linear dynamical systems, this paper introduces the Spectral Transform Unit (STU): a sequence architecture that featurizes inputs using fixed, non-learned spectral filters derived from a Hankel matrix. The resulting model trains stably out-of-the-box (even with zero-initialized weights) and matches or beats leading SSMs on the Long Range Arena benchmark.
What Problem Does This Paper Address?
While Transformers excel across sequence domains, their self-attention mechanism scales quadratically ($\mathcal{O}(L^2)$) with context length $L$. Linear State Space Models (SSMs) and Linear Recurrent Units (LRUs) offer sub-quadratic alternatives by framing sequence-to-sequence mappings as continuous or discrete linear dynamical systems (LDS).
However, when tasks require memorizing information over very long contexts without signal decay (i.e., marginally stable systems whose transition matrix eigenvalues lie near 1), learning the LDS parameters directly via gradient descent is notoriously ill-conditioned and non-convex. Existing models rely on an assortment of handcrafted tricks—such as stable exponential parameterizations, complex annulus ("ring") initializations, and $\gamma$-normalizations—to prevent gradient explosion or vanishing. Without these heuristics, architectures like LRU fail completely on long-range tasks.
Methods
The authors bypass direct optimization of transition matrices by adapting spectral filtering (Hazan et al., 2017) to deep neural networks:
-
Fixed Spectral Filters: Instead of learning convolutional kernels or transition matrices, the Spectral Transform Unit (STU) computes fixed filters from the top $K$ eigenvectors of a known positive semi-definite Hankel matrix: $$Z[i, j] = \frac{2}{(i + j)^3 - (i + j)}$$ Because the spectrum of $Z$ decays exponentially, a small number of filters ($K \sim \mathcal{O}(\log L)$) is provably sufficient to approximate any marginally stable LDS with symmetric transition matrices.
-
Spectral Convolutions: Inputs are projected onto these orthogonal basis vectors via 1D convolutions using FFTs in $\mathcal{O}(K \cdot L \cdot d_{\text{in}} \log L)$ time. The paper extends this featurization to handle negative eigenvalues using alternating-sign convolutions.
- Hybrid Autoregressive STU (AR-STU): Grounded in the Cayley-Hamilton theorem (which proves that any order-$d$ LDS can be represented by a $d$-step autoregression over past inputs and outputs), the authors extend STU by adding an autoregressive term over $k_y$ past outputs: $$\hat{y}_t = \sum_{i=1}^{k_y} M^y_i \hat{y}_{t-i} + \text{local autoregressive inputs} + \text{spectral filter projections}$$
- Stacked Architecture: Similar to existing SSM architectures, multiple STU/AR-STU layers are interleaved with standard Gated Linear Units (GLUs) to form deep networks.
Datasets
The authors evaluated their model on two testbeds:
- Synthetic Marginally-Stable LDS: A low-dimensional linear dynamical system with eigenvalues placed extremely close to unit magnitude ($\sim \pm 0.9999$, condition number $\sim 10^4$), measuring parameter recovery efficiency and optimization dynamics.
- Long Range Arena (LRA) Benchmark: The standard suite for evaluating long-context models across text, image, and math tasks (sequence lengths $1\text{K}$ to $16\text{K}$), including ListOps, Text (IMDb), Document Retrieval (AAN), sCIFAR-10, Pathfinder, and PathX.
Key Insights and Ideas
- Convexity and Provable Guarantees: By projecting the input history onto a fixed, universal subspace spanned by Hankel eigenvectors, sequence representation becomes linear in the learned projection parameters $M$. This eliminates the non-convex optimization traps of recurrent matrices.
- No Stabilization Tricks Needed: Because the basis filters are fixed and capture long memory analytically, the learnable projection weights can simply be initialized to zero. No ring initialization, complex-plane phase restriction, or variance normalizations are required.
- Bridging LDS and Autoregression: Theorem 4.1 rigorously connects state space representations to output autoregression via the Cayley-Hamilton theorem, demonstrating that adding short autoregressive horizons ($k_y$) significantly improves expressivity on structured 2D/image data.
Key Results
- Synthetic LDS Optimization: STU converges smoothly in fewer than 100 samples with a large, stable learning-rate window. By contrast, LRU plateaus for the first 50% of training and requires roughly $8\times$ more samples to converge, failing entirely if any of its normalization tricks are omitted.
- Long Range Arena (LRA):
- PathX (16K context): On the hardest task in LRA—where transformers fail and LRU requires every ablation trick active to surpass random guess—the vanilla STU reaches 89.50% and AR-STU achieves 93.24% accuracy out-of-the-box.
- Overall Performance: AR-STU outperforms S4 and LRU on 4 of the 6 benchmarks, achieving 91.34% on sCIFAR-10 (vs. 88.65% S4, 89.0% LRU), 61.14% on ListOps, 90.47% on Text, and 95.45% on Pathfinder.
Limitations and Future Work
- Symmetric Matrix Assumption: The formal representation guarantee is established for symmetric transition matrices $A$. While the paper outlines extensions for broader classes, theoretical bounds for general, asymmetric, or non-normal LDS in deep stacks remain an open area.
- Autoregressive Order Search: While non-image tasks worked well with $k_y = 2$, image tasks (CIFAR, PathX) required tuning $k_y$ up to 32 to maximize accuracy, introducing an architecture search hyperparameter.
- FFT Log-Factor: Computing convolutions across $K$ filters incurs an $\mathcal{O}(K L \log L)$ complexity, which carries a small $\log L$ overhead relative to the strict linear $\mathcal{O}(L)$ time achieved by parallel associative scans in diagonal SSMs.
Summary updated