Title: Exploring Adversarial Robustness of Deep State Space Models
Venue: NeurIPS 2024
Accepted: yes
Keywords: Adversarial Robustness; Robustness Exploration; State Space Models
Abstract: Deep State Space Models (SSMs) have proven effective in numerous task scenarios but face significant security challenges due to Adversarial Perturbations (APs) in real-world deployments. Adversarial Training (AT) is a mainstream approach to enhancing Adversarial Robustness (AR) and has been validated on various traditional DNN architectures. However, its effectiveness in improving the AR of SSMs remains unclear.
While many enhancements in SSM components, such as integrating Attention mechanisms and expanding to data-dependent SSM parameterizations, have brought significant gains in Standard Training (ST) settings, their potential benefits in AT remain unexplored. To investigate this, we evaluate existing structural variants of SSMs with AT to assess their AR performance. We observe that pure SSM structures struggle to benefit from AT, whereas incorporating Attention yields a markedly better trade-off between robustness and generalization for SSMs in AT compared to other components. Nonetheless, the integration of Attention also leads to Robust Overfitting (RO) issues.
To understand these phenomena, we empirically and theoretically  analyze the output error of SSMs under AP. We find that fixed-parameterized SSMs have output error bounds strictly related to their parameters, limiting their AT benefits, while input-dependent SSMs may face the problem of error explosion. Furthermore, we show that the Attention component effectively scales the output error of SSMs during training, enabling them to benefit more from AT, but at the cost of introducing RO due to its high model complexity.
Inspired by this, we propose a simple and effective Adaptive Scaling (AdS) mechanism that brings AT performance close to Attention-integrated SSMs without introducing the issue of RO.

Exploring Adversarial Robustness of Deep State Space Models

Abstract

Deep State Space Models (SSMs) have proven effective in numerous task scenarios but face significant security challenges due to Adversarial Perturbations (APs) in real-world deployments. Adversarial Training (AT) is a mainstream approach to enhancing Adversarial Robustness (AR) and has been validated on various traditional DNN architectures. However, its effectiveness in improving the AR of SSMs remains unclear. While many enhancements in SSM components, such as integrating Attention mechanisms and expanding to data-dependent SSM parameterizations, have brought significant gains in Standard Training (ST) settings, their potential benefits in AT remain unexplored. To investigate this, we evaluate existing structural variants of SSMs with AT to assess their AR performance. We observe that pure SSM structures struggle to benefit from AT, whereas incorporating Attention yields a markedly better trade-off between robustness and generalization for SSMs in AT compared to other components. Nonetheless, the integration of Attention also leads to Robust Overfitting (RO) issues. To understand these phenomena, we empirically and theoretically analyze the output error of SSMs under AP. We find that fixed-parameterized SSMs have output error bounds strictly related to their parameters, limiting their AT benefits, while inputdependent SSMs may face the problem of error explosion. Furthermore, we show that the Attention component effectively scales the output error of SSMs during training, enabling them to benefit more from AT, but at the cost of introducing RO due to its high model complexity. Inspired by this, we propose a simple and effective Adaptive Scaling (AdS) mechanism that brings AT performance close to Attention-integrated SSMs without introducing the issue of RO. Our code is available at Robustness-of-SSM.

1 Introduction

Deep State Space Models (SSMs) represent a promising emerging model architecture inspired by traditional linear state space models [1]. These models capture temporal dependencies in sequences via structured state space transitions [2, 3, 4]. By leveraging their inherent recurrent nature and linear discretized transmission form, SSMs excel in long-sequence modeling with linear computational complexity [3, 5]. This makes SSMs highly competitive in various downstream tasks, with the potential to surpass classical architectures like convolutional networks and Transformers [6, 7, 8]. While the superior performance of SSMs on clean data has been well established across various tasks, these models may face significant security risks from meticulously crafted Adversarial Perturbations (APs) [9, 10, 11, 12, 13]in real-world scenarios. Therefore, it is essential to thoroughly explore and discuss the Adversarial Robustness (AR) of SSMs. Previous work [14] has conducted

preliminary robustness evaluations on visual SSMs. However, their assessment was limited to the VMamba structure. More importantly, they did not specifically evaluate and analyze the performance of SSMs under Adversarial Training (AT) [10, 15, 16]. This aspect is crucial for enhancing the AR of SSMs, as AT is the mainstream approach for improving a model's AR [16, 17, 18]. To bridge the current research gap, we aim to answer the following questions:

Do many component designs that have proven effective in boosting SSM performance under Standard Training (ST) [19, 20] similarly enhance SSMs when subjected to AT? Adversarial attacks aim to induce erroneous predictions by adding meticulously crafted small perturbations [9, 10], which may cause a more pronounced negative impact on SSM models. This is because SSMs heavily rely on sequential dependencies in inputs, causing errors to accumulate through state propagation. Consequently, it remains uncertain whether commonly employed AT frameworks, such as PGD-AT [16] and TRADES [21], can effectively improve the AR of SSMs.

How do various components influence the robustness-generalization trade-off in AT? Due to the trade-off between robustness and generalization [22, 23], AT often leads to a decrease in the accuracy of deep learning models on clean data, thus hindering their generalization. Additionally, deep learning models are prone to Robust Overfitting (RO) [24, 25], where models trained adversarially overfit to the AT samples but fail to generalize to adversarial test samples, significantly limiting the effectiveness of AT. We aim to investigate how existing structural variants of SSMs, such as diagonalized [26] and Multi-Input Multi-Output (MIMO) SSM [27], affect the robustness-generalization trade-off and RO issues in SSMs, thereby providing insights for designing more robust SSM structures.

Can the analysis of various SSM components' performance in AT provide valuable insights for the design of more robust SSM structures? Our objective is to analyze how components of different SSM variants influence model behavior during AT and to identify those that contribute positively. This analysis aims to inform adjustments that enhance the robustness and performance of SSMs under AT.

To response Q1 and Q2, we employ AT using common AT frameworks on various structural variants of SSMs. These include implementations such as Normal Plus Low-Rank (NPLR) decomposition (S4) [3], diagonalization (DSS) [28, 26], MIMO extension (S5) [27], integration of attention mechanisms (Mega) [19], and data-dependent SSM extension (Mamba) [20]. Subsequently, we conduct comprehensive robustness evaluations to assess their performance. Specifically, we obtain the following observations: 1) A Clear Robustness-Generalization Trade-off in SSM Structures . We observe a significant decrease in the Clean Accuracy (CA) of SSMs following AT. Specifically, for the S4 model on the CIFAR-10 dataset, the CA dropped by nearly 15% compared to ST. This indicates a pronounced robustness-generalization trade-off in SSM structures. 2) Pure SSM structure struggles in benefit from AT. Despite expanded to data-dependent SSM, Mamba fails to show distinct superiority over the fixed-parameterized counterparts (S4 and DSS) under AT, even though all are SISO systems . 3) Only the incorporation of attention mechanisms significantly enhances both the CA and RA of SSMs after AT. However, this improvement also introduces a significant issue of RO.

