Introduction
Modern sequence modeling faces a persistent trade-off between training stability and inference efficiency. While Transformers deliver state-of-the-art performance, their quadratic complexity ($O(L^2)$) becomes prohibitive as sequence lengths grow. Conversely, State-Space Models (SSMs) and Linear Dynamical Systems (LDS) offer efficient constant-time inference ($O(1)$ per token) but are notoriously difficult to train due to vanishing or exploding gradients.
Recently, the Spectral Transform Unit (STU) addressed the training challenge by employing a fixed bank of spectral filters, transforming LDS learning into a stable, convex optimization task. However, STUs are typically implemented as convolutions, meaning their inference cost still scales with sequence length (e.g., $O(L \log^3 L)$). SpectraLDS provides the missing link: a provable method to distill these learned convolutional filters back into a recurrent, constant-time LDS form.
Methodology: Bridging the Spectral and Recurrent Domains
The core contribution of SpectraLDS is an end-to-end distillation procedure that inverts the STU representation. The authors demonstrate that any STU filter can be accurately approximated by a linear combination of geometrically decaying 1D-LDS impulse responses.
As shown in the figure above, the process involves:
- Spectral Inversion: Proving that spectral filters can be represented via LDS impulse responses.
- Optimization Algorithm: A practical algorithm that samples random LDS parameters and uses a least-squares approach (with optional gradient-based fine-tuning) to find the optimal LDS matrices $(A, B, C)$.
- Theoretical Guarantees: Theorem 1 in the paper establishes that the approximation error decreases exponentially with the number of spectral filters, ensuring the distillation is mathematically sound.
Experimental Evaluation
The researchers evaluated SpectraLDS on both synthetic system identification tasks and large-scale language modeling benchmarks.
Synthetic Tasks
In synthetic tests, the model was tasked with identifying arbitrary symmetric LDS under varying noise conditions. SpectraLDS significantly outperformed traditional methods like Ho-Kalman and modern architectures like Mamba2 and S4 in terms of sample efficiency and reconstruction accuracy.
Language Modeling Benchmarks
To test scalability, the authors distilled a 340M-parameter FlashSTU model. The resulting SpectraLDS model was evaluated on standard benchmarks including MMLU, HellaSwag, and ARC. Remarkably, SpectraLDS achieved an average score of 39.03, nearly identical to the original FlashSTU's 39.20, proving that the distillation process preserves model quality while enabling recurrent efficiency.
Key Insights and Results
- Efficiency vs. Sequence Length: SpectraLDS achieves true linear scaling ($O(L)$ total, or $O(1)$ per token). In tests with up to 262k tokens, it demonstrated clear runtime advantages over optimized convolutional baselines.
- Dimension Agnosticism: The method can reduce high-dimensional systems to a constant-dimension LDS without significant accuracy loss.
- Symmetry and Stability: By focusing on symmetric LDS (real eigenvalues), the authors leverage the mathematical properties of the Hankel matrix for provable accuracy. However, they noted that recurrent LDS forms require
float64precision for numerical stability during inference.
Limitations and Future Work
While SpectraLDS marks a significant step forward, it is currently restricted to symmetric systems. Extending the theory to non-symmetric systems—which can model oscillatory behavior via complex eigenvalues—is a primary goal for future research. Additionally, developing specialized hardware kernels for these recurrent operations could further enhance the wall-clock speedups observed in this study.
Summary updated