Understanding the Differences in Foundation Models: Attention, State  Space Models, and Recurrent Neural Networks

Authors: jerome  sieber
carmen amo alonso
alexandre  didier
melanie n zeilinger
antonio  orvieto
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 19:53:07

Abstract: Softmax attention is the principle backbone of foundation models for various artificial intelligence applications, yet its quadratic complexity in sequence length can limit its inference throughput in long-context settings. To address this challenge, alternative architectures such as linear attention, State Space Models (SSMs), and Recurrent Neural Networks (RNNs) have been considered as more efficient alternatives. While connections between these approaches exist, such models are commonly developed in isolation and there is a lack of theoretical understanding of the shared principles underpinning these architectures and their subtle differences, greatly influencing performance and scalability. In this paper, we introduce the Dynamical Systems Framework (DSF), which allows a principled investigation of all these architectures in a common representation. Our framework facilitates rigorous comparisons, providing new insights on the distinctive characteristics of each model class. For instance, we compare linear attention and selective SSMs, detailing their differences and conditions under which both are equivalent. We also provide principled comparisons between softmax attention and other model classes, discussing the theoretical conditions under which softmax attention can be approximated. Additionally, we substantiate these new insights with empirical validations and mathematical arguments. This shows the DSF's potential to guide the systematic development of future more efficient and scalable foundation models.

Main paper: 
 introduction: 
 Foundation models serve as the backbone for a wide range of tasks across Artificial Intelligence due to their ability to learn complex interactions in large datasets [1] . In recent years, the attention mechanism [2] has been the dominating token-mixing strategy in foundation models. However, its major computational bottleneck, i.e., the quadratic complexity with context length, has posed a challenge to scaling and deploying these models beyond moderate context lengths [3] . In order to mitigate these issues, attention-free architectures have been proposed: prominent examples of these are the novel State Space Models (SSMs) [4] [5] [6] [7] [8] , as well as recent efforts to enhance Recurrent Neural Networks (RNNs) [9] [10] [11] [12] . Although these models show great promise in boosting efficiency, efforts to provide a rigorous theoretical comparison are scarce, and current comparisons with attention are merely empirical (see Section 5 for an in-depth discussion). Despite the prevalence and ubiquity of foundation models, a principled understanding of the similarities and differences among these different design strategies is currently lacking.In order to close this gap, we introduce the Dynamical Systems Framework (DSF) -a theoretical framework based on a control theoretic perspective -that allows us to evaluate the similarities and differences between different foundation models in a principled manner. The DSF serves as a powerful tool for approaching theoretical research questions about foundation models, enabling direct comparisons -both theoretical and experimental -across architectures such as attention mechanisms, SSMs, and RNNs. We believe that the DSF provides new insights on the most relevant features found in current architectures, and can inform a systematic development of future hybrid models. The DSF further simplifies identification of existing computational algorithms to apply to newly developed models. Rather than providing an exhaustive list of insights, the results included below are meant to exemplify important questions that the DSF can answer and guide future research. Specifically, we explore the following questions:• How are attention mechanisms, SSMs, and RNNs related?TL;DR: All three model classes can be represented as recurrent models, which can be compared using the proposed DSF.• Can softmax attention be expressed as a recurrent model? TL;DR: Softmax attention translates to a recurrent model within the DSF, however the hidden state dimension needs to be infinite.• Why does state expansion help to improve performance of RNNs and SSMs? TL;DR: This is related to the second question: state expansion increases the dimension of the hidden state thus allowing for an increased expressivity of the model (Lemma 2).• Why do SSMs significantly outperform attention on the LRA benchmark? TL;DR: The performance gap can be explained by the recurrent normalization strategy (discretization step) used by selective SSMs as discussed in Section 4.2.• How closely are linear attention, S6 (i.e. Mamba) related? TL;DR: The common feature is the coupling of state transition and input matrix via a single (normalization) parameter in their recurrent representation. However, the models differ in the parameterization of this parameter, which we analyze experimentally.• What do selective SSMs teach us about improving RNN architectures? TL;DR: Replacing the state transition in a RNN variant -qLSTM -with the state transition of S6 improves performance of the RNN.We note that the main contribution of our paper is the introduction of the DSF, which is a unifying framework for analysis of attention mechanisms, SSMs, and RNNs. To the best of our knowledge, this is the first unified framework that allows analysis of all three model classes in the same parameterization and thus allows to identify differences in the models that lead to significant performance improvements. While some of the provided results already exist in the literature (e.g that increased state size improves performance), we also provide novel insights unique to the DSF framework in a comprehensive way that enables further analysis with control theoretical tools.Notation: We use Latin letters in the following way: N is the size of the hidden state in the DSF, n the state expansion, d the embedding size or model size, and L the sequence length. A visual representation of these dimensions is given in Appendix A. We use superscripts, e.g. • d , to denote the elements or block-elements of a matrix and a block-matrix. We use subscripts, e.g. • i , to denote the time index (or input dependency). Specifically, v i represents the value of vector v at time i. We use bold notation to indicate sequences, i.e., v i = [v 1 , . . . , v i ]. We use σ(•) to denote the sigmoid function. The products ⊙ and ⊗ denote the Hadamard (element-wise) product and the Kronecker (block-wise) product, respectively. I n denotes the identity matrix of size R n×n . Generally, we omit stating the bias term for weight matrices unless stating the bias term helps with clarity. 
preliminaries: 
 In this section, we introduce the key architectural components studied in this work: attention, SSMs, and RNNs. We remark that these components are often the central block -considered to be the backbone -within a complex architecture composed of other blocks and skip connections (see for instance [13] ). In what follows, we review exclusively the backbone block, which we denote as f (•) in y = f (u), where u ∈ R L×d and y ∈ R L×d are the input and output sequences, respectively.The standard self-attention block [2] consists of three matrices: W Q , W K , and W V , which are the learnt parameters of the model. These matrices, when multiplied with the input u, yield the queries q ∈ R d k , keys k ∈ R d k , and values v ∈ R dv , respectively:q = uW Q , k = uW K , v = uW V .(1) Keys, queries, and values are then combined in the attention block to produce the outputEQUATIONwhere ζ(•) is a map R L → R L and is applied row-wise. For standard self-attention, the softmax function is used, i.e. ζ(•) = softmax(•), but given the limitations of the softmax function, alternative formulations have been proposed. We consider two formulations of attention: softmax attention (2) and linear attention [14] . We focus on masked attention formulations, i.e., the attention matrix ζ(qk ⊤ ) has a lower-triangular structure, and to simplify the derivations, we drop the scaling factor √ d k .Architectures based on a state space parametrization compute the output y through a dynamic recurrence of input signals at each time step i, i.e.,EQUATIONEQUATION) where h i is the hidden state of the system, and the dynamic matrices of appropriate dimensions A i , B i , C i , D i are the learnt model parameters. Different time-varying and time-invariant parameterizations for A i , B i , C i , D i have been proposed in the literature (an overview is given in [15] ). Here we discuss the most prominent one.S6. The first selective SSM parametrization (S6) was introduced together with the Mamba architecture [7] . The S6 block parametrizes the recurrence asEQUATION∆ i = softplus(W ∆ (W u u i ) + b ∆ ) for every i, W ∆ , W u , W B , W C , W D ,and A are learnt matrices of appropriate dimensions, and b ∆ is a learnt bias. While SSM models allow for complexvalued matrices A i , B i , C i , D i , here we restrict ourselves to real-valued matrices as in [7] .Similar to SSMs, RNNs also parameterize the input-output relationship via a recurrent computation, commonly given by the long short-term memory (LSTM) [16] , i.e., at each time step iEQUATIONEQUATION) where ūi represents the pre-processed raw input u i , i.e., ūi = tanh(W u u i + U u y i-1 ), (6) and f i , i i , and o i are the forget gate, the input gate, and the output gate, respectively,EQUATIONwhere W f , W i , W o and U f , U i , U o are the learnt gate parameters. In this paper, we focus on two variants: quasi LSTMs (qLSTM) [9] , which removes the output dependence of the gates, and RG-LRU [10] , which attempts to integrate ideas from SSMs into RNNs.qLSTM. The qLSTM model is parameterized by recurrence (5) with pre-processed input ūi and gates f i , i i , o i :EQUATIONRG-LRU. The RG-LRU model presents a hybrid between a qLSTM and a SSM using the recurrenceEQUATIONEQUATIONwith the following gates and no pre-processing of u i :EQUATION)3 Dynamical Systems Framework for Architecture ComparisonIn this section, we introduce the Dynamical Systems Framework (DSF) that allows in-depth analysis of the architectural features of attention, SSMs, and RNNs from a dynamical systems perspective. We use this to rewrite the parametrizations in a common framework and provide detailed comparisons.This task evaluates a model's ability to capture the tone of long tokenized texts. The dataset consists of IMDb movie reviews, which need to be classified as negative or positive in tone. The task is a binary classification task with maximal input lengths of 4k. For the training on WikiText-103, each learning rate sweep took approximately 14h, leading to a total parallelized runtime of 42h for all three attention models. We estimate a total of 1h of runtime for tuning runs, bringing the total runtime to 43h. also suggest that the recursive structure in Λ i and B i (present in S6 and SSD but not in normalized attention or linear attention) is less important than proper normalization of the attention scores. Additionally, the results on WikiText-103 (Table 1 ) show that better normalization can close 25% of the perplexity gap between linear attention and softmax attention. Together, these results warrant more investigations into new and better normalization techniques for attention-based models.Finally, we remark that softmax attention performs perfectly accross all sweeps except {L = 512, KV-pairs = 64}, d = 64, and n = 32, which is most likely due to a too small model or too small learning rate.Question: Does the paper discuss the limitations of the work performed by the authors?Answer: [Yes]Justification: Limitations of the proposed framework as well as the computational experiments are discussed in Section 6.Guidelines:• The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper. • The authors are encouraged to create a separate "Limitations" section in their paper.• The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be. • The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated. • The authors should reflect on the factors that influence the performance of the approach.For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon. • The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size. • If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness. • While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations. 
dynamical systems framework (dsf): 
 The DSF relies on a dynamical systems representation of the architectures. A dynamical system models how a system's state, here denoted by h, evolves over time according to a difference or differential equation. Dynamical systems often evolve under the evolution of some input u, and the observable is an output y. These systems capture time-dependent processes, rendering them suitable for understanding the behavior of sequence models. Here, we choose a recurrent state space representation. This choice is motivated by the widespread use of state space model representations for dynamical systems. Moreover, we show in later sections that this representation encompasses attention, RNNs, and SSMs in a suitable fashion that allows for further analysis. In particular, a linear structured time-varying (LTV) dynamical system is defined by the recurrenceEQUATION)EQUATIONwhere h i ∈ R N is the hidden state initialized with h -1 = 0, Λ i ∈ R N ×N is the diagonal state transition matrix, B i ∈ R N ×d and C i ∈ R d×N are the input and output matrices, respectively, and D i ∈ R d×d is a scaled skip connection. Dynamical system (11) can alternatively be written in its convolutional representation, i.e., y = Φu, where the convolutional kernel Φ is defined asEQUATION)Note that the convolution kernel Φ is of the same dimension as the attention matrix ζ(qk ⊤ ) and that these matrices are equivalent, up to the scaling factor W V used in self-attention. Remark 1. This recurrent view yields a causal convolution kernel by definition. However, certain models (e.g. non-masked attention) also use non-causal kernels. This can be incorporated in the DSF (11) by modifying the state update (11a). For the sake of simplicity and consistency with the recent literature, we stick with causal models in the following.In the following, we show how popular architectures based on attention, SSMs, and RNNs can be rewritten into the DSF. To do this, all models will be reformulated into recurrence (11) , i.e., all resulting DSF representations will have hidden state dimension N . 2 Although the parametrization of models commonly found in the literature is conductive to efficient computation, here we depart from this convention. The goal of the DSF reformulation is to establish a theoretical framework that leads us to mathematical insights on the design of these models. The presented formulations are not intended to be computationally implemented in DSF form, however the framework can be used to identify computational algorithms for new architectures. For instance, the convolutional form of linear attention ( 12) is efficiently implemented via flash linear attention [17] . However, using the recurrent form derived below it can also be implemented via scan algorithms [18] , e.g., parallel scan [5, 6] or accelerated scan [19] . Given that the structural requirements on the model parameterization of the algorithm is met, the DSF allows to identify existing algorithms to apply to new models even if the algorithm was designed for another model class.In the following, we assume that we can separate the nonlinear map in (2) asEQUATIONwhereϕ(•) : R m → R n , ψ(•) : R m → R n , and η(•, •) : R m × R m×(i+1)→ R, which is the case for all the considered architectures in this paper. Note that if ζ(•) is a kernel function, the proposed separability is satisfied by construction, as it holds that ϕ = ψ and η = 1. This allows us to write the self-attention input-output relationship asEQUATIONwithEQUATIONcan be reformulated into the DSF (11) as a dynamical system of dimension N = nd, i.e., with hidden state h i ∈ R nd , and dynamic matricesEQUATIONEQUATIONEQUATION)We note that for the recurrence (11) , the matrix Λ i is given as an nd × nd matrix, where n is the number of features in ϕ and ψ, and d is the input dimension. However, due to the scalar structure of Λ i in (15a), it can be implemented as the scalar multiplication η(qi-1,ki-1) η(qi,ki) h i-1 in (11) . Hence, the hidden state is never materialized as such in the computation of the attention scores. Interested readers are referred to Appendix B for a detailed derivation.Linear Attention. In the case of linear attention, both maps ϕ(•) and ψ(•) in the DSF parametrization (15) are separable and we use the kernel proposed in [14] , i.e.,ϕ(q i ) = elu(q i ) + 1, ψ(k j ) = elu(k j ) + 1, η(q i , k i ) = (elu(q i ) + 1) i j=0(elu(k j ) + 1), (16) where elu(•) is the exponential linear unit.Generalized Linear Attention. We also study generalized linear attention, where we require that the maps ϕ(•), ψ(•) are linear, but allow for general nonlinear normalization functions η(q i , k i ), i.e.,EQUATION)Softmax Attention. Softmax attention also satisfies the assumption of separability (13) . However, it holds that the feature vector representation of the transformed Gaussian kernel in the softmax function, i.e., e q ⊤ i kj , is infinite dimensional. Hence, the DSF representation (15) of softmax attention (2) and its corresponding hidden state dimension N would also be infinite dimensional. This insight gives further motivation to approximations of the softmax function by using, e.g., a Taylor series approximation such as in [20] , to render the feature vector finite-dimensional. Lemma 1. Softmax attention (2) can be expressed by separable attention (13) withEQUATIONwhere ϕ(q i ) := c • 1, q i , 2 j=1 q i , 3 j=1 q i , . . . is an infinite-dimensional feature vector and c is a matrix of constant coefficients.Proof. The exponential in softmax attention e q ⊤ i kj can be expressed in terms of its Taylor expansion, which consists of an infinite sum of polynomial kernels of increasing degree p, decomposable through the vectors of monomials p j=1 q i . See Appendix C for a complete proof.The work in [21] analyzes softmax attention as a kernel smoother and [14] shows that a kernel-based formulation can lead to linear complexity in sequence length for finite dimensional kernels. In [22] , a kernel-based formulation of softmax is used to propose orthogonal random features to model softmax attention with linear complexity. In [20] a Taylor approximation of softmax attention is proposed, also leading to linear complexity. Finally, [23] relates transformer decoders to dynamical systems with increasing state size arising from the masked upper triangular part of the attention matrix. Compared to these works, we analyze how the proposed formulations compare in the recurrence (11) allowing us to compare to SSMs and RNNs in the following sections.SSM models are straightforward to rewrite in the DSF given their intrinsic recurrent linear representation. However, similarly to attention, we slightly rewrite the standard representation introduced in the literature to reveal deeper insights obscured by the standard representation focused on computational efficiency. The detailed derivation can be found in Appendix E.S6. The S6 parametrization can be written in the DSF (11) asEQUATIONEQUATIONEQUATIONwith ∆ i = diag(softplus(W ∆ (W u u i ) + b ∆ )) ∈ R d×d , b i = W B u i ∈ R n , c i = W C u i ∈ R n ,Λ i ∈ R nd×nd , B i ∈ R nd×d , C i ∈ R d×nd , i.e., n is the state dimension and d is the input dimension in the original formulation (4).Given their recurrent nature, one can express LSTMs (5) in the DSF with some basic algebraic manipulations (see Appendix F for details). Once again, we slightly rewrite the standard representation since our goal is to obtain mathematical insights as opposed to computational efficiency.qLSTM. In order to write the qLSTM formulation (8) in the DSF (11) , a small modification is needed. In particular, the tanh functions in the input pre-processing (8) and output gate (5b) need to be dropped. Hence, the reformulated qLSTM in the DSF (11) writes asEQUATIONEQUATIONwhere W f , W i , W o , W u ∈ R d×d are the learnt parameters in (8) . It is important to note that here the dimension of the hidden state h i is equal to the number of input channels d, whereas in attention and SSMs the dimension of the hidden state h i in the DSF (11) is nd. For qLSTMs n = 1, which will become relevant in further discussions; we refer to the fact that n > 1 as state expansion.Given the similarities of RG-LRU [10] and SSMs, it is straightforward to reformulate it into the DSF (11) without the need for modifications besides simple algebraic manipulations. Hence, the RG-LRU can be expressed in the DSF asEQUATION) where r i = diag(σ(W R u i )), and the function 1 -Λ 2 i is applied elementwise to Λ i . Similar to the qLSTM and in contrast with the other models, RG-LRU does not have state expansion, i.e. n = 1.Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?• The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors). • It should be clear whether the error bar is the standard deviation or the standard error of the mean. Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics. • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 
architecture comparison: theoretical and experimental results: 
 In this section, we use the DSF to explore some of the long-standing questions between attention, SSMs, and RNNs. We provide theoretical results and/or numerical experiments to substantiate our claims. The experiments presented below are performed on the multi-query associate recall (MQAR) [24] and long range arena (LRA) [3] benchmarks using the code bases 3 provided with the benchmarks. The complete experimental setup and computational resources used are detailed in Appendices J and K, respectively, and a statistical analysis is provided in Appendix L.Separable attention is used to avoid computation of the query-key matrix qk ⊤ . It allows to compute k ⊤ v before multiplying the queries q, which reduces the computational complexity from quadratic to linear in sequence length. While the DSF shows how separable attention, and in particular kernelized attention can be rewritten as a recurrence (11) , such a reformulation is only practical for a finite state dimension. However, in the case of softmax(•), an infinite-dimensional kernel is needed, i.e., in the DSF, softmax attention requires n = ∞. This insight can mathematically explain why the good performance observed for softmax attention can only be approximated by separable attention mechanisms, SSMs, or RNNs; but no other architecture is equivalent. The DSF predicts that softmax can be better approximated by growing n, which we show in the following theoretical result. Lemma 2. For two dynamical systems (11) with hidden state dimensions N and N with N ≤ N , the dynamical system of state dimension N can always recover the dynamical system with state dimension N .Proof. The result follows from the fact that the first N states and the output in (11) can be chosen to be independent of the additional states. The full proof is given in Appendix D. Therefore, it holds that the expressivity of a model is non-decreasing with increasing state expansion n (and state dimension N = nd), if the rest of the architecture is held constant. As the softmax attention has an infinite hidden state dimension, i.e. n = ∞ (Lemma 1), we investigate empirically how its performance compares to linear attention (16) , with increasing state dimension on the MQAR. Figure 1 shows that with larger n linear attention converges to the performance of softmax attention, which achieves perfect accuracy throughout. 13.15In the comparison of RNNs and S6 it is immediate to observe several similarities. In particular, asshown in Appendix G, the state transition matrix ⇤ i in S6 ( 18) can be rewritten when assumingEQUATIONNotice that when no state expansion is considered, i.e., n = 1 and I n = 1,i = W B u i ∈ R n , c i = W C u i ∈ R n directlycorrespond to the keys and queries in attention, i.e. k i = b i and q i = c i . Moreover, the state expansion n in S6 is the same as the hidden dimension in attention. However, while this leads to an equivalent output matrix C i in the DSF parametrization for both architectures, there are remarkable differences between the two:• Number of parameters. The transition matrix Λ i has d parameters in S6 ( 19) and only 1 in attention. In attention (15) , η(q i , k) is the only parameter in Λ i , and it is by definition a scalar. In S6, the parameters in Λ i are determined by ∆ i ∈ R d , which has d different parameters. However, it was shown in [8] that the number of parameters in Λ i can be reduced to 1 -similar to attention -without compromising performance. Note that multi-headed attention increases the number of parameters in Λ i from 1 to the number of heads s; for more details see Appendix G. • Normalization strategy vs Discretization step. In attention (15) , a normalization map η(•) is used. This map enters as a fraction in Λ i and also as a denominator in B i . Given that this map is a scalar, these two cancel out when computing the output, as one can see in the convolution representation (12) . Hence, in attention i k=j Λ k B j evaluates to 1 η(qi,ki) . Notice that this does not occur in S6 (19) , since the only shared parameter -discretization step ∆ i -does not cancel out in Λ i and B i given their different structure. This impacts the selectivity of the matrices on the input, since some input-dependent features are normalized differently in the two architectures.While the number of parameters in the state transition Λ i does play a role in increasing performance (multi-headed attention typically performs better than single-headed attention [2] ), the results in [8] suggest that this role is small. The larger influence thus lies in the recursive structure of Λ i and B i and/or the parameterization of normalization η(•). To further investigate this and the role of normalization in attention, we compare S6 and softmax attention to SSD [8] , linear attention [14] , and normalized attention on the MQAR [24] and LRA [3] benchmarks and train the three attention-based methods on WikiText-103. Inspired by S6, we define normalized attention as the attention functionEQUATIONwhere W η ∈ R 1×d is an additional learnt parameter. In Appendix H we discuss two alternatives to (22) . The MQAR results are shown in Figure 2 and the average accuracy on the LRA and the training perplexity on WikiText-103 in Table 1 . The MQAR results suggest that proper normalization, i.e., using normalization (22) , improves the performance of linear attention schemes. This is further supported by the performance of S6 and SSD on the MQAR benchmark, since these two methods also employ input-dependent normalization. Additionally, normalized attention closes part of the gap to softmax attention on the WikiText-103 dataset (Table 1 ). However on LRA, SSM models (S6) still achieve considerably higher performance than attention-based models. While normalized attention outperforms linear and softmax attention on the LRA, it performs significantly worse than S6. This result suggests that while the S6 inspired normalization helps to improve performance, the remaining performance gap is possibly explained by the recurrent normalization strategy employed by selective SSM models. Overall these results warrant further research into normalization strategies for attention-based models to explain the performance difference to SSMs. The complete experimental results on the MQAR and LRA benchmarks are detailed in Appendices L and M, respectively.Comparing RNNs and S6, it is immediate to observe several similarities. In particular, as shown in Appendix I, the state transition matrix Λ i in S6 ( 19) can be rewritten (assuming A = a • I nd ) asEQUATIONNotice that when no state expansion is considered, i.e., n = 1 and I n = 1, this expression almost coincides with the qLSTM state transition (20a), with the only difference that (I) it uses the reversed sigmoid function instead of a sigmoid for the forget gate, and (II) there is an additional learnt parameter a in the exponent. Inspired by the subtle difference in the state transition, we compare the original qLSTM state transition ( 8) and the S6-inspired state transition 23 on the MQAR benchmark. The performance of both models is shown in Figure 3 . We note that the reversed sigmoid state transition outperforms the original state transition on all three benchmark tasks, i.e., the performance of qLSTMs can be improved by insights from S6. Considering state expansion (n > 1) for RNNs, the recent xLSTM paper [12] shows that state expanded LSTMs 8) and a qLSTM variant where the original state transition Λ i is replaced by (23) . 
related work: 
 State-space models emerged from the S4 architecture by Gu et al. [25] , who developed a new theoretically principled approach to sequence modeling rooted in polynomial approximation theory [26] . The result is a transformer-like architecture [2] , where attention is replaced by a linear recurrent neural network with special reparametrization. The design of S4 got later simplified in [4, 27] , achieving state-of-the-art performance on the long-range arena (LRA) [3] with a highly efficient recurrent mechanism leveraging convolutional views [28] , or parallel scans [5, 6] .The high efficiency of SSMs (linear processing) makes them particularly appealing when compared to softmax attention-based transformers, where both inference time and memory suffer quadratically from sequence length. The S4 architecture found first successful applications in reinforcement learning [29] , vision [30] , audio [31] as well as online learning [32] . Initial attempts in language modeling [33, 34] , supported by theoretical investigations [35, 36] hint at some necessary architectural improvements to unlock the NLP domain. Leveraging in-context learning arguments, a few works [37] [38] [39] started incorporating input selectivity mechanisms [40] into SSMs. These efforts culminated in the Mamba architecture [7] , which proposed a highly efficient and light (in terms of parameters) input selectivity strategy, with drastic improvements when comparing to earlier variants (H3 [33] and Hyena [41] ) on text. This approach was also shown to be effective at byte level [42] . Beyond text, Mamba was recently applied to the vision domain [43, 44] -with outstanding results compared to ViTs [45] both in terms of performance and efficiency. Other applications include e.g. genetics [46] , and point clouds [47] . Further, improvements on architectural aspects were proposed in [8, 11, 48] .The design of Mamba is also strongly supported by theoretical evidence showing precisely its superior expressive power compared to S4 [49] . This boost in computational power is due to Mamba's novel input selectivity mechanism resembling gating, which unlocks content-dependent reasoning [7, 40] . Interestingly, input selectivity brings SSMs closer to attention: in particular, Ali et al. [50] showed that the particular parametrization of Mamba can be linked to a non-normalized softmax operator. This finding is also supported by evidence from language theory -Mamba and Attention can solve a similar class of problems [51] . Beyond Ali et al. [50] the connection between linear attention and linear RNNs has been illustrated a few times in the literature [14, 23, 52, 53] . Connections between these architectures have also been carried out using tools from communication complexity in [54, 55] .Compared to these works and to Ali et al. [50] , this paper offers a more careful comparison identifying some precise distinctions between SSMs, linear, and softmax attention -which play a nontrivial role in practice and can help bring to light interesting architectural improvements. 
conclusion: 
 In this paper we presented the DSF, a framework based on dynamical-systems theory that allows analysis of different deep learning architectures by writing them as linear recurrences in state space. We first showed how to reformulate different architectures into the DSF, and then explored (theoretical and experimental) insights resulting from this analysis, thereby answering the questions posed in the introduction. For instance, we showed that with proper normalization the performance of linear attention can be significantly increased (see Fig. 2 ). We also show, that the DSF allows to integrate insights from one architecture to another as exemplified by Section 4.2. Additionally, the DSF naturally allows analysis of the eigenvalues of the state transition matrix A, which are linked to the exploding/vanishing gradient problem [6] . In the case of SSMs and RNNs, the eigenvalues are constrained to be stable by construction, for attention-based models this is not the case and stability needs to be obtained via normalization. The eigenvalues together with the state expansion also affect a model's long-term memory [6] . Both of these aspects can be analyzed via the DSF and should be further investigated in future work. While the training dynamics (especially convergence) can be studied empirically using experiments, the DSF also allows a theoretical analysis. As discussed in Example 2 of [56] , a gradient-based optimization algorithm (e.g. SGD) can be interpreted and written as a dynamical system. Using this viewpoint together with the DSF allows interpretation of the training dynamics as two interacting dynamical systems. Therefore, the training dynamics can be theoretically analyzed using tools from control theory, e.g., via Lyapunov theory for convergence and stability of the training. However, we believe this question requires an in-depth investigation and additional empirical validation of the theoretical findings. We expect that the DSF can serve as a tool for principled analysis and design of deep learning architectures.Limitations. In terms of limitations, it is important to highlight that, while the DSF parametrization allows for a principled comparison between frameworks, architectures written in the DSF do not necessarily enjoy an efficient implementation unless their specific structure can leverage some of the existing algorithms (parallel scan, etc.). In terms of experiments, the insights mentioned above are only verified on two synthetic tasks (MQAR/LRA) and a smaller language task (WikiText-103). To strengthen the insights, a more detailed analysis is needed on larger and more complex tasks. 
broader impacts: 
 Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?Answer: [NA]Justification: The paper has not direct societal impacts. If the presented theoretical framework is used to design a new foundation model, there might be societal impacts of the model derived from this work. However, at this stage the societal impact is not assessable.Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?Answer: [NA] Justification: The paper does not release a new dataset or high risk model.Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?Answer: [Yes] Justification: The used code is properly cited in Appendix J and the licences are appropriately given in the code base accompanying this paper.Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided. • If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. • If this information is not available online, the authors are encouraged to reach out to the asset's creators. • Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper. • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review. 
 
 Appendix: Figure 4 represents the dimensions of the recurrence expressed by the linear structured time-varying (LTV) dynamical system described in (11) :h i = Λ i h i-1 + B i u i ,where h i ∈ R N is the hidden state, Λ i ∈ R N ×N is the diagonal state transition matrix, and B i ∈ R N ×d is the input matrix. We highlight the role of the state expansion, where u ∈ R d and h ∈ R N = R nd . u i < l a t e x i t s h a 1 _ b a s e 6 4 = " 0 4 h C V Q i Y k c Z D O n I j e K + Z / w 8 z M e 4 = " > A A A B 6 n i c d V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 l K a t t b 0 Y v H i v Y D 2 l A 2 2 0 2 7 d L M J u x u h h P 4 E L x 4 U 8 e o v 8 u a / c d N W U N E H A 4 / 3 Z p i Z 5 8 e c K W 3 b H 1 Z u b X 1 j c y u / X d j Z 3 d s / K B 4 e d V S U S E L b J O K R 7 P l Y U c 4 E b W u m O e 3 F k u L Q 5 7 T r T 6 8 y v 3 t P p W K R u N O z m H o h H g s W M I K 1 k W 6 T I R s W S 3 b Z c R 3 b a S B D L m p O x T W k W n U r t T p y y v Y C J V i h N S y + D 0 Y R S U I q N O F Y q b 5 j x 9 p L s d S M c D o v D B J F Y 0 y m e E z 7 h g o c U u W l i 1 P n 6 M w o I x R E 0 p T Q a K F + n 0 h x q N Q s 9 E 1 n i P V E / f Y y 8 S + v n + i g 7 q V M x I m m g i w X B Q l H O k L Z 3 2 j E J C W a z w z B R D J z K y I T L D H R J p 2 C C e H r U / Q / 6 V R M U O X G j V t q X q 7 i y M M J n M I 5 O F C D J l x D C 9 p A Y A w P 8 A T P F r c e r R f r d d m a s 1 Y z x / A D 1 t s n w a q O J Q = = < / l a t e x i t > d < l a t e x i t s h a 1 _ b a s e 6 4 = " Z K t 3 G A g / 5 z e 2 B E Y 7 G F O x A I n T e 4 k = " > A A A B 6 H i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m k o N 6 K X j y 2 Y G u h D W W z m b RF E p G o T k A 1 C i 6 x Z b g R 2 E k V 0 j g Q + B C M b m f + w x M q z R N 5 b 8 Y p + j E d S B 5 x R o 2 V m m G / X H G r 7 h x k l X g 5 q U C O R r / 8 1 Q s T l s U o D R N U 6 6 7 n p s a f U G U 4 E z g t 9 T K N K W U j O s C u p Z L G q P 3 J / N A p O b N K S K J E 2 Z K G z N X f E x M a a z 2 O A 9 s Z U z P U y 9 5 M / M / r Z i a 6 8 i d c p p l B y R a L o k w Q k 5 D Z 1 y T k C p k R Y 0 s o U 9 z e S t i Q K s q M z a Z k Q / C W X 1 4 l 7 Y u q V 6 t e N 2 u V + k 0 e R x F O 4 B T O w Y N L q M M d N K A F D B C e 4 R X e n E f n x X l 3 P h a t B S e f O Y Y / c D 5 / A M v J j P Q = < / l a t e x i t >state < l a t e x i t s h a 1 _ b a s e 6 4 = " j 7 9 7 / T s u l 6S A i F B l n Y C F c Q + L u A s = " > A A A B 8 3 i c b V B N S 8 N A E N 3 U r 1 q / q h 6 9 L B b B U 0 m k o N 6 K X j x W s B / Q h L L Z T t u l m 0 3 Y n Y g l 9 G 9 4 8 a C I V / + M N / + N 2 z Y H b X 0 w 8 H h v h p l 5 Y S K F Q d f 9 d g p r 6 x u b W 8 X t 0 s 7 u 3 v 5 B + f C o Z e J U c 2 j y W M a 6 E z I D U i h o o k A J n U Q D i 0 I J 7 X B 8 O / P b j 6 C N i N U D T h I I I j Z U Y i A 4 Q y v 5 P s I T Z g Y Z w r R X r r h V d w 6 6 S r y c V E i O R q / 8 5 f d j n k a g k E t m T N d z E w w y p l F w C d O S n x p I G B + z I X Q t V S w C E 2 T z m 6 f 0 z C p 9 O o i 1 L Y V 0 r v 6 e y F h k z C Q K b W f E c G S W v Z n 4 n 9 d N c X A V Z E I l K Y L i i 0 W D V F K M 6 S w A 2 h c a O M q J J Y x r Y W + l f M Q 0 4 2 h j K t k Q v O W X V 0 n r o u r V q t f 3 t U r 9 J o + j S E 7 I K T k n H r k k d X J H G q R J O E n I M 3 k l b 0 7 q v D j v z s e i t e D k M 8 f k D 5 z P H 9 M 4 k j g = < / l a t e x i t > expansion < l a t e x i t s h a 1 _ b a s e 6 4 = " g T l e m H B l F U n E g l 4 i C M V o i R K S W G g = " > A A A B + X i c b V D L S s N A F J 3 U V 6 2 v q E s 3 w S K 4 K o k U 1 F 3 R j c s K 9 g F t K J P p T T t 0 M g k z N 6 U l 9 E / c u F D E r X / i z r 9 x 2 m a h r Q c G D u e c y 7 1 z g k R w j a 7 7 b R U 2 N r e 2 d 4 q 7 p b 3 9 g 8 M j + / i k q e N U M W i w W M S q H V A N g k t o I E c B 7 U Q B j Q I B r W B 0 P / d b Y 1 C a x / I J p w n 4 E R 1 I H n J G 0 U g 9 2 + 4 i T D C D S U L l P D T r 2 W W 3 4 i 7 g r B M v J 2 W S o 9 6 z v 7 r 9 m K U R S G S C a t 3 x 3 A T 9 j C r k T M C s 1 E 0 1 J J S N 6 A A 6 h k o a g f a z x e U z 5 8 I o f S e M l X k S n Y X 6 e y K j k d b T K D D J i O J Q r 3 p z 8 T + v k 2 J 4 4 2 d c J i m C Z M t F Y S o c j J 1 5 D U 6 f K 2 A o p o Z Q p r i 5 1 W F D q i h D U 1 b J l O C t f n m d N K 8 q X r V y + 1 g t 1 + 7 y O o r k j J y T S + K R a 1 I j D 6 R O G o S R M X k m r + T N y q w X 6 9 3 6 W E Y L V j 5 z S v 7 A + v w B i x m U R Q = = < / l a t e x i t >+ < l a t e x i t s h a 1 _ b a s e 6 4 = " 5 g U p E u e e m I O p L 4 k d q 4 B q / 9 + 7 w 9 Q = " > A A A B 6 H i c b V D L S g N B E O y N r x h f U Y 9 e B o M g C G F X A u o t 6 M V j A u Y B y R J m J 7 3 J m N n Z Z W Z W C C F f 4 M W D I l 7 9 J G / + j Z N k D 5 p Y 0 F B U d d P d F S S C a + O 6 3 0 5 u b X 1 j c y u / X d j Z 3 d s / K B 4 e N X W c K o Y N F o t Y t Q O q U X C J D c O N w H a i k E a B w F Y w u p v 5 r S d U m s f y w Y w T 9 C M 6 k D z k j B o r 1 S 9 6 x Z J b d u c g q 8 T L S A k y 1 H r F r 2 4 / Z m m E 0 j B B t e 5 4 b m L 8 C V W G M 4 H T Q j f V m F A 2 o g P s W C p p h N q f z A + d k j O r 9 E k Y K 1 v S k L n 6 e 2 J C I 6 3 H U W A 7 I 2 q G e t m b i f 9 5 n d S E 1 / 6 E y y Q 1 K N l i U Z g K Y m I y + 5 r 0 u U J m x N g S y h S 3 t x I 2 p I o y Y 7 M p 2 B C 8 5 Z d X S f O y 7 F X K N / V K q X q b x Z G H E z i F c / D g C q p w D z V o A A O E Z 3 i F N + f R e X H e n Y 9 F a 8 7 J Z o 7 h D 5 z P H 3 V l j L s = < / l a t e x i t > B i < l a t e x i t s h a 1 _ b a s e 6 4 = " Y 1 J s z q Z 8 O m J N l l 0 q c D p p J 1 Q H U u k = " > A A A B 6 n i c d V D J S g N B E K 2 J W 4 x b 1 K O X x i B 4 G n r i S J J b i B e P E c 0 C y R B 6 O j 1 J k 5 6 F 7 h 4 h D P k E L x 4 U 8 e o X e f N v 7 C y C i j 4 o e L x X R V U 9 P x F c a Y w / r N z a + s b m V n 6 7 s L O 7 t 3 9 Q P D x q q z i V l L V o L G L Z 9 Y l i g k e s p b k W r J t I R k J f s I 4 / u Z r 7 n X s m F Y + j O z 1 N m B e S U c Q D T o k 2 0 m 1 j w A f F E r Y d 7 J a x i 7 C N a 5 W L s m O I W 8 W X F Y w c G y 9 Q g h W a g + J 7 f x j T N G S R p o I o 1 X N w o r 2 M S M 2 p Y L N C P 1 U s I X R C R q x n a E R C p r x s c e o M n R l l i I J Y m o o 0 W q j f J z I S K j U N f d M Z E j 1 W v 7 2 5 + J f X S 3 V Q 9 T I e J a l m E V 0 u C l K B d I z m f 6 M h l 4 x q M T W E U M n N r Y i O i S R U m 3 Q K J o S v T 9 H / p F 2 2 H d e u 3 b i l e m M V R x 5 O 4 B T O w Y E K 1 O E a m t A C C i N 4 g C d 4 t o T 1 a L 1 Y r 8 v W n L W a O Y Y f s N 4 + A W R C j e c = < / l a t e x i t > ⇤ i < l a t e x i t s h a 1 _ b a s e 6 4 = " F 4 m a 3 i M E E J 2 E n + 7 g t h h y g j G u I a o = " > A A A B 8 H i c d V D L S g M x F M 3 U V 6 2 v q k s 3 w S K 4 G j J 1 p O 2 u 6 M a F i w r 2 I e 1 Q M p l M G 5 p k h i Q j l N K v c O N C E b d + j j v / x v Q h q O i B w O G c c 8 m 9 J 0 w 5 0 w a h D y e 3 s r q 2 v p H f L G x t 7 + z u F f c P W j r J F K F N k v B E d U K s K W e S N g 0 z n H Z S R b E I O W 2 H o 8 u Z 3 7 6 n S r N E 3 p p x S g O B B 5 L F j G B j p b v e t Y 1 G u M / 6 x R J y P e S X k Q + R i 2 q V s 7 J n i V 9 F 5 x U E P R f N U Q J L N P r F 9 1 6 U k E x Q a Q j H W n c 9 l J p g g p V h h N N p o Z d p m m I y w g P a t V R i Q X U w m S 8 8 h S d W i W C c K P u k g X P 1 + 8 Q E C 6 3 H I r R J g c 1 Q / / Z m 4 l 9 e N z N x N Z g w m W a G S r L 4 K M 4 4 N A m c X Q 8 j p i g x f G w J J o r Z X S E Z Y o W J s R 0 V b A l f l 8 L / St I q + O I Y Q g 0 = " > A A A B 6 n i c d V D L S g N B E O z 1 G e M r 6 t H L Y B A 8 L b N x J c k t 6 M V j R P O A Z A m z k 0 k y Z H Z 2 m Z k V w p J P 8 O J B E a 9 + k T f / x s l D U N G C h q K q m + 6 u M B F c G 4 w / n J X V t f W N z d x W f n t n d 2 + / c H D Y 1 H G q K G v Q W M S q H R L N B J e s Y b g R r J 0 o R q J Q s F Y 4 v pD T f T T V L C B 2 T I e t Y K k n E d J D N T 5 2 i U 6 v 0 0 S B W t q R B c / X 7 R E Y i r S d R a D s j Y k b 6 t z c T / / I 6 q R l U g o z L J D V M 0 s W i Q S q Q i d H s b 9 T n i l E j J p Y Q q r i 9 F d E R U Y Q a m 0 7 e h v D 1 K f q f N E u u 5 7 v V G 7 9 Y u 1 z G k Y N j O I E z 8 K A M N b i G O j S AF E p G o T k A 1 C i 6 x Z b g R 2 E k V 0 j g Q + B C M b m f + w x M q z R N 5 b 8 Y p + j E d S B 5 x R o 2 V m m G / X H G r 7 h x k l X g 5 q U C O R r / 8 1 Q s T l s U o D R N U 6 6 7 n p s a f U G U 4 E z g t 9 T K N K W U j O s C u p Z L G q P 3 J / N A p O b N K S K J E 2 Z K G z N X f E x M a a z 2 O A 9 s Z U z P U y 9 5 M / M / r Z i a 6 8 i d c p p l B y R a L o k w Q k 5 D Z 1 y T k C p k R Y 0 s o U 9 z e S t i Q K s q M z a Z k Q / C W X 1 4 l 7 Y u q V 6 t e N 2 u V + k 0 e R x F O 4 B T O w Y N L q M M d N K A F D B C e 4 R X e n E f n x X l 3 P h a t B S e f O Y Y / c D 5 / A M v J j P Q = < / l a t e x i t > n < l a t e x i t s h a 1 _ b a s e 6 4 = " E w l Y 8 l B b F j n T U Z Z C P z K n s l b s y V 4 = " > A A A B 6 H i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m k o N 6 K X j y 2 Y G u h D W W z n b R r N 5 u w u x F K 6 C / w 4 k E RF Y h G r T k A 1 C i 6 x Z b g R 2 E k U 0 i g Q + B C M b 2 f + w x M q z W N 5 b y Y J + h E d S h 5 y R o 2 V m r J f r r h V d w 6 y S r y c V C B H o 1 / + 6 g 1 i l k Y o D R N U 6 6 7 n J s b P q D K c C Z y W e q n G h L I x H W L X U k k j 1 H 4 2 P 3 R K z q w y I G G s b E l D 5 u r v i Y x G W k + i w H Z G 1 I z 0 s j c T / / O 6 q Q m v / I z L J D U o 2 W J R m A p i Y j L 7 m g y 4 Q m b E x B L K F L e 3 E j a i i j J j s y n Z E L z l l 1 d J + 6 L q 1 a r X z V q l f p P H U Y Q T O I V z 8 O A S 6 n A H D W g B A 4 RF Y h G r T k A 1 C i 6 x Z b g R 2 E k U 0 i g Q + B C M b 2 f + w x M q z W N 5 b y Y J + h E d S h 5 y R o 2 V m r J f r r h V d w 6 y S r y c V C B H o 1 / + 6 g 1 i l k Y o D R N U 6 6 7 n J s b P q D K c C Z y W e q n G h L I x H W L X U k k j 1 H 4 2 P 3 R K z q w y I G G s b E l D 5 u r v i Y x G W k + i w H Z G 1 I z 0 s j c T / / O 6 q Q m v / I z L J D U o 2 W J R m A p i Y j L 7 m g y 4 Q m b E x B L K F L e 3 E j a i i j J j s y n Z E L z l l 1 d J + 6 L q 1 a r X z V q l f p P H U Y Q T O I V z 8 O A S 6 n A H D W g B A 4 RF Y h G r T k A 1 C i 6 x Z b g R 2 E k U 0 i g Q + B C M b 2 f + w x M q z W N 5 b y Y J + h E d S h 5 y R o 2 V m r J f r r h V d w 6 y S r y c V C B H o 1 / + 6 g 1 i l k Y o D R N U 6 6 7 n J s b P q D K c C Z y W e q n G h L I x H W L X U k k j 1 H 4 2 P 3 R K z q w y I G G s b E l D 5 u r v i Y x G W k + i w H Z G 1 I z 0 s j c T / / O 6 q Q m v / I z L J D U o 2 W J R m A p i Y j L 7 m g y 4 Q m b E x B L K F L e 3 E j a i i j J j s y n Z E L z l l 1 d J + 6 L q 1 a r X z V q l f p P H U Y Q T O I V z 8 O A S 6 n A H D W g B A 4R n e I U 3 5 9 F 5 c d 6 d j 0 V r w c l n j u E P n M 8 f 2 v G M / g = = < / l a t e x i t > N < l a t e x i t s h a 1 _ b a s e 6 4 = " T u I 4 H 4 u S J Q t 4 1 q P 5 C q w s v E 8 I C w w = " > A A A B 6 H i c b V D L S g N B E O y N r x h f U Y 9 e B o P g K e x K Q L 0 F v X i S B M w D k i X M T n q T M b O z y 8 y s E E K + w I s H R b z 6 S d 7 8 G y f J H j S x o K G o 6 q a 7 K 0 g E 1 8 Z 1 v 5 3 c 2 v r G 5 l Z + u 7 C z u 7 d / U D w 8 a u o 4 V Q w b L B a x a g d U o + A S G 4 Y b g e 1 E I Y 0 C g a 1 g d D v z W 0 + o N I / l g x k n 6 E d 0 I H n I G T V W q t / 3 i i W 3 7 M 5 B V o m X k R J k q P W K X 9 1 + z N I I p W G C a t 3 x 3 M T 4 E 6 o M Z w K n h W 6 q M a F s R A f Y s V T S C L U / m R 8 6 J W d W 6 Z M w V r a k I X P 1 9 8 S E R l q P o 8 B 2 R t Q M 9 b I 3 E / / z O q k J r / w J l 0 l q U L L F o j A V x M R k 9 j X p c 4 X M i L E l l C l u b y V s S B V l x m Z T s C F 4 y y + v k u Z F 2 a u U r + u V U v U m i y M P J 3 A K 5 + D B J V T h D m r Q A A Y I z / A K b 8 6 j 8 + K 8 O x + L 1 p y T z R z D H z i f P 6 p x j N 4 = < / l a t e x i t > N < l a t e x i t s h a 1 _ b a s e 6 4 = " T u I 4 H 4 u S J Q t 4 1 q P 5 C q w s v E 8 I C w w = " > A A A B 6 H i c b V D L S g N B E O y N r x h f U Y 9 e B o P g K e x K Q L 0 F v X i S B M w D k i X M T n q T M b O z y 8 y s E E K + w I s H R b z 6 S d 7 8 G y f J H j S x o K G o 6 q a 7 K 0 g E 1 8 Z 1 v 5 3 c 2 v r G 5 l Z + u 7 C z u 7 d / U D w 8 a u o 4 V Q w b L B a x a g d U o + A S G 4 Y b g e 1 E I Y 0 C g a 1 g d D v z W 0 + o N I / l g x k n 6 E d 0 I H n I G T V W q t / 3 i i W 3 7 M 5 B V o m X k R J k q P W K X 9 1 + z N I I p W G C a t 3 x 3 M T 4 E 6 o M Z w K n h W 6 q M a F s R A f Y s V T S C L U / m R 8 6 J W d W 6 Z M w V r a k I X P 1 9 8 S E R l q P o 8 B 2 R t Q M 9 b I 3 E / / z O q k J r / w J l 0 l q U L L F o j A V x M R k 9 j X p c 4 X M i L E l l C l u b y V s S B V l x m Z T s C F 4 y y + v k u Z F 2 a u U r + u V U v U m i y M P J 3 A K 5 + D B J V T h D m r Q A A Y I z / A K b 8 6 j 8 + K 8 O x + L 1 p y T z R z D H z i f P 6 p x j N 4 = < / l a t e x i t >We consider the layery i = i j=0 f (q i , k j , k i )W V u j ,where we define the sequence of keys as k i = {k 0 , . . . , k i }. We show that this layer can be equivalently written as the LTV system (11) , i.e.,y i = i j=0 C i   i k=j+1 Λ k   B j u j , with Λ i ∈ R nd×nd , B i ∈ R nd×d and C i ∈ R d×nd , if the function f (•, •) is separable as follows f (q i , k i ) = ϕ(q i ) ⊤ ψ(k j ) η(q i , k i ) ,where ϕ(q i ) ∈ R n , ψ(k j ) ∈ R n , and η(q i , k i ) ∈ R can be considered to be a normalization function.If the unnormalized part of f (•, •) is a kernel function, it holds that ψ(k j ) = ϕ(k j ) for some, possibly infinite dimensional, feature vector ϕ.We can compare the output formulationsy 0 = C 0 B 0 u 0 and y 0 = f (q 0 , k 0 , k 0 )W V u 0 = ϕ(q 0 ) ⊤ 1 η(q 0 , k 0 ) ψ(k 0 )W V u 0 , resulting in B 0 = 1 η(q 0 , k 0 ) I d ⊗ ψ(k 0 ) W V ∈ R nd×d , C 0 = I d ⊗ ϕ(q 0 ) ⊤ ∈ R d×ndSimlarly, we havey 1 = C 1 B 1 u 1 + C 1 Λ 1 B 0 u 0 y 1 = f (q 1 , k 1 , k 1 )W V u 1 + f (q 1 , k 0 , k 1 )W V u 0 = ϕ(q 1 ) ⊤ 1 η(q 1 , k 1 ) ψ(k 1 )W V u 1 + ϕ(q 1 ) ⊤ 1 η(q 1 , k 1 ) ψ(k 0 )W V u 0 ⇒ B 1 = 1 η(q 1 , k 1 ) I d ⊗ ψ(k 1 ) W V , C 1 = I d ⊗ ϕ(q 1 ) ⊤ and Λ 1 = η(q 0 , k 0 ) η(q 1 , k 1 ) I ndandy 2 = C 2 B 2 u 2 + C 2 Λ 2 B 1 u 1 + C 2 Λ 2 Λ 1 B 0 u 0 y 2 = f (q 2 , k 2 , k 2 )W V u 2 + f (q 2 , k 1 , k 2 )W V u 1 + f (q 2 , k 0 , k 2 )W V u 0 y 2 = ϕ(q 2 ) ⊤ 1 η(q 2 , k 2 ) ψ(k 2 )W V u 2 +ϕ(q 2 ) ⊤ 1 η(q 2 , k 2 ) ψ(k 1 )W V u 1 +ϕ(q 2 ) ⊤ 1 η(q 2 , k 2 ) ψ(k 0 )W V u 0 ⇒B 2 = 1 η(q 2 , k 2 ) I d ⊗ ψ(k 2 ) W V , C 2 = I d ⊗ ϕ(q 2 ) ⊤ and Λ 2 = η(q 1 , k 1 ) η(q 2 , k 2 ) I nd .Plugging this back in, we observey 2 = C 2 B 2 u 2 + C 2 Λ 2 B 1 u 1 + C 2 Λ 2 Λ 1 B 0 u 0 = I d ⊗ ϕ(q 2 ) ⊤ 1 η(q 2 , k 2 ) I d ⊗ ψ(k 2 ) W V u 2 + I d ⊗ ϕ(q 2 ) ⊤ η(q 1 , k 1 ) η(q 2 , k 2 ) I nd 1 η(q 1 , k 1 ) I d ⊗ ψ(k 1 ) W V u 1 + I d ⊗ ϕ(q 2 ) ⊤ η(q 1 , k 1 ) η(q 2 , k 2 ) I nd η(q 0 , k 0 ) η(q 1 , k 1 ) I nd 1 η(q 0 , k 0 ) I d ⊗ ψ(k 0 ) W V u 0 = ϕ(q 2 ) ⊤ 1 η(q 2 , k 2 ) ψ(k 2 )W V u 2 +ϕ(q 2 ) ⊤ 1 η(q 2 , k 2 ) ψ(k 1 )W V u 1 +ϕ(q 2 ) ⊤ 1 η(q 2 , k 2 ) ψ(k 0 )W V u 0 = f (q 2 , k 2 , k 2 )W V u 2 + f (q 2 , k 1 , k 2 )W V u 1 + f (q 2 , k 0 , k 2 )W V u 0This generalizes the dynamical system matrices toB i = 1 η(q i , k i ) I d ⊗ ψ(k i ) W V , C i = I d ⊗ ϕ(q i ) ⊤ , Λ i = η(q i-1 , k i-1 ) η(q i , k i ) I nd .The softmax function R n×m → (0, 1] n×m is defined through row-wise normalization and is given by The attention block is given assoftmax(z) :=         e z 0,0 m-1 j=0 e z 0,j . . .y i = i j=0 ζ i,j (q ⊤ k)v j = i j=0 softmax i,j (uW Q W ⊤ K u ⊤ )W V u j ,where softmax i,j (•) refers to the element (i, j) of the corresponding matrix. Note that e q ⊤ i kj is a kernel, implying that softmax attention can be brought into the separable form (13) . In order to provide the separable form of e q ⊤ i kj , we first consider the Taylor expansion of the kernel, which is given bye q ⊤ i kj = ∞ p=0 (q ⊤ i k j ) p p! .Each polynomial (q ⊤ i k j ) p represents itself a homogeneous polynomial kernel and its decomposition into a feature vector of n + p -1 p monomials, as shown in [57] , is given byEQUATION)The feature representation of the exponential kernel is thereforeEQUATION:= ϕ(q i ) ⊤ ϕ(k j ).Note that to attain the monomials in ( 24) for a given p, one can also use p j=1x, as given in, e.g., [58] , which is equivalent up to the constant coefficients, such that we can use1 p! φp (x) = c p p j=1 x,where c p is a matrix of the respective coefficients multiplying each monomial.Given two dynamical systems of the form (11) , we denote the system of hidden state dimension N with the state h N i and the matrices Λ N i , B N i , C N i and D N i and correspondingly, the system of hidden state dimension N using the state h N i and the matrices Λ N i , B N i , C N i and D N i . We show that the system of dimension N ≥ N can recover the system of dimension N by selecting the following system matrices:Λ N i = Λ N i 0 Λ Λ , B N i = B N i B , C N i = C N i 0 , D N i = D N i .It can be seen that the N first states of the system with dimension N propagate equivalently to the states of the system of dimension N . The additional states evolve independently given any matrices Λ, Λ, B of appropriate dimension and do not affect the output, such that both systems are equivalent. The two outputs are then equivalent by setting the corresponding entries of the C N i matrix to 0.While A in ( 4) is represented as a dense matrix of size n × d purely for computational reasons, mathematically A is a diagonal matrix of size nd × nd. This is evident from the fact that S6 parameterizes a different submatrix A d ∈ R n×n for each embedding dimension d, leading toA =    A 1 . . . A d    .To compute Λ i in (11) , the matrix A is multiplied with the selective discretization time ∆ i ∈ R d×d , which is computed asEQUATIONwhere W u ∈ R p×d , W ∆ ∈ R d×p are weight matrices with p < d, and b ∆ ∈ R d is a bias. Note that we embed the computed discretization times in a diagonal d × d matrix to simplify the next reformulations. The product of ∆ i and A is performed along the embedding dimension axis, i.e.,   EQUATION)To arrive at the DSF formulation (19) , it only remains to take the exponential function of ( 27) and state B i , C i as in ( 4) with the appropriate dimensions.In order to replace the abundant elementwise operations ⊙ in LSTMs with more suitable matrix-vector multiplications for SSMs, we rely on the following observation fora i ∈ R d , u i ∈ R d : σ(a i ) ⊙ u i =    σ(a 1 i )u 1 i . . . σ(a d i )u d i    =    σ(a 1 i ) . . . σ(a d i )       u 1 i . . . u d i    = diag(σ(a i ))u i .As with S6 in Appendix E, we reformulate some quantities for easier presentation, namely we embed the input-dependent vectorsσ(W R u i ) ∈ R d , σ(W B u i ) ∈ R d, where σ(•) denotes the sigmoid function, in a diagonal matrix, i.e.,r i = diag(σ(W R u i )) =    r 1 i . . . r d i    , b i = diag(σ(W B u i )) =    b 1 i . . . b d i    .The DSF representation ( 21) is then obtained in a straightforward manner.We start by using the same reformulation of the gates as in RG-LRU above:f i = diag(σ(W f u i )), i i = diag(σ(W i u i )), o i = diag(σ(W o u i )),where f i is commonly called the forget gate, i i and o i are called the input and output gates, respectively, and W f , W i , W o ∈ R d×d . By removing the tanh activation function, we effectively eliminated the input activation gate, which now serves as a standard input to the recurrence (11) , i.e., we reformulated the standard qLSTM (8) to the LTVx i = f i x t-1 + (i i ⊙ W u )u i y i = o i h i .As in Appendix B, we assume a separable attention function, i.e.,f (q i , k j , k i ) = ϕ(q i ) ⊤ ψ(k j ) η(q i , k i ) .Additionally, we consider the multi-headed setting introduced in [2, Section 3.2.2], i.e., s different attention operations are performed in parallel. Due to the right multiplication of the input (instead of left multiplication as in the original paper), the output of the different heads is stacked row-wise instead of column-wise. Additionally, we assume there is no output mapping after the attention operation. This yields the simplified multi-headed layery i = i j=0     [ ϕ(qi) ⊤ ψ(kj ) η(qi,ki) v j ] 1 . . . [ ϕ(qi) ⊤ ψ(kj ) η(qi,ki) v j ] s     = i j=0     [ ϕ(qi) ⊤ ψ(kj ) η(qi,ki) ] 1 . . . [ ϕ(qi) ⊤ ψ(kj ) η(qi,ki) ] s        [v j ] 1 . . . [v j ] s    = i j=0    [ϕ(q i ) ⊤ ] 1 . . . [ϕ(q i ) ⊤ ] s       [ 1 η(qi,ki) ] 1 • I n/s . . . [ 1 η(qi,ki) ] s • I n/s    •    [ψ(k j )] 1 . . . [ψ(k j )] s       [v j ] 1 . . . [v j ] s    ,where • s denotes the head index. As is standard for multi-headed attention, we reduce the dimensions of the queries, keys, and values by the number of heads, i.e., q i ∈ R m/s , k j ∈ R m/s , and v j ∈ R d/s . Since the s different values [v j ] s are stacked, this is equivalent to the single headed version, i.e.,   [v j ] 1 . . . [v j ] s    = v j = W V u j .Above observation is also valid for the queries and keys, i.e., we can e.g. write [ϕ(q i )] s using an indicator function I s (•) on the single headed query q i , i.e.,[ϕ(q i )] s = ϕ(I s (q i )) = ϕ(I s (W Q u i )).This shows the intuition behind multi-headed attention, which essentially compares parts of the single-headed queries and keys in parallel. Therefore, we can use Appendix B to write multi-headed separable attention in the DSF asEQUATIONEQUATIONEQUATIONMultiple heads therefore extend the single scalar in Λ i (in the single-headed case) to s different scalars, however these only act upon a part of the queries q i and keys k j due to the indicator function.For all experiments in Section 4.2, we use the normalization scheme in (22) . The exponential normalization function η(u i ) is inspired by softmax attention and S6, which both use exponential functions for normalization (see (18) and ( 19)). However, other normalization functions can also be considered e.g.EQUATIONEQUATIONwhere σ(•) denotes the sigmoid function. Table 2 shows an experimental comparison of the exponential normalization function (22) and the two alternatives ( 29), (30) on the LRA Image and MQAR (L = 512, KV-pairs = 64) tasks. All three normalization schemes perform similarly on both tasks, however the exponential normalization ( 22) yields the best performance, which is the reason we choose it for normalized attention throughout the paper. I S6 uses reversed sigmoid in state transition matrixIn the following, we show that the state transition matrix Λ i in S6 is essentially a reversed sigmoid of the projected input. To show this, we assume for simplicity that A in Λ i = e -(∆i⊗In)⊙A is a scalar, i.e., A = a • I nd . This assumption simplifies Λ i toEQUATIONwhere each e -a∆ j i •In itself is a diagonal matrix with n-times e -a∆ j i on its diagonal. In order to analyze this expression, we simplify the computation of ∆ i by fusing the two projection matrices with out loss of generality, i.e.,∆ i = diag(softplus(W ∆ (W u u i ) + b ∆ )) = diag(softplus( W∆ u i )) =    softplus( W 1,: ∆ u i ) . . . softplus( W d,: ∆ u i )    ,where W j,: ∆ denotes the j th row of W∆ . Above reformulation is valid since the softplus(•) function is applied elementwise and we note that ∆ j i = softplus( W j,: ∆ u i ) in (31) . Using the definition of the softplus(•) function, we can show that e -a∆ 1 i = e -a softplus( W j,:EQUATIONwhere σ rev (•) is the reversed sigmoid, i.e., σ rev (x) = 1 1+e x . Since the reversed sigmoid is again applied elementwise to a vector or a matrix, we can write the S6 state transition matrix asΛ i = diag(σ rev ( W∆ u i ) a ) ⊗ I n ,where the power a is applied elementwise. The assumption A = a • I nd we made in the beginning, can be relaxed to any diagonal matrix, however the resulting Λ i will have a more complex representation.The experimental results provided in Section 4 are performed on the multi-query associative recall (MQAR) benchmark [24] , the long range arena (LRA) benchmark [3] , and the WikiText-103 dataset. To obtain the MQAR and LRA results, we modified the Zoology5 and LRA6 code bases and added the normalized attention model and the selective SSM models, respectively. The code for both benchmarks is provided on GitHub for MQAR 7 and for LRA8 separately.Training Details We evaluate the following three architecture classes:1. Attention: softmax attention [2] , linear attention [14] , normalized attention (22) . For all three attention functions, we use a standard GPT-2 style multi-headed Transformer architecture, where we replace the attention block with the respective attention function.The three attention functions are defined in Section 2.1. For all MQAR runs we use a single attention head. 2. State space model: S6 [7] , SSD [8] . For both SSM variants, we use a standard GPT-2 style single-headed Transformer architecture, where we replace the attention block with the respective SSM variant. This means for S6 and SSD, we do not implement the preconvolution on the input or the SiLU activations; but just the S6 and SSD blocks. We do this to ensure a fair comparison of the backbones (sequence mixers) irrespective of the higher-level architecture. The S6 and SSD blocks are defined in Section 2.2 and we use the provided code base9 to implement it. 3. RNN: qLSTM [9] , modified qLSTM. We embed both qLSTM variants in a standard GPT-2 style single-headed Transformer architecture, where we replace the attention block with the qLSTM. We do this to ensure a fair comparison of the backbones (sequence mixers) irrespective of the higher-level architecture. The standard qLSTM is defined in Section 2.3 and the modified qLSTM is the same as the standard qLSTM but with modified state transition (23) , i.e., a modified forget gate.For all MQAR runs, we use the following training protocol:• Optimizer and schedule: Weight decay of 0.1, linear warmup with duration of 10%, AdamW optimizer [59] .For each run, we sweep the learning rates in np.logspace(-4, -2, 4) and train for 64 epochs. This is the same setup as in [24] . ). This is the same setup as in [24] . • Position information: Positional embeddings [60] are used for the attention and RNN architecture classes, but not for the SSM architecture classes. This is the same setup as in [24] . • Data: Each model is trained on 100,000 datapoints and evaluated on 3,000 datapoints. The data and its order are constant for all runs. This is the same setup as in [24] .Performed Experiments We run the three attention models and the two state space models on four different MQAR tasks, i. Training Details We evaluate the following two architecture classes:1. Attention: softmax attention [2] , linear attention [14] , normalized attention (22) . For all three attention functions, we use a standard GPT-2 style multi-headed Transformer architecture, where we replace the attention block with the respective attention function. The three attention functions are defined in Section 2.1. To ensure a fair comparison, we keep all hyperparameters of the three attention models constant except the attention function.2. State space model: S6 [7] . We use a standard GPT-2 style single-headed Transformer architecture, where we replace the attention block with the S6 block. This means, we do not implement the pre-convolution on the input or the SiLU activations; but just the S6 block.We do this to ensure a fair comparison of the backbones (sequence mixers) irrespective of the higher-level architecture. The S6 block is defined in Section 2.2 and we use the provided code base 11 to implement it.For all LRA runs, we use the following training protocol:• Optimizer and schedule: Linear warmup with duration of 10% and AdamW optimizer [59] .• Position information: Positional embeddings [60] are used for the attention architecture classes, but not for the SSM architecture classes.• Data: Each model is trained on the standard datasets provided with the LRA benchmark.The exact hyperparameters for each LRA task and each model are reported in the publicly available code base. 12 Note that we do not optimize the hyperparameters, i.e., the reported accuracies might be lower than in the original LRA paper [3] .Performed Experiments We run the three attention models and the S6 models on the LRA tasks ListOps, Text, Retrieval, Image, and Pathfinder-32, which are summarized below; for the full details we refer to [3] .1. List Operations (ListOps): This task evaluates a model's ability to capture hierarchical dependencies over long contexts. The goal is to predict the result of a mathematical operation consisting of nested mean, median, max, and min operations, 13 The task is a ten-way classification task with maximal input lengths of 2k.In Table 3 we report the complete results of all LRA experiments detailed in Appendix J. The average performance over all tasks is reported in Justification: Our theoretical analysis and experimental results substantiate the claims made in the abstract and introduction.Guidelines:• The answer NA means that the abstract and introduction do not include the claims made in the paper. • The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers. • The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings. • It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.The dimensions used in the following are visualized in Appendix A for clarity.https://github.com/HazyResearch/zoology; https://github.com/google-research/long-range-arenaThe presented state expanded LSTM versions, cannot be directly translated into the DSF framework, since the gates not only depend on the inputs ui but also on past outputs yi 1. However, the used state expansion is essentially n = d, hence leading to a DSF system of size d 2 .The presented state expanded LSTM versions, cannot be directly translated into the DSF framework, since the gates not only depend on the inputs ui but also on past outputs yi-1. However, the used state expansion is essentially n = d, hence leading to a DSF system of size d 2 .https://github.com/HazyResearch/zoologyhttps://github.com/google-research/long-range-arenahttps://github.com/IntelligentControlSystems/dsf-mqarhttps://github.com/jsie7/ssm-benchmarkhttps://github.com/state-spaces/mambaWe did not increase n further, since the selective scan CUDA kernel provided for S6 and SSD is capped at n = 256; for more information see https://github.com/state-spaces/mamba.https://github.com/state-spaces/mambahttps://github.com/jsie7/ssm-benchmarkFor instance, input: max(4, min(5,6, mean(9, 4, 5))), output: 5.https://github.com/EleutherAI/pythiaObviously, larger model sizes and MQAR tasks with larger sequence length took longer than smaller models and tasks with shorter sequence length. However, a more accurate time estimate is hard to obtain due to the cluster setup with multiple different GPU models and the fact that we terminated tasks early if the 99% accuracy threshold was achieved. 