To response Q3, we conduct both empirical and theoretical analyses of the output error of SSMs under AP. Our findings demonstrate that fixed-parameterized SSMs have bounded output errors strictly related to their parameters, which limits their ability to reduce output errors during AT. In contrast, data-dependent SSMs may encounter an explosion of output errors. Furthermore, incorporating attention mechanisms provides additional adaptive scaling of the SSM's output error, facilitating better alignment of outputs corresponding to adversarial and clean inputs. However, this also increases complexity, raising the risk of RO. Inspired by this, we explore whether a low-complexity adaptive scaling operation could assist SSMs in output alignment while avoiding RO issues. To this end, we designed a simple Adaptive Scaling (AdS) mechanism to aid in output alignment. Our results indicate that this design effectively enhances the AT performance of SSMs and reduces output errors without introducing RO issues. We hope that our responses to the above three questions will inspire further research and development of robust SSM structures.

2 Preliminaries of SSMs

Given the input signal u ( · ) ∈ R + → R d and time t ∈ R + , the general linear SSM, parametrized by an state matrix A ∈ R h × h , an input matrix B ∈ R h × d , an output matrix C ∈ R d × h and a direct transmission matrix D ∈ R d × d can be formalized as follows:

where x ( t ) ∈ R h and y ( t ) ∈ R o represents respectively represent the hidden state and the output signal at time t .

S4 For the discretized input sequence u ∈ R L × d , S4 [3] broadcasts the same SSM parameters to each input dimension for state propagation, instantiating a SISO system. Specifically, they employ a bilinear method [29] for discretization to obtain discretized approximations of the parameters:

where u ( i ) k and y ( i ) k represents the i -th element in the k -th token of u and y respectively. ∆ t ∈ R + is a fixed step size that remains constant for each time step. S4 parameterizes the matrix A using NPLR decomposition for efficient optimization. By setting x 0 = 0 , the output can take the following form:

This can be achieved by a parallelized efficient convolution computation: y ( i ) = K ∗ u ( i ) , where the convolution kernel K = ( CB , CAB , . . . , CA L -1 B ) , resulting in a complexity of O ( Lh ) .

DSS Instead of employ bilinear discretization, DSS [28] uses the Zero-Order Hold (ZOH) discretization:

Based on this, they diagonalize A to instantiate the SSM parameters:

where exp λ i is the i -th diagonal element of A .

S5 S5 [27] still employs ZOH discretization, but with a distinction, they utilize a MIMO setup, meaning all hidden dimensions of each token are jointly involved in state transition as in eq.(1) and (2) and employs parallel scanning for computation. To ensure efficiency, they set A = V -1 Λ V for diagonal reparameterization:

this reduces the complexity of parallel scanning from O ( h 3 L ) to O ( hL ) .

Mamba(S6) Similar to DSS and S5, Mamba [20] utilizes ZOH for discretization and performs diagonal instantiation of A , with computations carried out through parallel scanning. It is noteworthy that Mamba sets adaptive B k ( u k ) , C k ( u k ) and ∆ t k ( u k ) , 1 ≤ k ≤ L for each step through learnable linear transformation (meaning that they adpoted a data-dependent SSM parameters setting), while still maintaining a SISO configuration.

Mega Mega's SSM component is implemented in the form of Exponential Moving Average (EMA) [19]. Specifically, their Multi-dimensional Damped EMA is given by:

where the expansion parameters β i ∈ R h , projection parameters η i ∈ R h , α i , δ i ∈ R h represent the weighting and damping factors, respectively. This can be formalized equivalently as a SISO SSM with parameters A i = diag (1 -α i ⊙ δ i ) , B i = α i ⊙ β i and C = η ⊤ i . Following the execution of SSM, Mega introduces Attention mechanism between the SSM output y and input sequence u , which made it the most competitive Attention-based SSM structure [27].

3 Empirical Evaluation: Component Contributions to AT Gains

In this section, we empirically assess the natural AR of various SSM structures and their AR post AT to explore the AR enhancement provided by mainstream AT frameworks for SSMs and the generalization behavior of SSM variants under AT.

Training Setup. We adopt the ST and two most commonly used AT frameworks, PGD-AT [16] and TRADES [21], as well as two more efficient and advanced adversarial training frameworks, FreeAT [30] and YOPO [31], to conduct experiments on the MNIST, CIFAR-10, and Tiny-ImageNet datasets. For AT, we utilize a 10-step ℓ ∞ PGD (PGD-10) as the attack method. Following [21], on MNIST, we set the adversarial budget to ∥ ϵ ∥ ∞ = 0 . 3 , attack step size α = 0 . 04 , the KL divergence regularizer coefficient for TRADES β = 1 . 0 , and the training epoch to 100 . On CIFAR-10 and TinyImagenet, we set ∥ ϵ ∥ ∞ = 0 . 031 , α = 0 . 007 , β = 6 . 0 , and the training epoch to 180 . After each training epoch of AT, we conduct adversarial testing on both the training and test sets to evaluate robustness and measure generalization on adversarial examples (i.e. Robust Generalization, RG) [21, 24, 32]. For the model architecture of SSMs, we set all models to a uniform 2 -layer architecture with a hidden dimension d = 128 on MNIST, and a 4 -layer architecture with d = 128 on CIFAR-10 and Tiny-Imagenet. Considering that SSMs are a class of models highly reliant on the sequential dependence, we adopt a sequence image classification setup to thoroughly investigate the AR of SSMs. For MNIST, we resize inputs to (784 , 1) , for CIFAR-10 and Tiny-Imagenet, we resize inputs to (1024 , 3) and (4096 , 3) . Further experimental results, including the results for Tiny-ImageNet, and detailed configurations are presented in the Appendix C and D.

Evaluation Setting . We record the CA and adversarial test accuracy (i.e. Robust Accuracy, RA) [10, 33] of each model at their best and final checkpoints across three training schemes to evaluate robustness and examine the robustness-generalization trade-off as well as the issue of RO. The

0

25

50

75

100 125 150 175

0

5

10

15

20

Train Loss

0

25

50

75

100 125 150 175

0

5

10

15

20

Test Loss

0

25

50

75

100 125 150 175

0.0

0.5

1.0

1.5

2.0

2.5

3.0

Adv Train Loss

0

25

50

75

100 125 150 175

0

1

2

3

4

Adv Test Loss

0

25

50

75

100 125 150 175

0.2

0.4

0.6

0.8

1.0

Train Acc

0

25

50

75

100 125 150 175

0.2

0.4

0.6

0.8

1.0

Test Acc

0

25

50

75

100 125 150 175

0.0

0.2

0.4

0.6

0.8

1.0

Adv Train Acc

0

25

50

75

100 125 150 175

0.0

0.2

0.4

0.6

0.8

1.0

Adv Test Acc

DSS-CIFAR-10

DSS-MNIST

Mamba-CIFAR-10

Mamba-MNIST

Mega-CIFAR-10

Mega-MNIST

S4-CIFAR-10

S4-MNIST

S5-CIFAR-10

S5-MNIST

widely used in AR evaluation [25, 33].

For SSMs trained with ST, almost all models exhibit no adversarial robustness, and the adversarial test loss for all models shows a continuous increase during the training process, as depicted in Fig. 5 in Appendix D, consistent with the conclusions drawn for convolutional networks [16]. However, it is noteworthy that the RA of Mega and Mamba trained standardly are higher than the rest of the SSM structures, especially on MNIST where this performance is particularly pronounced. This suggests that the flexibility introduced by Attention [19] and data-dependent SSM structures also helps the models to some extent in adapting to adversarial examples. Compared to the ST scenario, we are more interested in understanding the AR improvement of AT for SSMs and the dynamic behavior of SSMs during AT. To this end, we plot the training, testing, AT, and adversarial test loss and accuracy changes of various SSM variants on both datasets for PGD-AT (Fig. 1) and TRADES (Fig. 2). In conjunction with Table 1, we have the following observations:

AT remains an effective strategy for enhancing the AR of SSMs, yet different SSM structures exhibit a clear trade-off between robustness and generalization. All models benefit from AT, achieving higher RA with both PGD-AT and TRADES frameworks. Some intriguing phenomenons occurs on the MNIST dataset, where models trained under the PGD-AT framework exhibit a marked decrease in CA and almost no RA under AA. In contrast, TRADES does not lead to a significant reduction in CA and substantially improves robust accuracy under AA. This disparity is not observed on CIFAR-10 and Tiny-Imagenet. The phenomenon can be elucidated by findings from [37], which indicate that MNIST's limited semantic information may lead PGD-AT to fit to spurious rather than causal features, resulting in overfitting to ℓ ∞ PGD attacks. On the other hand, TRADES explicitly constrains the KL divergence between clean and adversarial sample logits, ensuring that the model learns causal features from clean data while adapting to adversarial distributions. Besides, on the MNIST dataset, all model architectures fail to converge when trained with YOPO. This advanced adversarial training strategy relies on the parameters of the model's input layer for auxiliary calculations, making it difficult to simply extend and be effective on non-convolutional structures. However, on the CIFAR-10 dataset, a noticeable decrease in CA is observed across all SSM structures after AT, particularly for S5, which experienced a 16 . 62% drop in CA under PGD-AT, with other structures also showing approximately a 10% reduction in CA, a similar phenomenon is observed on Tiny-ImageNet. This indicates a clear trade-off between robustness and generalization for SSM structures.

The incorporation of Attention indeed yields a better trade-off between robustness and generalization, yet it also introduces a significant issue of RO. Compared to other SSM structures, Mega exhibits the least CA degradation after AT, while compared to DSS, the model with the sec-

0

25

50

75

100 125 150 175

0.00

0.25

0.50

0.75

1.00

1.25

1.50

1.75

2.00

Train Loss

0

25

50

75

100 125 150 175

0.00

0.25

0.50

0.75

1.00

1.25

1.50

1.75

2.00

Test Loss

0

25

50

75

100 125 150 175

0.0

0.5

1.0

1.5

2.0

Adv Train Loss

0

25

50

75

100 125 150 175

0.0

0.5

1.0

1.5

2.0

Adv Test Loss

0

25

50

75

100 125 150 175

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

Train Acc

0

25

50

75

100 125 150 175

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

Test Acc

0

25

50

75

100 125 150 175

0.2

0.4

0.6

0.8

1.0

Adv Train Acc

0

25

50

75

100 125 150 175

0.2

0.4

0.6

0.8

1.0

Adv Test Acc

DSS-CIFAR-10

DSS-MNIST

Mamba-CIFAR-10

Mamba-MNIST

Mega-CIFAR-10

Mega-MNIST

S4-CIFAR-10

S4-MNIST

S5-CIFAR-10

S5-MNIST

ond least CA degradation, Mega achieves improvements of 4 . 21% and 2 . 68% in CA degradation under PGD-AT and TRADES, respectively. Moreover, Mega attains the highest adversarial accuracy against PGD-10 and AA attacks post-AT (in the best sense). This indicates that the introduction of Attention can indeed lead to a better robustness-generalization trade-off. However, from Fig. 1 and 2, it is observed that on CIFAR-10, both under PGD-AT and TRADES, Mega demonstrates a continuous decrease in AT loss and an increase in AT accuracy, but the RA in adversarial testing shows almost no growth trend in the middle and late stages of training, resulting in a difference of over 40% (PGD-AT) and over 20% (TRADES) between AT and test accuracy at the end of training. Particularly for PGD-AT, after achieving the best RA of 40 . 53% at the 39th epoch, Mega's RA begins to gradually decline, eventually falling to 30 . 68% , showing a very evident RO issue. Additionally, Mamba also exhibits a clear RO issue during the TRADE training process, as depicted in Fig. 2, resulting in a difference of over 20% between AT and test accuracy.

3) The pure SSM structure exhibits a significant disadvantage in AT, and the data-dependent parametrization does not aid in the AT of SSMs. S4, DSS and Mamba, due to their SISO characteristics, require the addition of linear layers after SSM calculation to aid in the interaction between different feature elements. While S5 that expanded with MIMO capabilities can be equivalent to a linear combination of multiple SISO SSMs, thus obviating the need for extra position-wise linear layers [27]. This makes the S5 block consist solely of a MIMO SSM. Nonetheless, on CIFAR10, S5 demonstrates a marked disadvantage in RA and a worse robustness-generalization trade-off compared to other SSMs after training with both PGD-AT and TRADES (Tab. 1). Furthermore, we also observe that, despite the inclusion of linear layers, Mamba still exhibits a reduction in CA and RA compared to S4 and DSS, indicating that the extension of the data-dependent SSM does not contribute to the model's AT.

Based on the observations, we give an answer to the questions Q1 and Q2 . SSMs alone seem to struggle to perform well in AT, while SSMs integrated with linear layers or Attention demonstrate a significant enhancement in AR compared to the pure SSM structure. However, SSMs with Attention, although showing the greatest gain in both robust and clean accuracy, exhibit a much more pronounced RO issue compared to SSMs with only linear layers integrated.

