Abstract
Selective State-Space Models (SSMs), such as the Mamba architecture, have emerged as efficient, linear-time alternatives to Transformers for sequence modeling. However, their theoretical generalization properties, particularly for "selective" (input-dependent) variants, have remained largely uncharacterized. This paper presents the first rigorous generalization error analysis for selective SSMs. By establishing a mathematical link between selective SSMs and linear attention, we derive generalization bounds that depend on the system's stability. We prove that for stable systems—those with a negative spectral abscissa—the generalization error remains independent of sequence length, a property crucial for long-context modeling. Our theoretical findings are supported by empirical evidence across synthetic and natural language tasks, highlighting an implicit bias toward stability during training.
Introduction
The dominance of Transformers in sequence modeling is challenged by their quadratic computational complexity relative to sequence length. State-Space Models (SSMs) offer a promising alternative with linear scaling. While Linear Time-Invariant (LTI) SSMs are well-understood, modern architectures like Mamba utilize "selective" mechanisms where system dynamics are input-dependent. This dependency complicates theoretical analysis. A fundamental question remains: does the generalization gap—the difference between training and test performance—scale poorly as sequences grow longer? This work addresses this gap by providing a theoretical framework for selective SSM generalization.
Methodology
The authors bridge control theory and deep learning theory through three primary steps. First, they show that selective SSMs can be mathematically "unrolled" into a form equivalent to linear attention. This allows the application of covering number techniques to bound model complexity. Second, they focus on the spectral abscissa ($s_A$), defined as the largest real part of the eigenvalues of the system's state matrix. In control theory, $s_A < 0$ denotes a stable system. Finally, using Dudley’s integral and Rademacher complexity, they derive a novel generalization bound that explicitly accounts for sequence length ($T$) and system stability.
Empirical Evaluation
The theory was validated on three distinct tasks:
- Synthetic Majority Task: Predicting bit majorities to test uniform information aggregation.
- IMDb Sentiment Classification: A real-world natural language benchmark.
- ListOps: A synthetic benchmark requiring hierarchical reasoning and long-range dependency handling.
Results and Observations
The most significant finding is that stability is the prerequisite for length-independent generalization. If a selective SSM is stable ($s_A < 0$), the generalization bound does not degrade with increasing sequence length. Conversely, for unstable models ($s_A > 0$), the generalization error grows exponentially.
Empirical training dynamics also revealed an implicit bias toward stability. Even when initialized in an unstable regime (e.g., $s_A = 0.1$), successful optimization naturally drives the model toward the stability boundary ($s_A \approx 0$). In cases where the model fails to reach stability, particularly for long sequences, the loss often explodes (reaching values as high as $10^{30}$), confirming that stability is a practical requirement for convergence.
Discussion and Limitations
While this work provides a foundational theory for selective SSMs, it focuses on the Zero-Order Hold (ZOH) discretization used in Mamba. Future work is needed to extend these proofs to other discretization methods and hybrid architectures like Mamba-2. Additionally, the current analysis assumes a shared distribution between training and test data, leaving the problem of out-of-distribution generalization (e.g., length extrapolation) for future study.
Summary updated