Theoretical Foundations of Deep Selective State-Space Models

Structured state-space models (SSMs) such as S4, stemming from the seminal work of Gu et al., are gaining popularity as effective approaches for modeling sequential data. Deep SSMs demonstrate outstanding performance across a diverse set of domains, at a reduced training and inference cost compared to attention-based transformers. Recent developments show that if the linear recurrence powering SSMs allows for multiplicative interactions between inputs and hidden states (e.g. GateLoop, Mamba, GLA), then the resulting architecture can surpass in both in accuracy and efficiency attention-powered foundation models trained on text, at scales of billion parameters. In this paper, we give theoretical grounding to this recent finding using tools from Rough Path Theory: we show that when random linear recurrences are equipped with simple input-controlled transitions (selectivity mechanism), then the hidden state is provably a low-dimensional projection of a powerful mathematical object called the signature of the input -- capturing non-linear interactions between tokens at distinct timescales. Our theory not only motivates the success of modern selective state-space models such as Mamba but also provides a solid framework to understand the expressive power of future SSM variants.

Paper

References (77)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer 1RLC5/10 · confidence 4/52024-07-06

Summary

This work establishes density results of input-controlled differential equations, which formulate different types of state-space models such as S4 and Mamba in the continuous-time idealization. Under this framework, different closures of these models are derived, indicating their distinct inductive biases in the (universal) approximation sense, particularly implying the advantage of data-dependent modeling.

Strengths

1. This work provides fundamental theoretical justifications on the expressivity of different types of SSMs. 2. The derived inductive biases clearly distinguish the recent new data-dependent modeling (e.g. Mamba) from the classic original data-independent modeling (e.g. S4) thorough a input-selective framework, which shows rigorously the superiority of the former architecture. 3. Other theoretical results also lead to useful insights. For instance, diagonal recurrence weakens the approximation capability, but this can be alleviated via stacking. 4. All these insights are basically verified by numerical experiments.

Weaknesses

1. In theory, only the density type of results is provided. That is, although models can rates certain targets universally when models' parameters go to infinity, the convergence *rates* are not characterized. This is much more important since the convergence can be rather slow in certain situations (e.g. curse of dimension), leading to possibly vacuous bounds. The theoretical part would be strengthened and more convincing if authors can discuss more on the approximation rates of SSMs, especially the improvements (in parameter efficiency) of data-dependent modeling. 2. In experiments, the simulations are conducted on low-dimensional (2 & 3) and synthetic datasets. Is it due to the ability of path signature? Can the path signature be powerful and efficient when handling high-dimensional (and real-world) input data?

Questions

1. Please provide more details of questions raised in the weaknesses section above. 2. In formulation, the mentioned "gating" mechanism in this work seems to have a different meaning as usual. Here, gating refers to the transformation of inputs (i.e. data pre-processing). However, in practice, gating often means the (multiplicative) interaction between the hidden states and readout layers (i.e., to get outputs). Can authors explain more about this? 3. Minor issues: What is the definition of (linear) NCDE (see line 311, 312, 315, 317 and 643).

Rating

5

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

As is stated by authors, this work applies a continuous-time idealization in the formulation. The role of concrete discretization schemes is also worthy of explorations, particularly under the case of data-dependent discretization.

Reviewer xt926/10 · confidence 2/52024-07-13

Summary

This paper proposes a framework for better understanding key features that allow the success of SSMs. To be specific, the authors first show that recent SSM-based models are linear controlled differential equations (CDEs). Then, the expressive power of linear CDEs are explored, depending on whether the matrices $A_i$ are diagonal.

Strengths

* This paper focuses on timely and important research problem. * I could not fully read the proof, but the results seem correct.

Weaknesses

* It would be better to provide preliminaries on rough path theory for readers who are not familiar with that. * Although the mathematical results are interesting, I am not sure about the implications of the theoretical results in practice. It would be better if the empirical results are designed to provide the messages that are useful in practice.

Questions

* How can we derive Eq.3? Why suddenly exponential term appears? Any reference for the zero-order hold discretization? (Actually, I searched for such terminology, but could not make a connection between it and Eq.3)

Rating

6

Confidence

2

Soundness

3

Presentation

2

Contribution

3

Limitations

* Check the weakness part & questions part

Reviewer K8Nc7/10 · confidence 5/52024-07-14

Summary