Based on these findings, we consider the following: Does the inherent nature of SSMs limit their benefit in AT? Is it the Attention mechanism itself causing overfitting to AT data? Can formal analysis of Attention's behavior in AT provide insights for finding ways to improve SSMs' AR while avoiding RO issues? We will delve deeper into these questions in the following section.

4 Component-wise Attribution: Theoretical and Experimental Analysis

In this section, we first theoretically investigate the stability boundaries of various SSMs under APs to understand why SSMs alone do not benefit significantly from AT. This theoretical analysis aims to uncover the reasons behind the limited effectiveness of AT on pure SSM structures. Next, we

0

10

20

30

40

Change/Before Component

Structure-Training Type

1

0

1

Change/Before Component

Structure-Training Type

0.8

0.6

0.4

0.2

0.0

Change/Before Component

Structure-Training Type

KL Divergence - Attention

0

10

20

30

40

50

Change/Before Component

Structure-Training Type

MSE - SSM

0.8

0.6

0.4

0.2

0.0

0.2

Change/Before Component

Structure-Training Type

MSE - Linear

0.8

0.6

0.4

0.2

0.0

Change/Before Component

Structure-Training Type

MSE - Attention

S4-PGD-AT-Train

S4-PGD-AT-Test

DSS-PGD-AT-Train

DSS-PGD-AT-Test

DSS-TRADES-Train

DSS-TRADES-Test

S5-PGD-AT-Train

S5-PGD-AT-Test

S5-TRADES-Train

S5-TRADES-Test

Mega-PGD-AT-Train

Mega-PGD-AT-Test

Mega-TRADES-Train

Mega-TRADES-Test

Mamba-PGD-AT-Train

Mamba-PGD-AT-Test

Mamba-TRADES-Train

Mamba-TRADES-Test

experimentally validate each component integrated with SSMs to further elucidate their roles in enhancing AT performance. Finally, we conduct a formal analysis of why incorporating attention mechanisms aids in AT, aiming to provide insights for improving the robustness and performance of SSMs during AT.

4.1 Theoretical Analysis of SSM Stability Under APs

We consider a generalized scenario where the SSM input is denoted as u = ( u 1 , u 2 , · · · , u L ) T ∈ R L × 1 , and the input after AP is u ′ = ( u ′ 1 , u ′ 2 , · · · , u ′ L ) T ∈ R L × 1 . Let ε = u ′ -u = ( ε 1 , ε 2 , · · · , ε L ) T ∈ R L × 1 , and assume E [ ε ] = µ , E [ ε 2 k ] ≤ M , for k = 1 , 2 , . . . , L (such assumptions are reasonable due to the perturbation budget constraints inherent to AP). Considering the generalized SSM setup:

The form in eq. (10) encompasses both the fixed-parameterized and the data-dependent scenario, where when A i = A , B i = B , C i = C ( i = 1 , . . . ), Equation (10) represents a fixedparameterized SISO SSM. It is reasonable to consider only the SISO case here, as after diagonal reparameterization, each hidden dimension of the state transition equation in S5 can still be regarded as an independent SISO system. Based on the above settings, we have the following theorem:

Theorem 4.1.1 Given the SSM formalized as in eq. (10), the output error before and after perturbation, E ε [ ∥ y ′ -y ∥ 2 ] , has the following upper and lower bounds:

0.0

0.2

0.4

0.6

Change/Before Component

Structure-Training Type-AdS

0.6

0.4

0.2

0.0

Change/Before Component

Structure-Training Type-AdS

0.3

0.2

0.1

0.0

Change/Before Component

Structure-Training Type-AdS

0.0

0.5

1.0

1.5

2.0

2.5

Change/Before Component

Structure-Training Type-AdS

MSE - SSM

0.8

0.6

0.4

0.2

0.0

Change/Before Component

Structure-Training Type-AdS

MSE - AdS

0.6

0.4

0.2

0.0

Change/Before Component

Structure-Training Type-AdS

MSE - Linear

S4-PGD-AT-Relu-Train

S4-PGD-AT-Relu-Test

S4-PGD-AT-Sigmoid-Train

S4-PGD-AT-Sigmoid-Test

S4-PGD-AT-Tanh-Train

S4-PGD-AT-Tanh-Test

DSS-PGD-AT-Relu-Train

DSS-PGD-AT-Relu-Test

DSS-PGD-AT-Sigmoid-Train

DSS-PGD-AT-Sigmoid-Test

DSS-PGD-AT-Tanh-Train

DSS-PGD-AT-Tanh-Test

DSS-TRADES-Relu-Train

DSS-TRADES-Relu-Test

DSS-TRADES-Sigmoid-Train

DSS-TRADES-Sigmoid-Test

DSS-TRADES-Tanh-Train

DSS-TRADES-Tanh-Test

where L denotes the length of the input sequence, 0 < c 1 ≤ c 2 are constants, and ¯ λ max i and ¯ λ min i are the eigenvalues of matrix A i with the maximum and minimum absolute values, respectively.

Theorem 4.1.1 indicates that the output error of SSMs in the presence of AP is strictly related to the parameters of the SSMs. It should be noted that under the setting of fixed-parameterized SSMs (S4, DSS, S5, and Mega), the output error E ε [ ∥ y ′ -y ∥ 2 2 ] has a fixed lower bound µ 2 c 1 ∑ L j =1 [ ∏ j -1 i =1 | ¯ λ min i | ] ( C j B j ) 2 , which increases with the length of the sequence L .

This implies that even when fixed-parameterized SSMs aim to stabilize the output of adversarial examples during AT by minimizing output error, they are constrained by a fixed lower bound on the error. This constraint leads to inevitable error accumulation, making it challenging for pure SSM structures to effectively benefit from AT. While Mamba can avoid the issue of a fixed error lower bound through adaptive SSM parameterization, it may also introduce more severe negative impacts. Notice that during the ZOH discretization process, as ∆ t k → 0 , the eigenvalues of ∆ t A in B k = ( A k -I )(∆ t k A k ) -1 ∆ t k ( u k ) B tend towards 0 . This results in an ill-conditioned problem when computing the inverse operation (∆ t A ) -1 , causing ∥ B k ∥ → ∞ . Consequently, this leads to max u C k ( u k ) B k ( u k ) 2 ≤ ∥ C k ( u k ) ∥ 2 2 ∥ B k ( u k ) ∥ 2 2 →∞ in Mamba, potentially resulting in an almost infinite error bound. In contrast, training stable fixed-parameterized SSMs ensures a fixed upper bound on output error, thereby avoiding such error explosion issues.

4.2 Experimental Validation and Further Insights

To validate our theoretical analysis with quantitative metric and to deeply investigate the specific roles of components within various SSM structures during AT, we record the relative change

in feature sequence differences d ( f ′ , f ) / ∥ f ∥ (%) on CIFAR-10 for each model post-AT, where f ′ , f ∈ R L × d represent the feature sequences corresponding to adversarial and clean inputs, respectively. We measure the differences using two metrics: the Mean Squared Error (MSE) 1 T ∥ f ′ -f ∥ 2 2 , to quantify the absolute discrepancy between f and f ′ , and the Kullback-Leibler (KL) divergence [38] KL ( S ( f ) ∥S ( f ′ )) , to evaluate the distributional divergence between f ′ and f , where S represents the Softmax operation over the sequence dimension, given by S ( f ) [ k,j ] = exp( f ) [ k,j ] / ∑ T i =1 exp( f ) [ i,j ] . We average the statistical results from both the training and test sets, analyzing the performance differences between them to attribute the issue of RO. For each component, we calculate the average results across all layers. As shown in Fig. 3, there is an increase in both MSE and KL divergence before and after the SSM in all models. Notably, Mamba exhibits an over 40 times increase in KL and MSE on both the training and test sets after training with TRADES, significantly higher than the changes observed in other fixed-parameterized SSMs. These findings are consistent with our theoretical analysis, indicating that SSMs inherently struggle to reduce output discrepancies through AT, while data-dependent SSMs may experience an explosion of output errors during AT.

It is noteworthy that both the linear layers and the Attention mechanism exhibit a significant reduction in MSE and KL divergence, implying that they indeed serve to diminish the discrepancy between feature sequences of clean and adversarial input during AT. This explains why SSMs integrated with Attention and linear layers achieve higher CA and Robust RA in AT. Compared to linear layers, Attention induces a more pronounced reduction in MSE and KL divergence. However, while Attention after PGD-AT achieves more than a 90% decrease in MSE and KL divergence on the training data, it only yields about a 60% reduction on the test set, which is significantly weaker than the improvements observed on the training set. In contrast, other components do not exhibit such a notable degradation in difference reduction on the test set, indicating that the RO issue essentially stems from Attention itself, rather than other components . In fact, the incorporation of Attention introduces excessive model complexity, which, according to the conclusions in previous work [39], also limits the model's RG. According to eq. (11), the introduction of Attention effectively allows the model to adaptively scale the output error: E [ ∥A ( y ′ ) y -A ( y ) y ∥ 2 2 ] , where A denotes the SelfAttention operation. This inspires us to consider: whether incorporating an Ads to the SSM's output sequence y with minimal added complexity could enable fixed-parameterized SSMs to approach the AT performance of Attention while avoiding the introduction of RO?

To answer this question, we introduced an AdS module after the SSM of S4 and DSS, to adaptively scale the SSM output y : y k = σ ( L 1 ( y k )) ⊙ y k + σ ( L 2 ( y k )) , where L 1 and L 2 are learnable linear mappings, L 2 ( y k ) is used to assist in adaptive scaling to adjust the output bias, and σ is an activation function, which includes ReLU, Tanh, or Sigmoid. We conduct AT on SSMs with AdS integrated with different activations on CIFAR-10 and MNIST using PGD-AT and TRADES, and record the best and final CA and RA. As shown in the results in Table 2, regardless of the type of activation integrated, S4 and DSS with AdS showed more than a 3% improvement in CA and over a 2% improvement in RA. In particular, the AdS with ReLU as activation brought a 4.1% improvement in CA and a 3.97% improvement in RA for DSS when trained with TRADES, nearly matching Mega's performance in terms of CA and RA under PGD-10 and AA, without exhibiting RO issues observed in Mega with PGD-AT. The experimental results on Tiny-ImageNet (Tab. 6) also support the same conclusion. To further confirm that AdS can indeed help reduce SSM output discrepancies, similar to the effect of Attention, we also quantify the differences in the intermediate layer feature sequences for each component of S4 and DSS after integrating AdS, as shown in Fig. 4. The feature sequence differences before and after AdS, in terms of both KL divergence and MSE, shows a decrease, indicating that the introduction of AdS does help in reducing the disparity between clean and adversarial feature sequences. This provides an affirmative answer to our question, suggesting that the primary advantage of Attention in enhancing SSM's performance in AT is due to its adaptive sequence scaling. Incorporating a low-complexity adaptive scaling module can improve the SSM model's CA and RA in AT while preventing RO issues.

5 Conclusion

In this study, we evaluate the performance of various SSMs structures in AT and investigate which components positively assist SSMs in this context. Our findings reveal the robustness-generalization trade-off inherent in SSMs during AT. Although the integration of Attention improves both the CA and RA of SSMs, it also increases model complexity, leading to RO issues. Through experimental and theoretical analyses, we demonstrate that pure SSM structures hardly benefit from AT, whereas Attention facilitates further reduction of output error through sequence scaling. Inspired by this, we show that introducing a simple and effective AdS module to SSMs effectively enhances their AT performance and prevents RO. This provides valuable guidance and insights for the future design of more robust SSM structures.

References

Syama Sundar Rangapuram, Matthias W. Seeger, Jan Gasthaus, Lorenzo Stella, Yuyang Wang, and Tim Januschowski. Deep state space models for time series forecasting. In NeurIPS , 2018.

Albert Gu, Tri Dao, Stefano Ermon, Atri Rudra, and Christopher Ré. Hippo: Recurrent memory with optimal polynomial projections. In NeurIPS , 2020.

Albert Gu, Karan Goel, and Christopher Ré. Efficiently modeling long sequences with structured state spaces. In ICLR , 2022.

Biqing Qi, Junqi Gao, Kaiyan Zhang, Dong Li, Jianxing Liu, Ligang Wu, and Bowen Zhou. Smr: State memory replay for long sequence modeling, 2024.

Albert Gu, Isys Johnson, Karan Goel, Khaled Saab, Tri Dao, Atri Rudra, and Christopher Ré. Combining recurrent, convolutional, and continuous-time models with linear state space layers. In NeurIPS , 2021.

Harsh Mehta, Ankit Gupta, Ashok Cutkosky, and Behnam Neyshabur. Long range language modeling via gated state spaces. In ICLR , 2023.

Karan Goel, Albert Gu, Chris Donahue, and Christopher Ré. It's raw! audio generation with state-space models. In ICML , 2022.

Eric Nguyen, Karan Goel, Albert Gu, Gordon W. Downs, Preey Shah, Tri Dao, Stephen A. Baccus, and Christopher Ré. S4ND: modeling images and videos as multidimensional signals using state spaces. CoRR , abs/2210.06583, 2022.

Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR , 2014.

Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR , 2015.

Junqi Gao, Biqing Qi, Yao Li, Zhichang Guo, Dong Li, Yuming Xing, and Dazhi Zhang. Perturbation towards easy samples improves targeted adversarial transferability. In NeurIPS 2023 , 2023.

Biqing Qi, Junqi Gao, Jianxing Liu, Ligang Wu, and Bowen Zhou. Enhancing adversarial transferability via information bottleneck constraints. IEEE Signal Process. Lett. , 31:14141418, 2024.

Biqing Qi, Junqi Gao, Yiang Luo, Jianxing Liu, Ligang Wu, and Bowen Zhou. Investigating deep watermark security: An adversarial transferability perspective. CoRR , abs/2402.16397, 2024.

Chengbin Du, Yanxi Li, and Chang Xu. Understanding robustness of visual state space models for image classification. CoRR , abs/2403.10935, 2024.

Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236 , 2016.

Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR , 2018.

Takeru Miyato, Andrew M. Dai, and Ian J. Goodfellow. Adversarial training methods for semi-supervised text classification. In ICLR , 2017.

Biqing Qi, Bowen Zhou, Weinan Zhang, Jianxing Liu, and Ligang Wu. Improving robustness of intent detection under adversarial attacks: A geometric constraint perspective. IEEE Trans. Neural Networks Learn. Syst. , 35(5):6133-6144, 2024.

Xuezhe Ma, Chunting Zhou, Xiang Kong, Junxian He, Liangke Gui, Graham Neubig, Jonathan May, and Luke Zettlemoyer. Mega: Moving average equipped gated attention. In ICLR , 2023.

Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. CoRR , abs/2312.00752, 2023.

Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric P. Xing, Laurent El Ghaoui, and Michael I. Jordan. Theoretically principled trade-off between robustness and accuracy. In ICML , 2019.

Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. In ICLR , 2019.

Rafael Pinot, Laurent Meunier, Alexandre Araujo, Hisashi Kashima, Florian Yger, Cédric Gouy-Pailler, and Jamal Atif. Theoretical evidence for adversarial robustness through randomization. In NeurIPS , 2019.

Leslie Rice, Eric Wong, and J. Zico Kolter. Overfitting in adversarially robust deep learning. In ICML , 2020.

Yinpeng Dong, Ke Xu, Xiao Yang, Tianyu Pang, Zhijie Deng, Hang Su, and Jun Zhu. Exploring memorization in adversarial training. In ICLR , 2022.

Albert Gu, Karan Goel, Ankit Gupta, and Christopher Ré. On the parameterization and initialization of diagonal state space models. In NeurIPS , 2022.

Jimmy T. H. Smith, Andrew Warrington, and Scott W. Linderman. Simplified state space layers for sequence modeling. In ICLR , 2023.

Ankit Gupta, Albert Gu, and Jonathan Berant. Diagonal state spaces are as effective as structured state spaces. In NeurIPS , 2022.

Arnold Tustin. A method of analysing the behaviour of linear systems in terms of time series. 1947.

Ali Shafahi, Mahyar Najibi, Amin Ghiasi, Zheng Xu, John P. Dickerson, Christoph Studer, Larry S. Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! In Advances in Neural Information Processing Systems , pages 3353-3364, 2019.

Dinghuai Zhang, Tianyuan Zhang, Yiping Lu, Zhanxing Zhu, and Bin Dong. You only propagate once: Accelerating adversarial training via maximal principle. In Advances in Neural Information Processing Systems , pages 227-238, 2019.

Ludwig Schmidt, Shibani Santurkar, Dimitris Tsipras, Kunal Talwar, and Aleksander Madry. Adversarially robust generalization requires more data. In NeurIPS , 2018.

Zekai Wang, Tianyu Pang, Chao Du, Min Lin, Weiwei Liu, and Shuicheng Yan. Better diffusion models further improve adversarial training. In ICML , 2023.

Francesco Croce and Matthias Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. In ICML , 2020.

Francesco Croce and Matthias Hein. Minimally distorted adversarial examples with a fast adaptive boundary attack. In ICML , 2020.

Maksym Andriushchenko, Francesco Croce, Nicolas Flammarion, and Matthias Hein. Square attack: A query-efficient black-box adversarial attack via random search. In ECCV , 2020.

Lukas Schott, Jonas Rauber, Matthias Bethge, and Wieland Brendel. Towards the first adversarially robust neural network model on MNIST. In ICLR , 2019.

S. Kullback and R. A. Leibler. On information and sufficiency. The Annals of Mathematical Statistics , (1):79-86, 1951.

Zhuozhuo Tu, Jingwei Zhang, and Dacheng Tao. Theoretical analysis of adversarial learning: A minimax approach. In NeurIPS , 2019.

Alexey Kurakin, Ian J Goodfellow, and Samy Bengio. Adversarial examples in the physical world. In Artificial intelligence safety and security . 2018.

Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. In ICML , 2018.

Chengzhi Mao, Ziyuan Zhong, Junfeng Yang, Carl Vondrick, and Baishakhi Ray. Metric learning for adversarial robustness. In NeurIPS , 2019.

Tianyu Pang, Kun Xu, Yinpeng Dong, Chao Du, Ning Chen, and Jun Zhu. Rethinking softmax cross-entropy loss for adversarial robustness. arXiv preprint arXiv:1905.10626 , 2019.

Zekai Wang and Weiwei Liu. Robustness verification for contrastive learning. In ICML , 2022.

Muzammal Naseer, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Fatih Porikli. A self-supervised approach for adversarial robustness. In CVPR , 2020.

Tianyu Pang, Kun Xu, Chao Du, Ning Chen, and Jun Zhu. Improving adversarial robustness via promoting ensemble diversity. In ICML , 2019.

Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204 , 2017.

Maksym Andriushchenko and Nicolas Flammarion. Understanding and improving fast adversarial training. In NeurIPS , 2020.

Bai Li, Shiqi Wang, Suman Jana, and Lawrence Carin. Towards understanding fast adversarial training. arXiv preprint arXiv:2006.03089 , 2020.

Lianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang, Wenyu Liu, and Xinggang Wang. Vision mamba: Efficient visual representation learning with bidirectional state space model. arXiv preprint arXiv:2401.09417 , 2024.

Yue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu, Lingxi Xie, Yaowei Wang, Qixiang Ye, and Yunfan Liu. Vmamba: Visual state space model. arXiv preprint arXiv:2401.10166 , 2024.

Shida Wang and Beichen Xue. State-space models with layer-wise nonlinearity are universal approximators with exponential decaying memory. In NeurIPS , 2024.

Liliang Ren, Yang Liu, Shuohang Wang, Yichong Xu, Chenguang Zhu, and Cheng Xiang Zhai. Sparse modular activation for efficient sequence modeling. In NeurIPS , 2023.

Kaizhao Liang, Jacky Y Zhang, Boxin Wang, Zhuolin Yang, Sanmi Koyejo, and Bo Li. Uncovering the connections between adversarial transferability and knowledge transferability. In ICML , 2021.

A Mathematical Derivations

