TL;DR
SpectraLDS bridges the gap between stable training and fast inference for state-space models by introducing the first provable method to distill a Spectral Transform Unit (STU) into an explicit Linear Dynamical System (LDS). This allows researchers to leverage robust, convex training via spectral filtering while enjoying ultra-fast, constant-time recurrent generation during inference.
What Problem Does This Paper Address?
While attention-based Transformers dominate sequence modeling, their quadratic computational complexity $O(L^2)$ makes processing long sequences incredibly expensive. Linear Dynamical Systems (LDS) and State-Space Models (SSMs) offer a promising alternative because they can generate tokens in constant time per step by maintaining a compact hidden state.
However, training standard LDS models directly using gradient descent is notoriously difficult due to exploding and vanishing gradients. To fix this, recent architectures like the Spectral Transform Unit (STU) use fixed spectral filters to turn the training process into a well-behaved, convex optimization problem. The catch? STUs lose the ability to perform fast recurrent inference, relying instead on computationally heavy convolutions during generation.
This paper addresses a fundamental question: Can we convert a stably trained STU back into an explicit, recurrent LDS form without losing predictive accuracy?
Methods
The authors introduce SpectraLDS, an end-to-end distillation framework that maps learned spectral filters back into explicit LDS system matrices ($A, B, C$).
The core algorithm works by approximating the STU's convolutional filters using a linear combination of geometrically decaying LDS impulse responses. To make this practical and highly accurate, the authors use:
- Multi-target Orthogonal Matching Pursuit (OMP): A greedy feature-selection method to find the most impactful hidden dimensions.
- Near-Unit-Radius Sampling: A specialized distribution trick that skews the selection of system eigenvalues close to 1, explicitly favoring long-term memory retention.
Crucially, the authors provide a rigorous theoretical analysis (Theorem 1), proving that the distillation error decreases exponentially with the number of spectral filters used.
Datasets
The authors evaluated SpectraLDS across two main settings:
- Synthetic Tasks: Learning to track and predict the outputs of an arbitrary, hidden symmetric LDS under both noiseless and highly noisy conditions.
- Language Modeling Benchmarks: Downstream evaluation of a 340M-parameter language model across a standard suite of text benchmarks, including MMLU, HellaSwag, PIQA, BoolQ, Winogrande, CSQA, OBQA, ARC-Easy, and ARC-Challenge.
Key Insights and Ideas
- The Best of Both Worlds: SpectraLDS proves you don't have to choose between training stability and inference speed. You can use spectral methods for clean, convex training, and then cleanly "flip" the model into a recurrent state for deployment.
- The Power of Overparameterization: Theoretically, inverting these spectral matrices could suffer from terrible numerical instability (high condition numbers). However, the authors discovered an overparameterization effect: as the hidden dimension $h$ of the target LDS grows slightly larger than the number of filters $k$, the reconstruction error plummets exponentially to near-zero ($10^{-19}$).
Key Results
- Identical Downstream Accuracy: When distilling a 340M-parameter FlashSTU model into an explicit LDS representation, the model maintained statistically equivalent performance across all language benchmarks, averaging a score of 39.03% compared to the original's 39.20%.
- Linear Runtime Scaling: Unlike standard convolutions or alternative acceleration methods like Epoched FutureFill, SpectraLDS achieves true linear scaling relative to sequence length during generation. At extreme sequence lengths (e.g., 262k tokens), SpectraLDS runs over 4× faster than the base STU and avoids out-of-memory (OOM) errors entirely.
Limitations and Future Work
- Precision Constraints: Currently, the distilled LDS layers require
float64precision to remain numerically stable. Modern AI hardware is heavily optimized for lower-precision formats (likebfloat16), so finding ways to maintain stability at lower precisions is a vital next step. - Symmetric Matrix Restriction: The mathematical proofs rely on the transition matrix $A$ being symmetric, meaning the system can only model real eigenvalues. Extending this framework to non-symmetric or complex-valued matrices would broaden its expressiveness.
Summary updated