This paper proposes a framework of using Rough Path Theory to understand the expressivity of SSMs and Mamba. The paper establishes connections to linear CDEs and then uses tools from Rough Path Theory to explain why gates are so powerful in SSM models.

Strengths

This is a really nice theory explaining SSMs. It gives a new way of looking at the expressivity/quality results that have been observed in prior work. Hopefully this theory can lead to new insights about how to design better SSMs in the future. Really solid work.

Weaknesses

Not much weaknesses in the work itself. The ultimate test of theory is its predictive power - the paper would be stronger if the theory could "close the loop" and propose a modification to SSM layers that would enable further performance. However, this is a high bar to clear, and I think the work stands on its own as a solid contribution even without a methodological contribution.

Questions

Can you think of any improvements to SSM layers/models that the RPT theory would suggest?

Rating

7

Confidence

5

Soundness

3

Presentation

3

Contribution

4

Limitations

N/A

Reviewer KnKG7/10 · confidence 2/52024-07-15

Summary

This work analyses the modeling capability of different SSMs (S4-S6 and others) using Rough Path Theory by viewing SSMs as (input-) controlled differential equations (CDE). To this end, the authors show that SSMs with with dense transition matrices (A) are able to approximate arbitrarily close any continuous functions of the inputs. In contrast, SSMs with diagonal transition matrices lack this property. However, when stacking/chaining multiple diagonal CDEs (as is the case for the deep architectures), full expressivity is gained again as the depth approaches infinity. The work is mostly theoretical, and, hence, there is only a single toy experiment showing RMSE for Mamba and S5 models with depth 1 and 2, showing that the more limited models are not able to solve the toy task, as they cannot approximate the corresponding function.

Strengths

- The paper is generally well written and the authors managed to make the very involved theory and proofs more accessible by walking through the interpretation and takeaways on a more high level. - The theoretical results are important contributions for categorizing the expressivity of existing SSM models and may potentially inform about future architecture design of SSMs and related models.

Weaknesses

Despite the well-described theoretical contributions and insights, it is still not very clear to me what to take away practically. In particular, it is not clear how useful the result regarding chaining diagonal CDEs is in practice: while it is important to have a proof that an infinite number of chains of diagonal CDE with mixing can recover the full expressiveness of the dense CDEs, the infinite case is not practically important. Instead, it would be important for practical considerations (computational efficiency vs model expressiveness) to know whether one should use dense CDEs or diagonal CDEs with mixing to achieve a certain level of expressivity. However, as far as I understand, there is no result that quantifies e.g. how many diagonal plus mixing layers have a similar expressiveness as a certain number of dense CDEs. The authors speculate in the summary that architectures with non-diagonality might improve performance, but I do not see how this actually follows from this work, since there is no comparison between diagonal+mixing and dense in the regime of finite number of parameters. The experimental section is very weak. While this work is mostly theoretical, this work would nevertheless be improved a lot by a greater experimental section that validates the claims. Showing error curves with a single random seed is not that interesting. I would be better to have a table of final performance that includes error bars. Furthermore, it would be great to explore a few different tasks and several ablations such as number of layers. This would make it at least empirically possible to compare dense and diagonal + mixing and random dense + learned C (or MLP) in the finite parameter setting, where its not clear what to take away from the theorems.

Questions

- what is NCDE? This was not introduced. - does random linear CDE perform best for Area computation and is also a strong baseline for Volume? I understand that with high probability we can just take a random initialized A matrix and train only the C matrix (Theorem 4.2) to achieve full expressivity. However, that model should still not be better than a dense CDE where everything is trained such as in case of S5. Or did you choose S5 with diagonal transition?

Rating

7

Confidence

2

Soundness

3

Presentation

3

Contribution

3

Limitations

Just a single limitation is mentioned in the conclusion. I am sure, the authors can think of many more limitations, such as my main concern raised above regarding the comparison of different mixed diagonal + mixing vs dense architectures. Or the limited experimental evidence.

Reviewer KnKG2024-08-11

Response to rebuttal

Thank you for your response. Note that I did not question the novelty of this work and also agree that the theoretical results are a great contribution, which is why I voted to accept the paper. However, I also remain of the opinion that the theoretical results do not offer a direct and very practical suggestion regarding design of new architectures. This is, because the proofs are indeed *not* independent of the width if you consider practical settings with multiple layers (chaining) and non-linearities in between. I do not want to suggest that such a proof should have been made, because it very likely is not possible. However, it remains not clear from this work, e.g. how much chaining would be sufficient with diagonal matrices and whether this would actually be a problem for Mamba, given that it a very deep model. I also understand that the contributions of this work are of theoretical nature and do not expect a very experimental section. However, I do still think that a bit more than Fig. 1 to support the theoretical findings would have been not only insightful, but important to underscore these findings.