A.1 The Proof of Theorem 4.1.1

Denote

then we have y = ( y 1 , y 2 , · · · , y L ) = H u , y ′ = ( y ′ 1 , y ′ 2 , · · · , y ′ L ) = H ( u + ε ) (i) First, we explain how the lower bound is derived

where 1 = (1 , 1 , · · · , 1) T . Denote H ≜ [ h 1 , h 2 , · · · , h L ] , where h 1 , h 2 , · · · , h L are column vectors of H , i.e. h 1 = ( C 1 B 1 , C 2 A 1 B 2 , · · · , C L [ ∏ L -1 i =1 A i ] B L ) , h 2 = ( 0 , C 1 B 1 , · · · , C L -1 [ ∏ L -2 i =1 A i ] B L -1 ) , · · · , h L = ( 0 , 0 , · · · , C 1 B 1 ) , then the inequality 12 can be written as :

Therefore, E T E is a real symmetric positive definite matrix and is full rank, then there exists an orthogonal matrix Q and a diagonal matrix Λ = diag ( λ 1 , λ 2 , · · · , λ L ) , where λ i are eigenvalues of E T E , and λ i must satisfy λ i > 0 , denote λ max = max { λ 1 , λ 2 , . . . , λ L } = c 2 and λ min =

min { λ 1 , λ 2 , . . . , λ L } = c 1 , we have,

(ii) Perform a similar derivation for the upper bound where

with the maximum absolute value of matrix A i be denoted as ¯ λ max i and the eigenvalue with the minimum absolute value as ¯ λ min i note that ∏ j -1 i =1 | ¯ λ min i | ( C j B j ) 2 ≤ ( C j [ ∏ j -1 i =1 A i ] B j ) 2 ≤ ∏ j -1 i =1 | ¯ λ max i | ( C j B j ) 2 , which means:

B Related Works

B.1 Robust Attacks and Defenses

The existence of adversarial examples [9, 10] has revealed the vulnerability of deep neural networks, where even imperceptible perturbations added to clean samples can deceive these networks. Such adversarial examples can be crafted by malicious adversaries in the real world [40, 41], thus necessitating models to possess sufficient adversarial robustness to effectively counter adversarial attacks.

To enhance the adversarial robustness of models against adversarial attacks, numerous adversarial defense methods have been proposed. Currently, the most widely used and effective defense method is AT [15, 16]. AT employs samples perturbed by adversarial attacks as training data, enabling the model to adapt to the distribution of adversarial examples and thus gain adversarial robustness [15, 16, 21]. Additionally, various other learning frameworks have been integrated into AT to improve its effectiveness, such as metric learning [42, 43], self-supervised learning [44, 45], and ensemble learning [46, 47]. However, AT still has two main limitations: 1) the inherent robustnessgeneralization trade-off in deep models [21], which leads to a decrease in the model's clean accuracy after AT; 2) RO [48, 49], where the model overfits to the adversarial examples in the training set.

B.2 SSM Models

Due to SSMs' excellent long-sequence modeling capabilities and efficient linear computational complexity, these models have garnered widespread attention and achieved great success in various fields

0

25

50

75

100

125

150

175

0.00

0.25

0.50

0.75

1.00

1.25

1.50

1.75

2.00

Train Loss

0

25

50

75

100

125

150

175

0.00

0.25

0.50

0.75

1.00

1.25

1.50

1.75

2.00

Test Loss

0

25

50

75

100

125

150

175

0

10

20

30

40

50

60

70

Adv Test Loss

0

25

50

75

100

125

150

175

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

Train Acc

0

25

50

75

100

125

150

175

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

Test Acc

0

25

50

75

100

125

150

175

0.00

0.05

0.10

0.15

0.20

0.25

Adv Test Acc

DSS-CIFAR-10

DSS-MNIST

Mamba-CIFAR-10

Mamba-MNIST

Mega-CIFAR-10

Mega-MNIST

S4-CIFAR-10

S4-MNIST

S5-CIFAR-10

S5-MNIST

such as computer vision [50, 51] and natural language processing [20]. [1] was the first to integrate state-space models from modern control theory with deep learning, initiating extensive research on SSMs within the deep learning community. Early research on SSMs was limited by issues such as the computational complexity of training and the exponential decay of memory [52], which restricted their application. S4 [3] optimized the parameterization scheme of SSMs to reduce the computational requirements for training, while S5 [27] further extended S4's SISO system to a MIMO system. Mamba [20] introduced a selective scanning mechanism to more flexibly adapt to the input, significantly enhancing the performance of SSM models. Additionally, a series of works aimed to integrate SSM models with attention mechanisms [6, 53, 19] to mitigate the flexibility limitations imposed by the inherent fixed structure bias of SSMs.

B.3 Adversrial Robustness of SSM Models

Despite the widespread attention on the superior performance of SSMs, the adversarial robustness of such models has not been thoroughly investigated. This is an urgent issue that needs to be explored before SSMs can be widely applied. To the best of our knowledge, [54] is the only work that has investigated the adversarial robustness of SSMs. This study shows that VMamba is more susceptible to adversarial attacks compared to convolutional networks on 2D image data, indicating that the robustness of SSMs requires more attention. However, this work only studied VMamba in the visual

domain and did not evaluate the sequence modeling robustness of SSMs. Additionally, it lacks a comprehensive evaluation of various SSM structures, and our understanding of the commonalities and characteristics of different SSM structures is still insufficient. More importantly, this study did not provide methods to improve the robustness of SSMs.

C Experimental Details

The specific structures of different SSM architectures on each datasets are shown in Table 3. And the training parameters and details used for each dataset are shown in Table 4. All experiments were implemented on multiple NVIDIA RTX A6000 GPUs.

D Additional Results

In this section, we report additional experimental results, including the ST training process, testing process, and the PGD-10 attack test results on the test datasets of CIFAR-10 and MNIST (Fig. 5), the CA and RA of five SSM structures on Tiny-ImageNet under different adversarial training frameworks (Tab. 5), and the related comparison of results with and without the AdSS mechanism (Tab. 6).

E Limitations

While this paper offers a componential analysis and exploration of SSM performance in AT, with the goal of informing the design of more robust SSM structures, there are several limitations to our study. Due to space constraints, our explorations have been limited to fundamental visual classification tasks. Future research will need to extend this analysis to a wider array of modalities and downstream tasks to fully understand and enhance the robustness of SSMs in diverse applications.

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: All our conclusions and contributions are summarized in the abstract and explained in the 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.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes] ,

Justification: Due to the limited space of the main text, we put the limitations in Appendix E.

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.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: The complete mathematical derivations are provided in the Appendix A. Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: We report all settings and details of the reproducible experiments in Section 3 and Appendix C.

Guidelines:

The answer NA means that the paper does not include experiments.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Guidelines:

The answer NA means that paper does not include experiments requiring code.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/ public/guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https: //nips.cc/public/guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: We report all settings and details of the reproducible experiments in Section 3 and Appendix C.

Guidelines:

The answer NA means that the paper does not include experiments.

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The full details can be provided either with the code, in appendix, or as supplemental material.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [No]

Justification: The adversarial training of multiple models is highly time-consuming, and given the stability of adversarial training results, the necessity for conducting statistical significance tests is deemed unnecessary.

Guidelines:

The answer NA means that the paper does not include experiments.

The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

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.

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: Appendix C of the paper reports the computer resources needed to reproduce the experiments.

Guidelines:

The answer NA means that the paper does not include experiments.

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: The research conducted in the thesis complied with the NeurIPS Code of Ethics in all respects.

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).

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [NA]

Justification: This is an exploratory study on the SSM model and does not address social impacts.

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).

11. 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 poses no such risks.

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 creators or original owners of assets used in the paper, properly credited and the license and terms of use explicitly are mentioned and properly respected.

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.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [NA]

Justification: The paper does not release new assets.

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: The paper does not involve crowdsourcing nor research with human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: The paper does not involve crowdsourcing nor research with human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

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.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper investigates and evaluates the effectiveness of traditional Adversarial Training (AT) methods on recently emerged State Space Models (SSMs). The paper finds that pure SSM is not a suitable choice for AT and attention-based SSM learns the adversarial feature more effectively. Based on such insights, theoretical proof is developed and the Adaptive Scaling is applied to SSM for better robust generalization. The experiments are mainly on MNIST and CIFAR-10.\n\nSTRENGTHS:\n1. The paper is well-written with a clear storyline and a suitable motivation.\n2. The trustworthiness (e.g., robustness, explainability) research for SSM is an important topic and is yet to be fully explored.\n3. The theoretical proof of the generalization bound is clear.\n\nWEAKNESSES:\n1. The evaluation dataset is not sufficiently scaled up to be representative. It would be more convincing if the paper developed similar findings on larger datasets such as CIFAR-100 and Tiny-ImageNet. \n\n2. The involved adversarial training methods lack novelty. While PGD-AT and TRADES are classic AT methods, other representative variants can significantly improve AT efficiency and its robust performance. To name a few, Free-AT [1] substantially improves the training efficiency, and YOPO [2] boosts the robustness with fewer computations. Will SSMs be able to adopt these variants other than classic PGD-AT?\n\n[1] Adversarial Training for Free. NeurIPS 2019.\n\n[2] You Only Propagate Once: Accelerating Adversarial Training via Maximal Principle. NeurIPS 2019.\n\nQUESTIONS:\nPlease address my concerns stated in the weakness section. Given the current version of the submission, I rate it as a borderline rejection considering the lack of sufficient empirical evaluation and the limited novelty of the adversarial training methods. However, I look forward to the authors' response, and I will consider revising the rating based on the soundness of the response.\n\nLIMITATIONS:\nThe paper has stated the limitations in Appendix E.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 5, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-06-25"}

comments: SUMMARY:
This paper investigate the adversarial robustness in deep state space models (SSMs). They provide both empirical and theoretical analysis of the SSMs' performance under the adversarial perturbation. They find that fixed-parameterized SSMs are limited in their adversarial training benefits due to output error bounds strictly tied to their parameters, whereas input-dependent SSMs risk experiencing error explosion.

STRENGTHS:
1. The paper is well organized and easy to follow.
2. The experiments on serval image classification benchmarks are solid and comprehensive.
3. The theory analysis and visualization is helpful.

WEAKNESSES:
1. Tested dataset size is small.
2. Better to add a result of without AdS in Table 2 so we can better observe the improvement.
3. Lack of analysis why different activation function in AdS influence performance.

QUESTIONS:
1. Have you tested proposed AdS performance on larger dataset (e.g, ImageNet-1k, ImageNet-tiny)?
2. The proposed AdS is more like a naive try. Is that possible to propose a new SSM architecture based your observation?

LIMITATIONS:
See weaknesses and questions.
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2024-07-12

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper presents a comprehensive analysis of the adversarial robustness of Deep State Space Models (SSMs). The authors evaluate various SSM structures under different adversarial training (AT) frameworks, specifically examining how different components contribute to adversarial robustness. They observe that pure SSM structures struggle to benefit from AT, while the incorporation of attention mechanisms yields better trade-offs between robustness and generalization, albeit with the introduction of robust overfitting issues. The authors provide theoretical and empirical analyses to explain these phenomena and propose a simple Adaptive Scaling (AdS) mechanism to enhance SSM performance in AT.\n\nSTRENGTHS:\n- Originality: The paper addresses an important and under-explored area in the intersection of SSMs (that have become very prominent recently, both for text and vision) and adversarial robustness. It provides novel insights into how different SSM components behave under adversarial attacks and training, including important observations about robust overfitting.\n- Quality: The work demonstrates high-quality research through its comprehensive empirical evaluations and some theoretical analysis. The authors conduct thorough comparisons across various SSM structures and AT frameworks.\n- Clarity: The paper is well-structured and clearly written. The authors present their methodology, results, and analyses in a logical and easy-to-follow manner. \n- Significance: This work makes significant contributions to understanding the adversarial robustness of SSMs, which is crucial given the increasing popularity of these models. The proposed AdS mechanism offers a practical solution to improve SSM robustness without incurring the drawbacks of attention mechanisms.\n- Relation to previous works: The most related previous work is [10] which has conducted only preliminary robustness evaluations on visual SSMs (only VMamba architecture).\n\nWEAKNESSES:\n- I don’t quite understand the claim about robust overfitting: based on Table 1, using AutoAttack, the “Diff” is always very small, almost always <1%. Why is there robust overfitting then?\n- Limited scope of experiments: While the paper provides comprehensive evaluations on MNIST and CIFAR-10 datasets, it lacks experiments on more complex datasets (e.g., at least Tiny ImageNet or some dataset with a higher image resolution) or real-world scenarios. This limitation somewhat restricts the generalizability of the findings.\n- [Less important] Comparison with non-SSM models: The paper focuses exclusively on SSM variants without comparing their adversarial robustness to other popular model architectures like CNNs or Transformers. Such comparisons could provide valuable context for the robustness of SSMs relative to other widely-used architectures.\n\nI would be willing to increase the score if the first 2 points are addressed.\n\nQUESTIONS:\n- It’s a bit surprising to see that PGD-AT doesn’t work on MNIST (according to AutoAttack), while TRADES does. Were the hyperparameters properly tuned?\n- Have you considered exploring the interaction between SSM robustness and other aspects of model design, such as depth or width of the network?\n\nLIMITATIONS:\nYes.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-07-21"}