Year: 2021

Abstract:
Due to numerous breakthroughs in real-world applications brought by machine intelligence, deep neural networks (DNNs) are widely employed in critical applications. However, predictions of DNNs are easily manipulated with imperceptible adversarial perturbations, which impedes the further deployment of DNNs and may result in profound security and privacy implications. By incorporating adversarial samples into the training data pool, adversarial training is the strongest principled strategy against various adversarial attacks among all sorts of defense methods. Recent works mainly focus on developing a new loss function or regularizers, attempting to find the unique optimal point in the weight space. But none of them taps the potentials of classifiers obtained from standard adversarial training, especially states on the searching trajectory of training. In this work, we are dedicated to the weight states of models through the training process and devise a simple but powerful Self-Ensemble Adversarial Training (SEAT) method for yielding a robust classifier by averaging weights of history models. That considerably improves the robustness of the target model against several state-of-the-art adversarial attacks, even merely utilizing the naive cross-entropy loss to supervise. We also discuss the relationship between an ensemble of predictions of different adversarially trained models and the prediction of weight-ensembled models, as well as provide theoretical and empirical evidence that the proposed self-ensemble method provides a smoother loss landscape and better robustness than both individual models and an ensemble of predictions from different classifiers. We further analyze a subtle but fatal issue in the general settings for the self-ensemble model, which causes the deterioration of the weight-ensembled method in the late phases.

heading: 1 INTRODUCTION
text: Deep learning techniques have showed promise in disciplines such as computer vision (Krizhevsky et al., 2012; He et al., 2016), natural language processing (Vaswani et al., 2017; Devlin et al., 2019), speech recognition (DBL, 2012; Sak et al., 2015) and even in protein structural modeling (Si & Yan, 2021; Jumper et al., 2021). However, even for those efforts surpassing human-level performance in several fields (Jia et al., 2021; Gleave et al., 2020; Xu et al., 2019; 2018b; Wang et al., 2020a), deep learning based methods are vulnerable to adversarial examples generated by adding small adversarial perturbations to natural examples (Szegedy et al., 2014; Goodfellow et al., 2015).
Following the discovery of this adversarial vulnerability, numerous defense approaches for protecting DNNs from adversarial attacks have been proposed (Xu et al., 2018a; Liao et al., 2018; Qin et al., 2020; Papernot et al., 2016; Ross & Doshi-Velez, 2018). Because it is a straightforward and effective data-driven strategy, among these methods, adversarial training has become the de-facto way for strengthening the robustness of neural networks. The core of adversarial training is proactively inducing a robust model by forcing DNNs to learn adversarial examples generated from the current model, which helps DNNs gradually make up for their deficiencies. Therefore, it is a practical learning framework to alleviate the impact of adversarial attacks.
As a saying goes, a person may go faster but a team can go farther. An ensemble of classifiers fused by output aggregates the collective wisdom of all participated classifiers, which outperform the decision made by a single classifier. Many ensemble methods (Tramèr et al., 2018; Pang et al., 2019; Kurakin et al., 2018) have shown their abilities to boost adversarial robustness. Despite averaged predictions of different models enables the aggregation against a large number of attacks, it is still a heavy computing burden to adversarially train all the member models. What is worse, the architectures and parameters of every member model, as well as their related contribution factors, should be safely
saved and need performing forward propagation for every member repeatedly, which is a nightmare when dealing with massive components. Despite the fact that the ensemble technique adopts a variety of architectures and parameters, these models may have similar decision-making boundaries (Tramèr et al., 2017). Therefore, it is natural to wonder: Could we develop the potential of the classifier itself to build a robust model rather than rely on multiple seemingly disparate classifiers? Could we make use of states on the searching trajectory of optimization when performing adversarial training? Motivated by these questions, we discuss the relationship between an ensemble of different classifiers fused by predictions and by parameters, and present a computation-friendly self-ensemble method named SEAT. In summary, this paper has the following contributions:
• By rethinking the standard adversarial training and its variants, instead of developing a well-designed loss to find a single optimal in the weight space, we design an efficient algorithm called Self-Ensemble Adversarial Training (SEAT) by uniting states of every history model on the optimization trajectory through the process of adversarial training. Unlike the traditional ensemble technique, which is extremely time-consuming and repeating adversarial training procedures for individuals, SEAT simply requires training once.
• We present a theoretical explanation of the differences between the two ensemble approaches discussed above and visualize the change of loss landscape caused by SEAT. Furthermore, while using data augmentation of external data can experimentally fix the deterioration during the late stages (Gowal et al., 2020; Rebuffi et al., 2021), we further investigate a subtle but fatal intrinsic issue in the general settings for the self-ensemble model, which causes the deterioration of the weight-ensembled method.
• We thoroughly compare adversarial robustness of SEAT with other models trained by the state-of-the-art techniques against several attack methods on CIFAR-10 and CIFAR-100 datasets. Results have shown that the SEAT method itself can efficiently search in the weight space and significantly improve adversarial robustness.

heading: 2 REVIEW: STANDARD ADVERSARIAL TRAINING AND ITS SUCCESSORS
text: In this section, we first introduce basic concepts of adversarial training. Then we briefly review some variants and enhancements of standard adversarial training.

heading: 2.1 PRELIMINARIES
text: Consider a standard image task which involves classifying an input image into one of K classes, let x ∈ [0, 1]n denote the input natural image and y ∈ {1, 2, . . . ,K} be the ground truth label, sampled from a distribution D. For adversarial attack, the goal of the adversary is to seek a malignant example in the vicinity of x, by adding a human imperceptible perturbation ε ∈ Rn. To exactly describe the meaning of “imperceptible”, this neighbor region Bε(x) anchored at x with apothem ε can be defined as Bε(x) = {(x′, y) ∈ D | ‖x− x′‖ ≤ ε}. We also define a loss function: ` def = Θ × D → [0,∞), which is usually positive, bounded, and upper-semi continuous (Blanchet & Murthy, 2019; Villani, 2003; Bartlett & Mendelson, 2001) for all θ ∈ Θ. Instead of the original formulation of adversarial training (Szegedy et al., 2014; Goodfellow et al., 2015), which mixes natural examples x and adversarial examples x′ together to train models, the adversarial risk minimization problem can be formulated as a two-player game that writes as below:
inf θ∈Θ E(x,y)∼D︸ ︷︷ ︸ Outer minimization sup x′∈Bε(x) ` (θ;x′, y)︸ ︷︷ ︸ Inner maximization . (1)
In general, the adversary player iteratively computes more and more harmful perturbations step by step, where the PGD method (Madry et al., 2018) is commonly applied:
xt+1 = ΠB(x, ) ( xt + κ sign (∇x`(x, y)) ) , (2)
where κ is the step size and the generated samples at each iteration will be projected back to the Bε(x). When finding x′ at their current optimal in the inner maximization, the model parameters will be updated according to these fixed samples only in the outer minimization.

heading: 2.2 RELATED WORK
text: Emerging adversarial training methods are primarily concerned with strengthening their robustness through empirical defense. Here we roughly separate these improvements into two categories: (1) sample-oriented (i.e. for x′ in the inner maximization) and (2) loss-oriented (i.e. for ` in the outer minimization) improvement.
From the side of the former, Baluja & Fischer (2017) utilize a GAN framework to create adversarial examples via the generative model while FAT (Zhang et al., 2020) proposes a PGD-based method which control the length of searching trajectories of PGD through the lens of geometry.
For the latter, a stream of works have been carried out with the goal of establishing a new supervised loss for better optimization. Usually, the loss ` in the both inner maximization and outer minimization1 are cross-entropy (Good, 1956) defined as: `ce = −yT log q when given the probability vector q = [efθ(x ′)1 , · · · , efθ(x′)c ]/ ∑c k=1 e fθ(x ′)k . The addition of a regularizer to the vanilla loss is one branch of the modification. Representative works like ALP (Kannan et al., 2018), TRADES (Zhang et al., 2019), and VAT (Miyato et al., 2019) introduce a regularization term to smooth the gap between the probability output of natural examples and adversarial ones, which can be denoted as:
`reg = `ce + η ∑
(xi,yi)∼B
R(p(θ;x′i, yi), p(θ;xi, yi)), (3)
where η is the regularization hyper-parameter and R(·, ·) is l2 distance for ALP and VAT2, and Kullback-Leibler divergence for TRADES. B stands for the sampled minibatch. Another branch of the loss modification is to reweight the contributions of each instance in the minibatch based on their intrinsic characteristics. This can be formulated by:
`rew = ∑
(xi,yi)∼B
w(θ;xi, x ′ i, yi)`ce (θ;xi, x ′ i, yi) , (4)
where w(·) is a real-valued function mapping the input instances to an importance score. MMA (Ding et al., 2020) separately considers the correct and incorrect classification on natural cases and switches between them by learning a hard importance weight:
`MMA = ∑
(xi,yi)∼B
w1(θ;xi, yi)`ce (θ;xi, yi) + w2(θ;xi, yi)`ce (θ;x ′ i, yi) , (5)
where w1 and w2 are the indicator function 1 (fθ (xi) 6= yi) and 1 (fθ (xi) = yi), respectively. Inspired by the geometry concern of FAT, GAIRAT (Zhang et al., 2021) evaluates w(θ;x, y) = (1 + tanh(c1 − 10c2 + 5))/2 to adaptively control the contribution of different instances by their corresponding geometric distance of PGD, where c1 is a hyper-parameter and c2 is the ratio of the minimum successful iteration numbers of PGD to the maximum iteration step. Embracing both two schools of improvement, MART (Wang et al., 2020b) adds a new regularization term apart from KL divergence and explicitly assigns weights within regularizers:
`MART = `ce + ∑
(xi,yi)∼B
w(θ;xi, yi)RKL(p(θ;x′i, yi), p(θ;xi, yi)) +Rmag(p(θ;x′i, yi)), (6)
whereRKL is Kullback-Leibler divergence same as TRADES and wi = (1− p(θ;xi, yi)) is a softer scheme when compared with MMA. The margin termRmag = − log (1−maxk 6=yi pk (θ;x′i, yi)) aims at improving the decision boundary.
The above methods endeavor to solve the highly non-convex and non-concave optimization in Eqn 1. However, they assume that the optimal weights of a classifier appear in its prime and abandon all the states along the route of optimization, which are beneficial to approach the optimal.

heading: 3 METHODOLOGY
text: In this section, we first discuss the traditional ensemble methods based on predictions of several individual classifiers. Then, we propose a Self-ensemble Adversarial Training (SEAT) strategy fusing
1For simplification, here we ignore the implemented difference of loss in the inner maximization and the outer minimization (e.g. TRADES and MMA). The reference of ` can be contextually inferred easily.
2For VAT, θ in the first term and the second term are different.
Algorithm 1 Self-Ensemble Adversarial Training (SEAT) Input: A DNN classifier fθ(·) with initial learnable parameters θ0 and loss function `; data distribution D; number of iterations N ; number of adversarial attack steps K; magnitude of perturbation ε; step size κ; learning rate τ ; exponential decay rates for ensembling α; constant factor c. Initialize θ ← θ0, θ̃ ← θ. for t← 1, 2, · · · , N do
Sample a minibatch (x, y) from data distribution D x′0 ← x+ ε, ε ∼ Uniform(−ε, ε). for k← 1, 2, · · · ,K do
x′k ← Πx′k∈Bε(x) ( κ sign ( x′k−1 +∇x′k−1`(θ; (x ′ k, y)) )) end for gθt ← E(x,y) [∇θt`(θt; (x′k, y))] in every minibatch Calculate τt according to the current iterations θt ← θt − τtgθt α′ ← min ( α, t
t+c ) θ̃ ← α′θ̃ + (1− α′)θt
end for Return A self-ensemble adversarial training model fθ̃(·)
weights of individual models during different periods, which is both intrinsically and computationally convenient. Following that, we further provide theoretical and empirical analysis on why the prediction of such an algorithm can make a great difference from that of simple ensembling classifiers.

heading: 3.1 PREDICTION-ORIENTED ENSEMBLE
text: Ensemble methods are usually effective to enhance the performance (Hansen & Salamon, 1990; Caruana et al., 2004; Russakovsky et al., 2015; Garipov et al., 2018) and improve the robustness (Tramèr et al., 2018; Pang et al., 2019; Gowal et al., 2020; Rebuffi et al., 2021). For clarity, we denote F as a pool of candidate models where F = {fθ1 , · · · , fθn}. To represent the scalar output of the averaged prediction of candidate classifiers over K categories, we define the averaged prediction f̄ involving all candidates in the pool F as:
f̄F (x, y) = n∑ i=1 βifθi(x, y)
s.t. n∑ i=1 βi = 1,
(7)
where β represents the normalized contribution score allotted to the candidates. It is logical to assume that ∀βi > 0 since each candidate model must be well-trained, otherwise it will be expelled from the list. Note that here we only discuss whether the participated model performs well on its own, not whether it has a positive impact on the collective decision making, which is a belated action.

heading: 3.2 SELF-ENSEMBLE ADVERSARIAL TRAINING
text: In order to average weights of a model, it is natural to choose an analogous form as Eqn 7 to obtain the predicted weights: θ̃ = ∑T t=1 βtθt, s.t. ∑T t=1 βt = 1. However, such a simple moving average cannot keenly capture the latest change, lagging behind the latest states by half the sample width. To address this problem, we calculate the optimal weights by characterizing the trajectory of the weights state as an exponential moving average (EMA) for measuring trend directions over a period of time. Intuitively, EMA not only utilizes recent proposals from the current SGD optimization but also maintains some influence from previous weight states:
θ̃ = αθ̃T + (1− α)θT = (1− α) [ θT + αθT−1 + . . .+ α T−1θ0 ] (8)
Because α is usually assigned to a value approaching 1, it is clear that EMA places a greater weight and significance on the most recent weight states. Algorithm1 summarizes the full algorithm.
In consideration of both using the moving average technique, we wonder whether the averaged prediction has a link to the prediction of a weight-averaged model. In fact, they are indeed related to each other to some extent: Proposition 1. (Proof in Appendix B) Let fθ (·) denote the predictions of a neural network parametrized by weights θ. Assuming that ∀θ ∈ Θ, fθ (·) is continuous and ∀(x, y) ∈ D, fθ(x, y) is at least twice differentiable. Consider two points θt, θ̃ ∈ Θ in the weight space and let ξ = θt−θ̃, for t ∈ {1, 2, · · · , T}, the difference between f̄F (x, y) and fθ̃(x, y) is of the second order of smallness if and only if ∑T t=1(βtξ T) = 0.
Based on Proposition 1, we could immediately obtain the below conclusions: Remark 1. Note that it always constructs ensembles of the well-matched enhanced networks to obtain stronger defense, so it evenly assigns β1 = β2 = · · · = βn = 1/n. However, things change in the selfensemble setting since models obtained at relatively late stages will be much robust than the beginning. Based on this assumption, it has a non-increasing sequence β1 ≤ β2 ≤ · · · ≤ βn, s.t. ∑n i=1 βi = 1. The inequality is tight only when the initial weight reaches its fixed point.
In this case, the averaged prediction will predispose to the models obtained at the end of optimization and such a predisposition loses the superiority of ensemble due to the phenomenon of homogenization in the late phases. To provide an empirical evidence of homogenization of models at latter periods, we visualize the effect of homogenization along the training process in Figure 1a. We define the homogenization of a model as: 4e = 1||D|| mini∈[1,m] |fθe(x, y)− fθe−i(x, y)|, used for calculating the difference of the output of history models over a period of time m. Note that4e becomes smaller and smaller along with epochs passing, which proves the existence of homogenization.
0.0
0.2
0.4
0.6
0.8
1.0
0 20 40 60 80 100 120
Δ
Epochs
SEAT AT
(a) The effect of homogenization of models.
0 10 20 30 40 50 60 70 80 90
100
0 20 40 60 80 100 120
A cc
ur ac
y Ra
te (%
)
Epochs
NAT Acc (AT) NAT Acc (SEAT) PGD20 Acc (AT) PGD20 Acc (SEAT) CW Acc (AT) CW Acc (SEAT) AA Acc (AT) AA Acc (SEAT)
(b) Robust accuracy of parameter-averaged ResNet18 against various attacks on CIFAR-10.
Figure 1: The overall analyse of AT and SEAT.
Here we formally state the gap between such an averaged prediction and the prediction given by SEAT in the following theorem: Theorem 1. (Proof in Appendix B) Assuming that for i, j ∈ {1, · · · , T}, θi = θj if and only if i = j. The difference between the averaged prediction of multiple networks and the prediction of SEAT is of the second order of smallness if and only if βi = (1− α)αi−1 for i ∈ {1, 2, · · · , T}.
Theorem 1 tells us that it is much harder for SEAT to approximate the averaged prediction of history networks than the vanilla EMA method. So the prediction of SEAT keeps away from the averaged prediction of models, which suffers from homogenization. To ensure whether the difference in Theorem 1 is benign, we provide empirical evidence of the improvement of the self-ensemble technique on the loss landscape.
It is difficult for the traditional 1D linear interpolation method to visualize non-convexities (Goodfellow & Vinyals, 2015) and biases caused by invariance symmetries (e.g. batch normalization) in the DNN. (Li et al., 2018) addresses these challenges, providing a scheme called filter normalization to explore the sharpness/flatness of DNNs on the loss landscape. Let v1 and v2 are two random direction vectors sampled from a random Gaussian distribution. So we plot the value of loss function around θ when inputting data samples:
L(θ;v1,v2) = ` (θ +mv1 + nv2;x, y) , (9)
1e 36
where m = ‖θ‖‖v1‖ , n = ‖θ‖ ‖v2‖ , and ‖·‖ denotes the Frobenius norm. Specifically, we apply the method to plot the surface of DNN within the 3D projected space. We visualize the loss values of ResNet18 on the testing dataset of CIFAR-10 in Figure 2. Each grid point in the x-axis represents a sampled gradient direction tuple (v1,v2). It is clear that SEAT has a smooth and slowly varying loss function while the standard adversarially trained model visually has a sharper minimum with higher test error.
Safeguard for the Initial Stage: During the initial training period, the history models are less instrumental since they are not adequately learned. Therefore, it is not wise to directly make use of the ensembled weights, which may accumulate some naive weight states and do harm to approach the oracle. Therefore, we apply the protection mechanism for novice models at the beginning, denoted as α′ = min ( α, ii+c ) , where c is a constant factor controlling the length of warm-up periods for history models.

heading: 3.3 DETERIORATION: THE DEVIL IN THE LEARNING RATE
text: Having provided both theoretical and experimental support as well as a clear procedure of SEAT algorithm, we may take it for granted that this self-ensemble method could be integrated into the routine working flow as an off-shelf technique. But it is not the case.
As shown in Figure 2b and 2c, while the two self-ensemble models have almost nearly identical settings, their loss landscapes are completely different (quantitative results can be referred to Appendix A.4). Despite the fact that the landscape of deteriorated SEAT is a little mild than the standard adversarially trained model, it is still extremely steep when compared with SEAT. This phenomenon about deterioration is also discovered by (Rebuffi et al., 2021). They combine model weight averaging with data augmentation and external data to handle the deterioration. The intention behind such a solution is robust overfitting (Rice et al., 2020) of individuals. However, it is unclear why an ensemble model assembled from overfitting individuals performs poorly, while inferior models can still be aggregated to produce a superior one in the middle of training stages. In the rest of this section, we provide another solution from a quite new perspective: the strategy of learning rate.
Proposition 2. (Proof in Appendix B) Assuming that every candidate classifier is updated by SGDlike strategy, meaning θt+1 = θt − τt∇θtfθt(x′, y) with τ1 ≥ τ2 ≥ · · · ≥ τT > 0, the self-ensemble model will inevitably worsen and the degree depends on learning rate schedules.
As illustrated in Figure 1a, we note that the phenomenon of homogenization exacerbates after each tipping point (e.g. Epoch 76, 91 and 111) when using the staircase strategy of learning rate. Combined with the trend of robust accuracy in Figure 1b, the result demonstrates that there exists a certain learning rate τt′ , the self-ensemble model cannot gain any benefits when the current learning rate drops below this bar.

heading: 4 EXPERIMENTAL RESULTS
text: In this section, we first conduct a set of experiments to verify the advantages of the proposed method. Then, we investigate how each component of SEAT functions and how it affects robust accuracy.

heading: 4.1 EXPERIMENTAL SETUP
text: We mainly use ResNet18 and WRN-32-10 (Zagoruyko & Komodakis, 2016) for the experiments on CIFAR-10/CIFAR-100 and all images are normalized into [0, 1]. For simplicity, we only report the results based on L∞ norm for the non-targeted attack. We train ResNet18 using SGD with 0.9 momentum for 120 epochs and the weight decay factor is set to 3.5e−3 for ResNet18 and 7e−4 for WRN-32-10. For SEAT, we use the piecewise linear learning rate schedule instead of the staircase one based on Proposition 2. The initial learning rate for ResNet18 is set to 0.01 and 0.1 for WRN-32-10 till Epoch 40 and then linearly reduced to 0.001, 0.0001 and 0.01, 0.001 at Epoch 60 and 120, respectively. The magnitude of maximum perturbation at each pixel is ε = 8/255 with step size κ = 2/255 and the PGD steps number in the inner maximization is 10. To evaluate adversarial defense methods, we apply several adversarial attacks including PGD (Madry et al., 2018), MIM (Dong et al., 2018), CW (Carlini & Wagner, 2017) and AutoAttack (AA) (Croce & Hein, 2020). We mainly compare the following defense methods in our experiments:
• TRADES, MART, FAT and GAIRAT: For TRADES and MART, we follow the official implementation of MART3 to train both two models for better robustness. The hyperparameter η of both TRADES and MART is set to 6.0. The learning rate is divided by 10 at Epoch 75, 90, 100 for ResNet18 and at 75, 90, 110 for WRN-32-10, respectively. For FAT and GAIRAT, we completely comply with the official implementation4 to report results.
• PoE: We also perform the experiments on the Prediction-oriented Ensemble method (PoE). We select the above four advanced models as the candidate models. When averaging the output of these models, we assign different weights to individuals according to their robust accuracy. Specifically we respectively fix β1,2,3,4 = 0.1, 0.2, 0.3, 0.4 for FAT, GAIRAT, TRADES, and MART, named PoE. Considering the poor robust performance of FAT and GAIRAT, we also provide the PoE result by averaging the outputs of TRADES trained with λ = 1, 2, 4, 6, 8 and assign the same β to them, named PoE (TRADES).
• CutMix (with WA): Based on the experimental results of Rebuffi et al. (2021), Cutmix with a fixed window size achieves the best robust accuracy. We follow this setting and set the window size to 20. Since we do not have matched computational resources with Deepmind, we only train models for 120 epochs with a batch size of 128 rather than 400 epochs with a batch size of 512. Besides, we neither use Swish/SiLU activation functions (Hendrycks & Gimpel, 2016) nor introduce external data and samples crafted by generative models (Brock et al., 2019; Ho et al., 2020; Child, 2021) for fair comparison.

heading: 4.2 ROBUSTNESS EVALUATION OF SEAT
text: In this section, we fully verify the effectiveness of the SEAT method. We report both average accuracy rates and standard deviations. All results in Tables 1 and 2 are computed with 5 individual trials. Results on ResNet18 are summarized in Table 1. Here, we mainly report the results on the CIFAR-10 dataset due to the space limitation. For the results on CIFAR-100, please refer to Appendix A.2. From the table, we can see that the superiority of SEAT is apparent especially considering we only use candidate models supervised by the traditional cross-entropy loss without external data. Compared with two advanced loss-oriented methods (TRADES and MART), the results of SEAT are at least ∼ 2% better than TRADES and MART against CW and AA. We further emphasize that although the boost of SEAT regarding PGD attacks is slight when compared with GAIRAT, SEAT achieves startling robust accuracy results when facing CW and AA attacks. Note that AA is an ensemble of various advanced attacks (the performance under each component of AA can be found in Appendix A.1) and thus the robust accuracy of AA reliably reflects the adversarial robustness, which indicates that the robustness improvement of SEAT is not biased. It’s worth noting that PoE is unexpectedly much weaker in defending AA attack even than its members. We guess the poor performance of FAT and GAIRAT encumber the collective though we appropriately lower the contribution score of them. If we switch to an ensemble of the outputs of TRADES with different λs, the performance will be slightly improved. That demonstrates that the robustness of every candidate model will affect the performance of the ensemble. The negligible computational burden estimated in Appendix A.5 also demonstrates the superiority of our on-the-fly parameter-averaged method of SEAT.
We also evaluate the SEAT method on WRN-32-10. Results are shown in Table 2. We notice that the superiority of SEAT appears to be enhanced when using WRN-32-10. The gap between SEAT
3https://github.com/YisenWang/MART 4https://github.com/zjfheart/Geometry-aware-Instance-reweighted-Adversarial-Training
and advanced defense methods enlarges to at least ∼ 4%. In the setting with data augmentation, when compared with the results of ResNet18, SEAT combined with CutMix gains much higher performance on robust accuracy against several attacks as the model becomes larger. The observation given by (Rebuffi et al., 2021) shows that additional generated data would overload the model with low capacity. When it comes to ours, we can further infer from a marginal and even a negative effect shown in Table 1 that the model with low capacity cannot benefit from both external and internal generated data. This phenomenon springs from the fact that CutMix techniques tend to produce augmented views that are far away from the original image they augment, which means that they are a little hard for small neural networks to learn.

heading: 4.3 ABLATION STUDY
text: In this section, we perform several ablation experiments to investigate how different aspects of SEAT influence its effectiveness. If not specified otherwise, the experiments are conducted on CIFAR-10 using ResNet18.
0
10
20
30
40
50
60
70
80
90
100
0 20 40 60 80 100 120
A cc
ur ac
y Ra
te (%
)
Epochs
NAT (Staircase) PGD20 (Staircase) NAT_SEAT (Staircase) PGD20_SEAT (Staircase) NAT (Cosine) PGD20 (Cosine) NAT_SEAT (Cosine) PGD20_SEAT (Cosine) NAT (Linear) PGD20 (Linear) NAT_SEAT (Linear) PGD20_SEAT (Linear) NAT (Cyclic) PGD20 (Cyclic) NAT_SEAT (Cyclic) PGD20_SEAT (Cyclic) NAT (Warmup) PGD20 (Warmup) NAT_SEAT (Warmup) PGD20_SEAT (Warmup)
(a) Different learning rate strategies
0 10 20 30 40 50 60 70 80 90
100
0 20 40 60 80 100 120
A cc
ur ac
y Ra
te (%
)
Epochs
NAT (Epoch) PGD20 (Epoch) NAT (Iteration) PGD20 (Iteration)
(b) Epoch v.s. Iteration
0 10 20 30 40 50 60 70 80 90
100
0 5 10 100 1000 10000
A cc
ur ac
y R
at e
(% )
c
NAT PGD20 PGD100 MIM CW AA
(c) Length of initial safeguard
Figure 3: The overall ablation study of SEAT. The dashed line represents the natural accuracy while the solid line represents the robust accuracy.
Different Learning Rate Strategies. The staircase learning rate technique is always applied to update weights in commonly used neural networks, which τ remains unchanged within the specific
epochs and suddenly decreases to a certain value at some points. We also have the cosine, cyclic, and warming up learning rate schedules to compare with, in addition to the staircase and piecewise linear one deployed to SEAT. Figure 3a depicts the results of this experiment using various learning rate methodologies. The natural accuracy under various learning rate schedules is reported by the top dashed lines, which all grow gradually over time. After reaching their maxima, the relative bottom solid lines fall more or less. Quantitative Results of above five strategies from best checkpoints are shown in Appendix A.3. However, it can be observed that the red line (piecewise linear) and the blue line (cosine) decrease more slowly than the orange line (staircase) and they achieve higher robust accuracy at much later epochs than the staircase. Apparently, the piecewise linear strategy makes τ approach the threshold τt′ at a slow pace while the cosine one increases the valid candidate models that can make contributions. Likewise, the cyclic strategy gets better robust accuracy and further improves the performance in the late stage. But the effect of warming up learning rate is marginal since the homogenization of the candidate models we mentioned in Sec. 3.2 cannot be fixed by the warmup strategy. These facts bear out Proposition 2 from the side.
Epoch-based v.s. Iteration-based Ensembling. Next, we investigate whether the frequency of ensembling has a great effect on the robustness of the collective. Specifically, we select two scenarios to compare with. One is an epoch-based ensemble that only gathers the updated models after traversing the whole training dataset. The other is an iteration-based ensemble collecting models whenever SGD functions. Comparison between the epoch-based and the iteration-based ensembling is shown in Figure 3b. It can be seen that the curves of both two schemes are nearly the same in their prime except that the iteration-based method has a slightly greater natural accuracy and degrades more slowly.
Influence of the Initial Safeguard. We also study the effect of the length of the initial safeguard. We plot all results against different kinds of attacks with c ranging from 0 to 10000 (i.e. Epoch 32). The curves in Figure 3c show that the model ensembled with large c, which ignores more history models, results in weaker memorization and poor robustness. Actually, from the perspective of Proposition 2, t′ is fixed if the scheme of learning rate updating and the total training epochs are unchanged. So using a large c is equivalent to squeeze the number of benign candidates before t′. Similarly, a small c can manually filter the early models without being well trained. However, such a drop is minor because EMA has a built-in mechanism for adjusting.
Mixed Strategies with SEAT for Improved Robustness. Finally, we report the results under different mixed strategies on CIFAR-10 dataset with ResNet18 in Table 3. Overall, SEAT+TRADES and SEAT+TRADES+CutMix do not perform well. We believe the reason is that TRADES cannot well adapt to learning strategies other than the staircase one for its history snapshots of TRADES trained under other strategies are much inferior than the ones trained under the staircase learning rate strategy. However, MART is in harmony with other strategies. The combination of SEAT+MART+CutMix achieves the best or the second-best robustness against almost all types of attacks.

heading: 5 CONCLUSION
text: In this paper, we propose a simple but powerful method called Self-Ensemble Adversarial Training (SEAT), which unites states of every history model on the optimization trajectory through the process of adversarial training. Compared with the standard ensemble method, SEAT only needs training once and has a better reusability. Besides, we give a theoretical explanation of the difference between the above two ensemble methods and visualize the change of loss landscape caused by SEAT. Furthermore, we analyze a subtle but fatal intrinsic issue in the learning rate strategy for the self-ensemble model, which causes the deterioration of the weight-ensembled method. Extensive experiments validate the effectiveness of the proposed SEAT method.

Review summaries:
The authors of the paper propose a new method for improving the robustness of a model against adversarial attacks. If I understood correctly, the proposed method is a combination of both adversarial training and model ensembling, where in this instance the ensembling is performed by maintaining a moving average of the weights of the model at past time steps.   In addition to some providing some theorems concerning their proposed method, the authors empirically show that the trained SEAT models are competitive with current methods for improving the adversarial robustness of the method.

This work proposes Self-Ensemble Adversarial Training (SEAT), which utilizes the states of history models during training to efficiently improve the adversarial robustness. The reusing of historical states in the self-ensemble can save computation costs in contrast to previous ensemble methods that usually train several individuals separately. Theoretical analysis is also performed to explain the new self-ensemble method.

This paper proposes the Self-Ensemble Adversarial Training (SEAT) which averages weights of history models for robustness. Compared to individual models or an ensemble of predictions from different classifiers, they argue that the proposed self-ensemble method provides a smoother loss landscape and better robustness. They also shed light on the deterioration of general self-ensemble models because of learning rates in the late phases.