Decision: The authors introduce the Dynamical Systems Framework (DSF), a unified theoretical approach for comparing attention-based models, State Space Models (SSMs), and Recurrent Neural Networks (RNNs) as linear time-varying dynamical systems. This framework offers insights into the similarities and differences among these architectures, particularly in hidden state dimensions and state expansion, and demonstrates its effectiveness with empirical validations on the MQAR benchmark and WikiText-103 dataset. While the paper is strong in its contributions, it could benefit from improved presentation and clarity, and further emphasis on its theoretical novelty, as some may find the analysis results predictable. Nonetheless, the paper’s contributions are significant, and I recommend its acceptance.

Reviews: review: paper_summary: paper_summary: This paper introduces the Dynamical Systems Framework (DSF), a theoretical approach for analyzing and comparing various foundation models in AI. The DSF reformulates attention-based models, State Space Models (SSMs), and Recurrent Neural Networks (RNNs) into a common dynamical systems representation. This allows for principled comparisons and generates new insights into their similarities and differences. The authors leverage the DSF to compare linear attention and selective SSMs, provide conditions for approximating softmax attention, analyze state expansion in RNNs and SSMs, investigate differences between linear attention and S6 (Mamba) models, and apply SSM insights to RNN architectures. The paper combines theoretical results with empirical validations on the MQAR benchmark and WikiText-103 dataset.
strength_weakness: strength_weakness: - Limited empirical evaluation, focusing primarily on MQAR and a single language modeling task
- Lack of statistical significance reporting for experimental results
- Some theoretical results (e.g., Lemma 2) are relatively straightforward
- Dense theoretical sections may be challenging for broader audience
- Immediate practical impact on model performance is somewhat limited
- Doesn't fully explore implications for training or inference efficiency
questions: questions: 1. How well might the DSF insights scale to much larger models (billions of parameters) used in state-of-the-art applications?
2. Are there theoretical limits to the convergence of linear attention to softmax attention performance with increased state expansion?
3. Have you explored alternative normalization schemes that might bridge the gap between S6 and linear attention while maintaining computational efficiency?
4. How does the S6-inspired state transition in qLSTM affect its long-term memory capabilities?
5. Can the theoretical insights from DSF reformulations be leveraged to develop new, efficient implementations?
limitations: limitations: The authors acknowledge that the DSF parametrization, while theoretically insightful, doesn't necessarily lead to efficient implementations. Empirical validation is limited to synthetic tasks and a relatively small language modeling task, constraining generalizability. The paper also lacks comprehensive analysis of computational efficiency implications for different architectures under the DSF lens.
paper_summary: paper_summary: This paper provides a dynamical system based framework for principled comparisons between various existing recurrent architectures (linear attention, SSMs, etc.). There are focuses on the formulation and the role of the hidden state dimension. Some experimental results on the multi-query associative recall (MQAR) benchmark and the WikiText-103 dataset are provided to demonstrate the differences between the considered models.
strength_weakness: strength_weakness: - The two proposed experiments (the MQAR benchmark and the WikiText-103 dataset) seem random and limited. There are no experiments on the more standard benchmark tasks such as the LRA task (focusing on smaller tasks such as the sequential CIFAR task would be valuable) and time series forecasting tasks 
- The theoretical insights are actually quite limited. There are unaddressed natural questions such as:

     (1) one might wonder about finite-dimensional approximation of the softmax attention, 

     (2) how Lemma 1 could be related to the kernel method and RKHS 

- There are also other aspects that are left out for the comparative studies: e.g., how do the training dynamics differ between the various models (which architecture will converge faster), as well as the stability of the models (how prone are they to the infamous vanishing/exploding gradient problem). Also, can we quantify and compare the long range dependency learning capability of these models? 
- No practical guidance in terms of which architecture is suitable for what kind of task is provided. After all, this should be the main goal of the comparisons
questions: questions: See above
limitations: limitations: Yes
paper_summary: paper_summary: This paper shows that many sequence models (including attention, SSMs, and recurrent models) can be viewed as linear time-varying dynamical systems. This is helpful for answering some questions about the differences and similarities between these architectures.
strength_weakness: strength_weakness: **Presentation and clarity.** The introduction and abstract do not provide any details on how the Dynamical Systems Framework works and assumes a reader is familiar with dynamical systems. To improve the presentation and accessibility, I would recommend including a high-level discussion of what the DSF is and what challenges it addresses. 

**Theoretical Novelty.** In the first paragraph of the introduction the authors state, “Although these models show great promise in boosting efficiency, current comparisons with attention are merely empirical.” This isn’t correct: there have been many theoretical studies comparing these new recurrent architectures with Softmax attention. To name a few:

- [Arora *et al.](https://arxiv.org/abs/2402.18668)* include a theoretical analysis grounded in results from communication complexity that highlights differences in models ability to perform associative recall.
- Using tools from circuit complexity, [Merill *et al.*](https://arxiv.org/pdf/2404.08819) show that Attention and SSMs are in the same complexity class ($\text{TC}^0$).
- Using tools from communication complexity, [Bhattamishra *et al.*](https://arxiv.org/pdf/2406.09347)  provide separation results between attention and recurrent architectures on numerous tasks.

**Empirical Novelty.** The main empirical result in this paper is that increased state size (across architectures) leads to improved performance on MQAR and that separable attention matches Softmax attention with sufficiently large recurrent size. This result has already been shown theoretically and empirically in [Arora *et al.*](https://arxiv.org/pdf/2402.18668) (ICML ‘24) - see Figure 2, Theorem 3.1, and Section 3. The work under review builds upon Arora *et al.* by including a few additional architectures to the analysis. But this prior work should be mentioned in the related work and/or the introduction given the significant overlap in results . 

**Claims around Lemma 2.** Some of the language around Lemma 2 is a bit incautious. The authors state that because of Lemma 2, “the larger the state expansion n, the more expressivity the architecture has”. In other words, they are claiming that increasing state expansion strictly increases expressivity. To support this claim, the theorem would need to additionally show that a dynamical system of state dimension $N$ ***cannot*** recover all dynamical systems with state dimension $\hat{N}$.  Additionally, I think its important to add the qualification that this holds assuming everything else about the architecture is held constant. It’s of course possible for an architecture with smaller state size to admit solutions that a larger state size model cannot represent if the parameterizations are different. 

**Minor typos and clarifications.**

- Line 32: “framework that allows to evaluate” → “allows us to evaluate”
- Line 61: “We use $\sigma(\cdot)$ to denote is the sigmoid function.
- In the list of questions answered by the paper (Line 40), I would include hyperlinks to the relevant sections.
questions: questions: It would help to add additional exposition on the results in Fig. 2. What are the takeaways? It looks like exponentiating improves performance, but this isn’t stated explicitly.
limitations: limitations: Yes the authors discuss limitations.
paper_summary: paper_summary: The paper concerns using the proposed "Dynamical Systems Framework" (DSF) to better understand the differences between linear SSMs, RNNs, linear attention and Softmax attention. The DSF shows a way to write each of these models as a linear time-varying recurrence. The paper aims to use this to answer questions about the differences between the three types of models, the role of state expansion, and how ideas from SSMs can be used to improve RNNs. Empirical experiments on the multi-query associative recall (MQAR) task and Wikitext are used to support the findings.
strength_weakness: strength_weakness: - The proposed DSF is nice in that it allows comparing each of the different types of models, but it's originality is weakened by the fact that most of the main parts of the framework have been discussed before in prior work
  - The connections between linear attention and linear RNNs/SSMs are clear and have been discussed in prior works as mentioned in related work. 
  - In addition, the infinite dimensional representation of softmax attention as discussed in Section 3.2.1 is also discussed in Katharopoulos et al. 2020 among others
  - Softmax attention has also been formulated as a dynamical system in https://arxiv.org/abs/2401.06104 which should be cited
- The findings that are suggested as a result of the framework also do not seem to be new or particularly surprising
  - The fact that larger state sizes lead to increased expressivity is not surprising and has been explored before, e.g. in https://arxiv.org/abs/2312.04927, https://arxiv.org/abs/2312.00752
  - The proposed improvement to RNNs is to change the parameterization of a linear RNN (the quasi LSTM) by replacing its transition parameterization with that of S6. But this seems to just make it more like the already existing linear RNN, RG-LRU (with a slight different in parameterization from S6). This seems to be a much weaker finding than the claimed "What do selective SSMs teach us about improving RNN architectures" from line 53 of the Intro.
   - As a counter to this point I am making, the proposed improvement to the normalization of linear attention appears to be novel and appears to improve performance on the tasks considered.
- The focus and claims around expressivity and performance in the paper appear to be very language focused. 
  - This is obviously of interest, but perhaps narrows the ability for the DSF to provide new and interesting insights as I mention in the point above.
  -  In addition, only 2 small tasks are considered to support the claims.  This limits the ability to understand if the claims hold in more general settings.
  - The authors state in the limitations that to strengthen the insights, a larger and more complex language task is needed. This could be great, however I would suggest perhaps also considering more diverse data modalities could also strengthen the insights of the proposed framework.
questions: questions: - Perhaps considering data modalities and examples other than language could help to highlight insights that can be drawn from the DSF? E.g. perhaps modalities that more naturally arise from dynamical systems could help to further highlight differences between softmax attention and its more efficient alternatives? Or could help highlight differences between different linear attention/SSM/RNN variants?

- Are the differences between softmax attention and the other methods on the MQAR task, e.g. in Figure 5, simply due to the difference in state size? One can think of the state size of softmax attention as the size of its KV cache required for the sequence length of the task. If you make the recurrent alternatives have a state size that matches the softmax attention KV cache size for the task sequence length, do they then perform as well? Or are there other things happening in Softmax Attention as well? Perhaps exploring this through the lens of the DSF framework could also provide insights?

Minor: 
- It is stated the Matrix in Equation 12 is $L\times L$, but isn't this only the case when $B$ and $C$ are $N \times 1$ and $1 \times N$? The presentation in the paragraph before suggests these are general matrices.
- Line 203 says "The DSF makes apparent how a necessary condition for separability is 
for the map ζ(·) to be expressed by a finite-dimensional kernel, ". But in line 154 it says "Softmax attention also satisfies the assumption of separability".  I realize the point that is trying to be made regarding "practical separability", but nonetheless, it appears to be a contradiction as currently written.
limitations: limitations: Adequately discussed.

Comments: title: Thank you for the review
Thank you for the review
Thank you for the review
Response to Reviewer BcKL
Thank you for the response
comment: Thank you for taking the time to review the rebuttal and the positive score. We will make sure to incorporating all of your valuable feedback into the final version of the paper. Your thoughtful input is greatly appreciated and helped us improve the quality of our work.
Thank you for taking the time to review the rebuttal and the positive score. We will make sure to incorporating all of your valuable feedback into the final version of the paper. Your thoughtful input is greatly appreciated and helped us improve the quality of our work.
Thank you for taking the time to review the rebuttal and the positive score. We will make sure to incorporating all of your valuable feedback into the final version of the paper. Your thoughtful input is greatly appreciated and helped us improve the quality of our work.
Thank you for taking the time to review the rebuttal and the positive score. We will make sure to improve the introduction according to your feedback. Your thoughtful input is greatly appreciated and helped us improve the quality of our work.
Thank you to the authors for their detailed response. I look forward to reading about the new insights provided by their framework. 

I raise my score from a 5 to a 6.
I am satisfied with the response and have raised my score.
Thank you for the clarifying comments and additional results. I believe after the response to the reviewers this is a stronger paper and of interest to the community. I have increased my score.
I thank the authors' for their detailed responses to my and other reviewers' comments. I am satisfied with the answers, and look forward to seeing the final version of the paper. While I appreciate the paper for its theoretical contribution, I personally find theoretical frameworks to be most compelling when used to engineer and design novel architectures and training protocols. In the case of SSMs, I am more willing to make an exception because I believe that the literature in this field is scattered and oftentimes talking past each other. If I can suggest one thing, I would like the authors to really hone the introduction to allow this paper to become a good introductory theoretical framework for understanding these various architectures. I will maintain my positive score.