NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Spectral State Space Models

Naman Agarwal, Daniel Suo, Xinyi Chen, Elad Hazan · OpenReview

Abstract

This paper studies sequence modeling for prediction tasks with long range dependencies. We propose a new formulation for state space models (SSMs) based on learning linear dynamical systems with the spectral filtering algorithm (Hazan et al. (2017)). This gives rise to a novel sequence prediction architecture we call a spectral state space model. Spectral state space models have two primary advantages. First, they have provable robustness properties as their performance depends on neither the spectrum of the underlying dynamics nor the dimensionality of the problem. Second, these models are constructed with fixed convolutional filters that do not require learning while still outperforming SSMs in both theory and practice. The resulting models are evaluated on synthetic dynamical systems and long-range prediction tasks of various modalities. These evaluations support the theoretical benefits of spectral filtering for tasks requiring very long range memory.

Introduction

Modeling long-range dependencies in sequential data is a fundamental challenge in machine learning. While Recurrent Neural Networks (RNNs) suffer from vanishing gradients and Transformers face quadratic scaling issues, State Space Models (SSMs) have emerged as an efficient alternative. However, standard SSMs often struggle with instability when modeling very long horizons, necessitating complex initialization schemes and reparameterizations to maintain performance.

This work introduces Spectral State Space Models, a novel architecture that leverages the Spectral Filtering algorithm to provide a more robust and theoretically-grounded approach to sequence modeling. By using fixed convolutional filters, the model avoids the pitfalls of learning internal dynamics directly, leading to more stable and faster optimization.

The Spectral Transform Unit (STU)

The core component of this architecture is the Spectral Transform Unit (STU). Unlike previous SSMs that attempt to learn the transition matrix $A$ of a linear dynamical system, the STU uses a set of pre-computed, fixed convolutional filters ($\phi_k$). These filters are derived from the eigenvectors of a specific Hankel matrix, a choice rooted in the theory of learning linear dynamical systems.

The STU architecture uses fixed filters for featurization and learned parameters for output generation.

The STU offers several key advantages:

  • Fixed Convolutional Filters: By fixing the filters, the optimization problem is simplified to learning how to combine these features linearly, turning a non-convex problem into a more stable one.
  • Provable Robustness: The number of filters required scales only logarithmically with sequence length, and performance is independent of the system's "spectral gap."
  • Efficiency: Convolutions are computed efficiently using the Fast Fourier Transform (FFT), maintaining $O(L \log L)$ scaling.
  • Expressive Symmetry: The model demonstrates that symmetric systems (real eigenvalues) are sufficiently expressive for complex benchmarks when properly featurized.

Experimental Results

The proposed model was evaluated on synthetic marginally stable systems and the Long Range Arena (LRA) benchmark.

Synthetic Benchmarks

In synthetic tests designed to challenge stability, the STU demonstrated superior learning dynamics compared to the state-of-the-art Linear Recurrent Unit (LRU). Specifically, the STU learned target systems up to 8x faster and exhibited a much smoother loss curve across various learning rates.

Comparison of learning dynamics (a) and scaling with the number of filters K (b).

Long Range Arena (LRA)

The STU achieved state-of-the-art or competitive results across the LRA suite. Most notably, on the PathX task—a spatial reasoning challenge with a 16,000-token context—the STU achieved 93.24% accuracy. Unlike other models, it achieved this without specialized initialization "tricks" like ring initialization or gamma-normalization, proving its inherent robustness to long-range dependencies.

Discussion and Future Work

While the STU demonstrates remarkable performance, particularly on long-range tasks like PathX, some challenges remain. The current theoretical framework is optimized for symmetric matrices; extending this to fully asymmetric systems is an area for future research. Additionally, the number of filters $K$ introduces a new hyperparameter, though its logarithmic scaling keeps it manageable. Future work may explore hybrid "Spectral Transformers" that combine the robust long-range memory of STUs with the high-capacity local processing of attention mechanisms.

Conclusion

Spectral State Space Models represent a significant step forward in sequence modeling. By replacing learned dynamics with fixed spectral filters, they provide a robust and efficient framework for capturing long-range dependencies. The empirical success on benchmarks like PathX underscores the practical utility of this theoretically-motivated approach.

Summary updated

BibTeX
@inproceedings{agarwal2024spectral,
  author = {Naman Agarwal and Daniel Suo and Xinyi Chen and Elad Hazan},
  title = {{Spectral State Space Models}},
  booktitle = {LCFM @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=f1jdMHPmOZ},
}
Figure