Authorsrebuttal2024-08-13

We appreciate your continued feedback and your recognition of the theoretical contributions of our work. We understand your concerns regarding the practical implications of our results and the empirical validation to support our theoretical findings. **Regarding your point about the practical impact of our work**: We agree that understanding the implications of chaining diagonal matrices and the expressivity of models like Mamba in practical scenarios with multiple layers is important. While our work does not offer a direct blueprint for designing new architectures, we believe it lays the groundwork for future research in this area by identifying key components that could influence expressivity. In particular the fact that diagonal systems capture only the symmetric part of the signature could be leveraged to extend the chaining results to the non-linear case: approximating the result with a linear functional on the symmetric part of the signature, then leveraging the algebra structure of the shuffle product. This procedure would show how even $n$ chained diagonal (Mamba-like) layers, interleaved with non-linearities, would capture the non-symmetric part of the signature fundamentally only up to level $n$. Note that width alone cannot capture the higher terms of the signature; what we point out is a fundamental and *width-independent* drawback of diagonal models, a limitation which can serve as a guide for further avenues of analysis. We also note that it can be possible to derive width-dependent bounds, however those would likely not be tight (as in the standard MLP case). **Regarding the empirical validation**: We understand the importance of supporting theoretical claims with empirical evidence. As mentioned in our initial response, we have indeed conducted new experiments, including a novel analysis using the A5 benchmark of Merril et al. 2024 (“Illusion of state” paper). These experiments were designed to provide additional insights into the practical performance of different architectures, particularly focusing on the depth required for models like Mamba to achieve high performance on state tracking (a task that cannot be easily solved by attention). We included these results in the supplementary material and in the general response pdf. Given your feedback, it seems that these new experiments may not have been fully considered. We are sorry if we perhaps did not emphasize them. If this is the case, we encourage you to review the supplementary material pdf and general response where these additional results are discussed in detail. We value your constructive feedback and would be open to any further suggestions on how we could better present or highlight these results in the final version of our paper.

Reviewer 1RLC2024-08-12

Thanks for the reply. I still feel that the convergence rate characterization is much more important than the density analysis. Certainly, eq. (55) derives the dependence on hidden dimensions, but for sequence modeling problems, the approximation rate regarding the *input dimensions* and *dynamical properties* is more crucial, and the numerical verification here is performed only for low-dimensional tasks. Does the current analysis framework have the potential to solve this difficulty?

Authorsrebuttal2024-08-13

We thank the reviewer for the message and the additional questions. We agree that including insights on the effects of width is interesting; see next paragraph. However, note that width alone is insufficient to capture all the high-order terms of the signature in the diagonal (Mamba-like) case. Our objective in this paper, besides completely characterizing the density, is to highlight a fundamental limitation of diagonal models that is independent of width (this is not an upper bound - our result is tight). Our insights can guide further analysis, such as the potential design of minimal epsilon-sparse recurrences that still capture the full effects of the signature without severely affecting speed or parameter count. Regarding your question: It is possible to derive width-dependent bounds, yet these are unlikely to be tight, similar to what is observed in standard MLPs. We will develop on this in a new subsection in our revision. Techniques and results going in this direction are actively researched by the Rough paths in ML community. As a primal example we would like to refer you to the paper titled "Generalization Bounds for Neural Controlled Differential Equations" (https://arxiv.org/abs/2305.16791). This work provides a generalization bound for a broader class of learners, specifically Neural Controlled Differential Equations (NCDEs), which, as explained in our previous response, are closely related to Linear CDEs, offering a detailed analysis of both generalization bounds and approximation biases. In order to do this the data streams and models are studied from a rough path perspective, dynamical bounds are produced by considering Lipschitz properties of the vector fields and the regularity of the input streams via their 1-variation. These are the natural tools to employ with CDEs like the ones we specify in this work. What we just described is an example of how our work establishes a solid theoretical connection between State Space Models (SSMs) and Rough Paths, setting the stage for further studies, and allowing researchers to leverage the rich literature of existing results.

Reviewer K8Nc2024-08-13

Response

Thank you for the rebuttal. I will be keeping my high score.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC