TL;DR
Researchers have developed a new mathematical "stability guarantee" for Mamba-style selective state space models that remains valid even for infinitely long sequences. By measuring changes in the model's internal "timescale" on a log scale rather than an additive one, they prove that small input perturbations won't cause the model's hidden state to drift away, regardless of how long the model runs.
What Problem Does This Paper Address?
Selective State Space Models (SSMs) like Mamba are designed to handle massive, streaming sequences—think financial tick data or long-form text. However, a major concern for researchers is stability: if I change a single input slightly, will that error "explode" or accumulate over time, eventually ruining the model's hidden state?
Existing mathematical bounds for this problem (notably from Cao et al.) measure changes in the model's "timescale" (essentially its step size) additively. The problem is that these additive bounds grow linearly with the sequence length ($L$). To stop this growth, you have to assume a "floor"—a minimum possible value for the timescale. But Mamba often uses a softplus activation that can produce timescales as tiny as $10^{-21}$. At that scale, additive bounds become practically useless, predicting massive errors that don't actually happen in practice.
Methods
The authors' core innovation is the log-timescale condition. Instead of measuring the difference between a nominal timescale ($\Delta_t$) and a perturbed one ($\tilde{\Delta}_t$), they measure the ratio: $|\log \Delta_t - \log \tilde{\Delta}_t| \leq \rho$.
Key technical steps include:
- The Ratio Lemma: Proving that under this log condition, the change in the "decay factor" of the SSM is always bounded by a fixed fraction of the input weight. This ensures that errors at each step don't "pile up."
- Theorem 3 (Cell Bound): Proving a uniform bound for a single scalar recurrence (a "cell") that holds for every sequence length without needing a timescale floor.
- Data-Free Certificates: Using interval arithmetic to propagate these cell-level bounds through an entire Mamba block (including projections, convolutions, and activations) to create a "certificate" of stability for the whole layer.
Datasets
The authors evaluated their bounds on models trained for high-frequency finance:
- Databento MBP-10 (SPY): Limit order book (LOB) data for the S&P 500 ETF from January 2021.
- The task was to predict the log return of the mid-price 100 ticks into the future based on the previous 100 ticks.
Key Insights and Ideas
- The "Aha" Moment on Scaling: The reason additive bounds fail is that as the timescale approaches zero, the "input weight" (how much new information the model absorbs) also approaches zero. An additive error doesn't shrink with the timescale, so it eventually overwhelms the signal. A log-scale error does shrink, keeping the perturbation proportional to the model's actual update.
- Uniformity Over Time: Because the per-step error is proportional to the input weight, the total accumulated error is naturally "damped" by the model's own decay. This leads to a bound that is flat—it doesn't matter if your sequence is 10 steps or 10 million steps long.
- Tightness: Through numerical "gradient attacks" (searching for the worst possible input change), the authors showed their theoretical bound is within a factor of about 2 of the best possible mathematical bound for small changes.
Key Results
The paper compares their new "log-timescale" bound against the traditional "additive" baseline:
- Crossing Point: On a model with a bounded timescale, the additive bound becomes looser (worse) than the log-timescale bound after just 8 steps.
- Softplus Superiority: For models using Mamba's standard
softplustimescale, the additive bound is looser at every single sequence length tested. - Massive Looseness in Old Bounds: At a sequence length of 5,000, the additive bound was 540 times larger than the log-timescale bound for the bounded model, and over $10^{15}$ times larger for the softplus model.
Limitations and Future Work
- Diagonal Restriction: The current proof applies to scalar cells (diagonal $A$ matrices). While standard Mamba uses this, newer variants like Mamba-3 use complex-valued states which aren't yet covered.
- Certificate Looseness: While much tighter than previous bounds, the "data-free" block certificates are still about 5 orders of magnitude higher than the errors found by actual gradient attacks. This suggests the theoretical "worst-case" is still much worse than what happens in reality.
- Floating Point Issues: At extremely small timescales ($10^{-21}$), standard 32-bit floating-point rounding can break the "convex combination" property the proof relies on.
- Future Directions: Extending the math to complex-valued transitions and finding ways to tighten the block-level certificates by accounting for dependencies between different channels.
Summary updated