Next Article in Journal
Float32-Induced Distortion in Activation Patching: Precision Floors and Displacement-Dependent Endpoint-Curvature Error
Previous Article in Journal
GuidelineGuard: An Agentic Retrieval-Augmented Generation Framework with Sentence-Level Citation Auditing for Guideline-Grounded Question Answering
Previous Article in Special Issue
Reliability-Aware Gaussian Residual Counterpart Generation for Robust Multi-View Clustering with Noisy Correspondence
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Generalization of Defense Effects Learned from a Single Adversarial Attack

Department of Computer Science, Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650500, China
*
Author to whom correspondence should be addressed.
Computation 2026, 14(9), 211; https://doi.org/10.3390/computation14090211
Submission received: 18 July 2026 / Revised: 31 August 2026 / Accepted: 7 September 2026 / Published: 9 September 2026
(This article belongs to the Special Issue Computational Methods for Multi-View Representation Learning)

Abstract

Adversarial attacks misled deep neural networks by injecting perturbations into input images. Training networks with adversarial examples defended against adversarial attacks. However, training with specific adversarial examples only defended against the corresponding attacks. To generalize the defense effect from one specific attack to other attacks, we proposed a method called Gradient Vicinity Adversarial Training (GVAT), which generated adversarial examples along directions sampled in the vicinity of the gradient. The defense effects of GVAT were evaluated using three attack methods: fast gradient sign method (FGSM), projected gradient descent (PGD), and Carlini–Wagner (CW) under the L 2 -norm constraint. A three-layer convolutional network was trained on the MNIST dataset, and two WideResNet-28-10 networks were trained on the CIFAR-10 and CIFAR-100 datasets respectively. Under the transfer-based black-box setting, the results showed that GVAT not only defended against the corresponding attacks that generated adversarial examples but also defended against other attacks. In other words, the defense effect of GVAT was generalized to other attacks under the transfer-based black-box setting.

Graphical Abstract

1. Introduction

Deep neural networks achieved remarkable progress in a wide range of tasks and were widely applied to tasks such as image classification [1,2], autonomous driving [3,4], and speech recognition [5,6].
However, previous studies had shown that deep neural networks were vulnerable to adversarial examples. Szegedy et al. [7] first noticed that carefully crafted imperceptible perturbations added to input images could mislead models into making incorrect predictions. The perturbations referred to the input modifications added to the original example. Such perturbations were typically generated along the gradient direction that maximized the attack’s effectiveness. The direction of the gradient was given by the gradient of the attack objective with respect to the input [8].
In autonomous driving systems, adversarial examples induced erroneous results in route-planning and control modules, posing potential threats to traffic safety [9]. In voice assistant systems, adversarial examples were designed to be perceived by humans as noise or unintelligible speech, yet still be interpreted by the system as valid commands and executed, allowing for the injection of covert commands through seemingly benign inputs [10].
Adversarial examples motivated research on enhancing the defense capacity of models against adversarial attacks. Input preprocessing [11,12] and random noise injection [13,14,15] aimed to mitigate the impact of perturbations by attenuating or disrupting them at the input level. In contrast, adversarial training [16] incorporated both original clean examples and adversarial examples into the training process, enabling the model to learn more stable discriminative features under perturbed inputs.
Many adversarial training methods were designed for specific types of perturbations, for example, by generating adversarial examples under one or more L p -norm constraints for training [17]. Adversarial training could enhance models’ defense capability against adversarial examples used during training. However, this improvement did not necessarily generalize well to adversarial examples not used during training [18,19].
In this paper, adversarial examples generated by attack types or norm constraints that were not used during training were referred to as adversarial examples not used for training. Defense capability might even decline when faced with these adversarial examples [20,21]. This raised the central question addressed in this paper: how to improve the defense capabilities of adversarially trained models against adversarial examples not used during training under a transfer-based black-box setting.
Recent studies also investigated transfer-based black-box robustness. Nowroozi et al. [22] proposed a random deep feature selection approach to mitigate transferable adversarial attacks across models. Wong et al. [23] suggested that the effectiveness of adversarial training was not determined solely by attack strength. It also depended on whether the adversarial examples used during training were sufficiently diverse to represent the range of attacks within the considered threat model [24].
Gradient-based attacks generated adversarial examples by applying perturbations in the direction of the gradient. We conjectured that applying perturbations along only a single direction reduced the coverage of adversarial examples under the considered threat model.
In this paper, we proposed the Gradient Vicinity Adversarial Training (GVAT). Under the L 2 -norm constraint, perturbation directions were sampled in the vicinity of the gradient direction, with the sampling range bounded by a maximum angle. Unlike standard adversarial training, which generated adversarial examples along the original gradient direction, GVAT generated adversarial examples along the sampled perturbation directions and used them for adversarial training.
To evaluate the defense performance of GVAT, this paper applied GVAT to three attacks under the L 2 -norm constraint: fast gradient sign method (FGSM) [16], projected gradient descent (PGD) [25], and Carlini–Wagner (CW) [26] under the L 2 -norm constraint. FGSM was a single-step perturbation attack method based on the gradient direction. PGD was considered a multi-step perturbation attack method based on FGSM. CW was an optimization-based attack that minimized the perturbation magnitude by injecting perturbations into input images, while forcing misclassification.
To reduce training costs, we adopted an offline adversarial training setting, in which adversarial examples were generated in advance and then used for model training. Unlike prior offline methods that relied on multi-model transfer [27], our method used adversarial examples generated by only a single model. As a result, GVAT required only a single threat model setting during training and still improved the model’s transfer-based black-box robustness against other attacks, resulting in lower computational costs than methods that train with multiple attacks.
Experiments were conducted on three standard image classification datasets. MNIST [28] was a handwritten digit recognition task with 10 classes. CIFAR-10 and CIFAR-100 [29] were two natural image classification benchmarks with 10 and 100 classes.
The main contributions of this paper are summarized as follows:
  • We propose Gradient Vicinity Adversarial Training, an adversarial training method that generated adversarial examples along directions sampled in the vicinity of the gradient direction.
  • GVAT used adversarial examples generated by a single attack for training, but the trained models still show improved transfer-based black-box robustness against other attacks, including FGSM, PGD, sparse L 1 descent (SLIDE) [21], and CW attacks under the L 1 , L 2 , and L constraints.
  • We show that broader attack-direction coverage around the gradient direction was important for improving defense generalization, instead of relying only on stronger adversarial examples generated along the original gradient direction.

2. Methods

This section specified the threat model and the distance metric used to constrain the perturbation. We introduced the GVAT method. GVAT first sampled perturbation directions in the vicinity of the gradient. It then generated adversarial examples along the sampled directions and used them to train the model.

2.1. Threat Model

This paper primarily focused on transfer-based black-box robustness. The adversary was assumed to have access to the target network architecture, the input preprocessing pipeline, and the loss function, while the exact model parameters remained unknown. In this setting, the adversary trained a surrogate model using the known architecture, generated adversarial examples on the surrogate model, and then applied them directly to the target model. Prior studies had shown that adversarial examples generated on a surrogate model often transfer to the target model and retain nontrivial attack effectiveness [30].
This setting was distinct from white-box, in which adversarial examples were directly optimized using the gradients of the target model. Therefore, unless otherwise specified, the robustness and defense-generalization claims in this paper specifically referred to transfer-based black-box robustness. White-box robustness was evaluated separately using AutoAttack in an additional analysis.
Adversarial examples were generated using untargeted attacks, for which the objective was merely to cause misclassification. In contrast, targeted attacks had to drive the prediction to a specified target class. Since untargeted attacks had a less restrictive success criterion, they typically achieved higher success rates under the same perturbation budget, making the defense evaluation more challenging.

2.2. Distance Metric

To quantify the difference between adversarial examples and their corresponding original examples, prior studies have commonly adopted the L p distance as the metric, where p { 1 , 2 , } . Specifically, for an original example x and its adversarial counterpart x , the L p distance was defined as x x p , where · p was defined as follows:
δ p = i = 1 n | δ i | p 1 p .
Specifically, the L 1 -norm was often used to characterize sparse perturbations, the L -norm emphasized the maximum per-element deviation, and the L 2 -norm reflected the overall perturbation energy and exhibited rotational symmetry.
The L 2 -norm was used as the distance metric. During adversarial example generation and training, the perturbation magnitude was constrained by an L 2 ball, ensuring that adversarial examples always remained within the prescribed budget.

2.3. Gradient Vicinity Sampling

This section described how directions were sampled in the vicinity of the gradient during adversarial example generation in GVAT. Regardless of the specific attack formulation, the gradient considered here referred to the quantity used to guide the attack direction during adversarial example generation.
To confine sampled directions to the vicinity of the gradient direction, we imposed an angular constraint on the sampled direction relative to the original direction. Given the original gradient g, the new direction v was sampled in the vicinity of g such that ( v , g ) θ , where θ denoted the maximum sampling angle. The value of θ was manually specified to control the sampling range. In practice, the optimal θ might differ across attack methods.
In this paper, GVAT used adversarial examples generated by FGSM, PGD, and CW for adversarial training. For FGSM and PGD, original gradient g was computed as the gradient of the standard classification loss with respect to the perturbation. For CW, g was instead computed from the CW-specific objective.
The direction-sampling operation in the vicinity of the gradient direction was denoted by GV θ ( · ) . To implement this sampling strategy, we sampled z from z Uniform ( cos θ , 1 ) . The complete direction-sampling formulation was given as follows:
v = GV θ ( g ) = g z + u 1 z 2 .
In Equation (2), u was a random unit vector satisfying u g = 0 and u 2 = 1 . Therefore, the angle between v ^ and g was bounded by θ . This ensured that the sampled direction remained within the prescribed angular vicinity of the original gradient direction.
Note that uniformly sampling z from [ cos θ , 1 ] did not result in a uniform distribution of the rotation angle. Let φ = arccos ( z ) = ( g , v ) . By the change-of-variables rule, the induced angular density was
f φ ( φ ) = sin φ 1 cos θ , 0 φ θ .
Therefore, the sampling strategy induced a non-uniform angular distribution proportional to sin φ . This was consistent with the design of GVAT, which only required the sampled direction to lie within the prescribed angular range [ 0 , θ ] , rather than to be uniformly distributed over the spherical cap.

2.4. Adversarial Example Generation in GVAT

This section described how adversarial examples were generated by sampling directions in the vicinity of the gradient. Given a normalized clean example x n with label y, gradient-vicinity direction sampling was performed at each gradient-based update. A single GVAT update was formulated as
δ ( t ) = Π B 2 ( 0 , ϵ ) δ ( t 1 ) + α GV θ g ( t ) , A { FGSM , PGD } , δ ( t 1 ) η GV θ g ( t ) , A = CW .
In Equation (4), A denoted the base attack type, δ ( t ) denoted the perturbation after the t-th update, α denoted the update step size for FGSM and PGD, and η denoted the optimization step size for CW. Π B 2 ( 0 , ϵ ) denoted the projection onto the L 2 perturbation ball with radius ϵ , and θ denoted the maximum gradient-vicinity angle.
For FGSM-based GVAT, this update was performed once, whereas for PGD-based and CW-based GVAT, g ( t ) and the corresponding gradient-vicinity direction were recomputed at each iteration. The complete iterative procedures, including initialization, projection, and clipping, were provided in Algorithm 1. All attacks, perturbation budgets, and step sizes were defined in the normalized input space. The same perturbation budget was used for all channels. After the generation process, the adversarial inputs were de-normalized to the pixel space and clipped to the valid input range [ 0 , 1 ] .
Algorithm 1 Adversarial Example Generation in GVAT
Input: classifier f ϕ ; normalized input x n with label y; attack type A; iterations K; normalization mean μ and standard deviation σ ; FGSM/PGD parameters α and ϵ ; CW parameters η , and κ ; maximum gradient-vicinity angle Θ .
Output: adversarial example x n a d v .
  1:
l ( 0 μ ) / σ , u ( 1 μ ) / σ
  2:
if A is FGSM then
  3:
      K 1
  4:
end if
  5:
for  t = 1 to K do
  6:
      x n ( t 1 ) Clip x n + δ ( t 1 ) , l , u
  7:
     if A is FGSM or PGD then
  8:
           L ( t ) L cls f ϕ ( x n ( t 1 ) ) , y
  9:
           g ( t ) δ L ( t )
10:
           v ( t ) G V θ g ( t )
11:
           δ ( t ) Π B 2 ( 0 , ϵ ) δ ( t 1 ) + α v ( t )
12:
     else if A is CW then
13:
           L CW ( t ) L CW δ ( t 1 ) , x n ( t 1 ) , y , κ
14:
           g ( t ) δ L CW ( t )
15:
           v ( t ) G V θ g ( t )
16:
           δ ( t ) δ ( t 1 ) η v ( t )
17:
     end if
18:
      x n ( t ) Clip x n + δ ( t ) , l , u
19:
      δ ( t ) x n ( t ) x n
20:
end for
21:
x n a d v Clip x n + δ ( K ) , l , u
22:
return  x n a d v
The adversarial examples used by GVAT during training were different from standard adversarial examples. Standard adversarial examples were generated along the gradient direction. In contrast, the adversarial examples used by GVAT were generated along directions sampled near the gradient direction. When the maximum sampling angle was set to θ = 0 , GVAT reduced to the corresponding standard adversarial training method.
GVAT was considered only under the L 2 -norm constraint. Under this constraint, the projection only rescaled the perturbation magnitude while preserving the sampled direction. In contrast, under L 1 and L constraints, Π B 2 ( x , ε ) corresponded to L 1 -ball projection or element-wise clipping, which distorted the perturbation direction and weakened the controllability of the sampling angle.
Figure 1 showed adversarial examples used in GVAT on CIFAR-100 with different maximum sampling angles θ = 0 ° , 50 ° , and 100 ° . The corresponding visualizations for MNIST and CIFAR-10 were provided in Appendix A.

2.5. Datasets and Models

For the MNIST dataset, a lightweight CNN classifier was adopted, consisting of two convolutional layers, one fully connected layer, and an output layer. For data preprocessing, both training and testing inputs were converted to grayscale and then transformed into tensors, without additional normalization or data augmentation. The model was trained for 20 epochs using the Adam optimizer, with a learning rate of 0.001, β 1 = 0.9 , b e t a 2 = 0.999 , ϵ = 1 × 10 8 , and no weight decay.
For the CIFAR-10 and CIFAR-100 datasets, WideResNet-28-10 [31] was used as the classifier. During training, data augmentation included random cropping to 32 × 32 and random horizontal flipping. For CIFAR-100, Cutout regularization was additionally applied. The images were converted to tensors and normalized using the mean and standard deviation of each dataset. During testing, only tensor conversion and normalization were performed. The model was trained for 200 epochs using SGD with an initial learning rate of 0.1, momentum of 0.9, weight decay of 5 × 10 4 , and Nesterov momentum. A piecewise learning-rate schedule was adopted, where the learning rate was multiplied by 0.2, 0.2, and 0.5 at epochs 60, 120, and 160, respectively.

2.6. Adversarial Attack Settings

When selecting the adversarial attack parameters, we considered two aspects: the attack’s strength and the visual perceptibility of the perturbations. Table 1 summarized the various attack methods used in this paper and their corresponding perturbation budgets. SLIDE was a sparse adversarial attack under the L 1 -norm constraint, which perturbs only a small number of pixels by following sparse gradient directions. SLIDE was used only as an attack method for evaluation.The confidence parameter was configured as 20 for MNIST, 1 for CIFAR-10, and 5 for CIFAR-100.
To assess the adequacy of the adopted attack settings, we further evaluated attack convergence on the source models used for adversarial-example generation by varying the number of attack iterations and random restarts. The attack performance gradually stabilized as the numbers of iterations and restarts increased, suggesting that further increases in these parameters had only limited effects on the attack results. Detailed results were provided in Appendix B.

2.7. Offline Adversarial Training and Testing

Unlike standard adversarial training, which dynamically generates adversarial examples for each training batch, we adopted offline adversarial training to reduce computational overhead. Under a fixed attack configuration, adversarial example sets for both the training and test sets were generated in advance using a surrogate model independently trained with the same architecture and training objective as the target model. During training, the original clean examples and their corresponding adversarial examples were concatenated along the batch dimension to form a combined input for parameter updates. During testing, Top-1 accuracy was evaluated on both the clean test set and adversarial example sets generated under different attack methods and norm constraints. These adversarial examples were generated on the surrogate model and then transferred to the target model; therefore, unless otherwise specified, the reported adversarial robustness refers to transfer-based black-box robustness.
Since no prior work had established the equivalence between offline and online adversarial training, we adopted the offline setting to enable large-scale comparative experiments at a controllable computational cost and to evaluate the effect of sampling directions in the vicinity of the gradient direction across different attack settings.

3. Results

This section presented the experimental results and analyzed the defense capability of standard adversarial training and GVAT under different attack settings, with particular emphasis on their performance against adversarial examples not used for training. Unless otherwise specified, the robustness results in the following transfer-based evaluations referred to transfer-based black-box robustness.

3.1. Standard Adversarial Training

We evaluated models trained with standard adversarial training against attacks with different methods and norm constraints. Table 2 shows the Top-1 accuracy on MNIST, CIFAR-10, and CIFAR-100. Models were trained on different adversarial examples using standard adversarial training and evaluated under different test attacks. We found that the defense performance decreased when the training attack differed from the test attack. This occurred for both different attack types and different norm constraints.
  • Different attack types. The defense performance decreased when the test attack differed from the training attack. For example, on CIFAR-100, the model trained with FGSM, L 2 achieved 56.91% Top-1 accuracy under the same attack, but only 48.51% under the CW, L 2 attack. Similar trends were observed on CIFAR-10 as well.
  • Different norm constraints. The defense performance also decreased when the test norm differed from the training norm. For example, on CIFAR-100, the model trained with PGD, L 2 adversarial examples achieved 69.06% Top-1 accuracy under the same L 2 setting. However, its accuracy dropped to 19.40% under the PGD, L attack. Similar trends were also observed on other datasets.
These results indicated that the defense learned from offline adversarial training was strongly tied to the specific attack algorithm and norm constraint used during training. To generalize the defense effect learned from one attack to other attacks, GVAT was introduced.

3.2. Gradient Vicinity Adversarial Training

We evaluated the defense ability of GVAT under different adversarial examples. Table 3 reports the accuracy of models trained by GVAT. During training, adversarial examples were generated by using FGSM, PGD, and CW with different maximum sampling angles θ .
As mentioned in the Section 2.3, θ controlled the maximum angular deviation between the sampled direction and the original gradient direction.
  • Different attack types and norm constraints. GVAT improved defense performance on many adversarial examples not used for training. This indicated that GVAT could improve the generalization of defense effects. For example, on CIFAR-100, compared with standard PGD, L 2 adversarial training, PGD, L 2 -based GVAT with θ = 100 ° increased the Top-1 accuracy under the FGSM, L 2 attack from 28.99% to 46.12%.
  • Larger angle was not always better. A larger maximum sampling angle did not always lead to better defense performance. In some cases, the accuracy first increased and then decreased as θ became larger. For example, on CIFAR-100, when GVAT was applied to PGD, L 2 , the best performance under the FGSM, L 2 test attack appeared at θ = 100 ° , rather than at the largest angle.
GVAT achieved higher Top-1 accuracy than standard adversarial training on most adversarial examples not used for training. As the sampling range increased, the accuracy under these attacks first rose, then fell. At some rotation angles, the accuracy against the training attacks decreased slightly. However, it was still higher than that of the model trained without adversarial training.

3.3. Comparison with Multi-Attack Defense Methods

Multi-attack defense methods used multiple attacks or perturbation norms during training. Their goal was to improve robustness against multiple attacks. In contrast, GVAT used only one base attack.
Therefore, we compared GVAT with standard adversarial training (AT), multi-attack training (Multi-AT) [21], and Multi-Steepest Descent (MSD) [32]. Multi-AT used multiple attack types, while MSD jointly considered multiple perturbation norms during adversarial optimization. We evaluated these methods in terms of computational cost and transfer-based black-box robustness.
1.
Computational cost. As shown in Table 4, Multi-AT had the highest cost, with 920 gradient evaluations per sample, 16.28 h of total GPU time, and 2.57 GB of storage. MSD required 30 gradient evaluations per sample and 11.25 h of total GPU time. AT and GVAT had similar computational costs, with total GPU times of 10.61 h and 10.67 h, respectively.
2.
Transfer-based black-box robustness. Table 5 compared AT, GVAT, Multi-AT, and MSD against six adversarial attacks. Multi-AT achieved the highest average robust accuracy on all three datasets. GVAT ranked second on MNIST and CIFAR-10. On CIFAR-100, its average robust accuracy was 59.43%, which was close to the 60.05% achieved by MSD. GVAT achieved higher average robust accuracy than AT.
Overall, GVAT achieved lower robustness than Multi-AT, but higher robustness than conventional single-attack AT while relying on only one base attack for training. GVAT also incurred lower computational cost than Multi-AT.

3.4. White-Box Robustness Evaluation with AutoAttack

GVAT was designed under the transfer-based black-box threat model defined in Section 2.1, where adversarial examples were generated on an independently trained surrogate model and then transferred to the target model. To further investigate the effectiveness of GVAT under a stronger white-box setting, we conducted a direct white-box evaluation on the target models using AutoAttack [33]. Table 6 reported the white-box robustness of models trained with different GVAT configurations under APGD-CE, APGD-DLR, FAB-T, Square Attack, and standard AutoAttack.
On MNIST, GVAT showed clear improvements at larger gradient-vicinity angles. For example, PGD, L 2 -based GVAT with θ = 150 ° reached 37.82% standard AutoAttack accuracy. On CIFAR-10, CW, L 2 -based GVAT showed the most notable improvement. The standard AutoAttack accuracy increased from 0.00% to 10.06% at θ = 150 ° .
Although the defense effects learned by GVAT could generalize to some extent beyond the original transfer-based setting, its white-box robustness remained limited. This limitation may have been partly related to the offline training procedure, where adversarial examples were pre-generated on a surrogate model and were not updated according to the evolving target model during training. The primary objective of GVAT remained to improve the generalization of defense effects learned from a single adversarial attack under the transfer-based black-box threat model defined in Section 2.1.

4. Discussion

In the GVAT method, adversarial examples generated by FGSM and PGD generally had lower attack strength. Despite this, the models trained with GVAT were stronger at defending against adversarial examples under the transfer-based black-box setting. They performed better on examples that were not used during training.
This observation was inconsistent with the view that stronger attacks used in adversarial training led to better defense capability. We argued that broader coverage of attack directions was more important than attack strength in defending against adversarial attacks.

4.1. Effect of Attack Strength on Defense Performance

We observed two different effects of attack strength. Simply reducing the attack strength by adjusting the L 2 perturbation magnitude weakened the effectiveness of adversarial training. In contrast, adversarial examples used by GVAT could still improve defense performance after the maximum sampling angle was properly adjusted. This occurred even when these adversarial examples had lower attack strength.
To evaluate how attack strength affected defense performance, we conducted a controlled experiment on CIFAR-100 by adjusting the L 2 perturbation magnitude of the training adversarial examples while keeping the original attack direction unchanged. Attack strength was measured by classification accuracy on the baseline model, with lower accuracy indicating a stronger attack.
Table 7 reports the results on CIFAR-100. The models were trained with L 2 -adjusted PGD or FGSM adversarial examples. Different Top-1 accuracy values in the third column indicate different attack strengths of the training adversarial examples. The results showed that, when the attack strength was reduced, the defense performance of the resulting model generally declined.
To examine the attack strength of adversarial examples generated by GVAT under different maximum sampling angles θ . The attack strength was evaluated by measuring its effect on a baseline model trained on the standard clean CIFAR-100 training set.
Table 8 reports the Top-1 accuracy of the baseline model under these adversarial examples. As θ increased, the accuracy under FGSM and PGD generally increased. In contrast, the accuracy under CW decreased when θ increased from 0 ° to 120 ° . This was because the gradient direction was the locally most effective attack direction, and deviating from it tended to weaken the attack. However, the model trained with GVAT still performed better on most adversarial examples not used for training.

4.2. Effect of Attack Direction Coverage on Defense Performance

To evaluate the effect of attack direction coverage on defense performance, we compared two adversarial training methods. The first method was GVAT with different maximum sampling angles. The second method was L 2 -adjusted adversarial training along the original gradient direction. In the second method, only the magnitude of the L 2 perturbation was adjusted. This made its attack strength close to that of GVAT.
The results of the two comparative experiments above were shown in Figure 2. Models trained with GVAT tended to perform better on most adversarial examples not used for training than those trained with matched-strength adversarial examples.
One possible explanation was that GVAT increased the diversity of attack directions covered during training. By sampling directions in the vicinity of the gradient, adversarial examples could be generated along multiple attack directions rather than a single attack trajectory. As a result, the model was exposed to a broader range of adversarial variations during training. This broader attack direction coverage might be more important than attack strength itself for improving defense performance. In contrast, CW tended to become stronger as θ increased, since it sought perturbations that both induced misclassification and remained small in magnitude. Thus, deviating from the original direction might have helped CW find stronger directions beyond it.

5. Conclusions

In this work, we proposed Gradient Vicinity Adversarial Training (GVAT), which generated adversarial examples along directions sampled in the vicinity of the gradient. The goal of GVAT was to generalize the defense effect from one specific attack to other attacks under the transfer-based black-box setting. The results showed that GVAT not only defended against the corresponding attacks that generated adversarial examples but also defended against other attacks. In other words, the defense effect of GVAT was generalized to other attacks under the transfer-based black-box setting.

Author Contributions

Conceptualization, D.N. and L.S.; methodology, D.N. and L.S.; software, D.N.; validation, D.N.; formal analysis, D.N.; investigation, D.N.; data curation, D.N.; writing—original draft preparation, D.N.; writing—review and editing, L.S.; visualization, D.N.; supervision, L.S.; project administration, L.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The adversarial examples generated by GVAT and the parameters of the adversarially trained models are publicly available in Zenodo at https://doi.org/10.5281/zenodo.20510455.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Visualization of Adversarial Examples on MNIST and CIFAR-10

Figure A1 and Figure A2 showed adversarial examples generated by FGSM, PGD, and CW under GVAT on MNIST and CIFAR-10.
Figure A1. Visualization of MNIST adversarial examples generated by FGSM, PGD, and CW under GVAT.
Figure A1. Visualization of MNIST adversarial examples generated by FGSM, PGD, and CW under GVAT.
Computation 14 00211 g0a1
Figure A2. Visualization of CIFAR-10 adversarial examples generated by FGSM, PGD, and CW under GVAT.
Figure A2. Visualization of CIFAR-10 adversarial examples generated by FGSM, PGD, and CW under GVAT.
Computation 14 00211 g0a2

Appendix B. Attack Strength and Convergence Analysis

To assess the adequacy of the adopted attack settings, we evaluated the attack strength on the original models used to generate the adversarial examples. The results were summarized in Figure A3. The attack performance gradually stabilized as the number of iterations increased. Additional random restarts caused only small changes. These results supported the adequacy of the adopted attack settings.
Figure A3. Attack strength analysis with different numbers of iterations and random restarts on MNIST, CIFAR-10, and CIFAR-100. The top and bottom rows showed the results for attack iterations and random restarts, respectively. Hollow circles marked the settings used in the main experiments. Lower accuracy indicated stronger attacks.
Figure A3. Attack strength analysis with different numbers of iterations and random restarts on MNIST, CIFAR-10, and CIFAR-100. The top and bottom rows showed the results for attack iterations and random restarts, respectively. Hollow circles marked the settings used in the main experiments. Lower accuracy indicated stronger attacks.
Computation 14 00211 g0a3

References

  1. Zhu, L.; Liao, B.; Zhang, Q.; Wang, X.; Liu, W.; Wang, X. Vision Mamba: Efficient visual representation learning with bidirectional state space model. In Proceedings of the 41st International Conference on Machine Learning, Vienna, Austria, 21–27 July 2024; pp. 62429–62442. Available online: https://proceedings.mlr.press/v235/zhu24f.html (accessed on 6 September 2026).
  2. Radford, A.; Kim, J.W.; Hallacy, C.; Ramesh, A.; Goh, G.; Agarwal, S.; Sastry, G.; Askell, A.; Mishkin, P.; Clark, J.; et al. Learning transferable visual models from natural language supervision. In Proceedings of the 38th International Conference on Machine Learning, Virtual Event, 18–24 July 2021; pp. 8748–8763. Available online: https://proceedings.mlr.press/v139/radford21a.html (accessed on 6 September 2026).
  3. Li, Z.; Wang, W.; Li, H.; Xie, E.; Sima, C.; Lu, T.; Qiao, Y.; Dai, J. BEVFormer: Learning bird’s-eye-view representation from LiDAR-camera via spatiotemporal transformers. IEEE Trans. Pattern Anal. Mach. Intell. 2025, 47, 2020–2036. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  4. Hu, Y.; Yang, J.; Chen, L.; Li, K.; Sima, C.; Zhu, X.; Chai, S.; Du, S.; Lin, T.; Wang, W.; et al. Planning-oriented autonomous driving. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2023), Vancouver, BC, Canada, 17–24 June 2023; pp. 17853–17862. [Google Scholar] [CrossRef] [Scilit]
  5. Hinton, G.; Deng, L.; Yu, D.; Dahl, G.E.; Mohamed, A.R.; Jaitly, N.; Senior, A.; Vanhoucke, V.; Nguyen, P.; Sainath, T.N.; et al. Deep Neural Networks for Acoustic Modeling in Speech Recognition. IEEE Signal Process. Mag. 2012, 29, 82–97. [Google Scholar] [CrossRef] [Scilit]
  6. Radford, A.; Kim, J.W.; Xu, T.; Brockman, G.; McLeavey, C.; Sutskever, I. Robust speech recognition via large-scale weak supervision. In Proceedings of the International Conference on Machine Learning (ICML 2023), Honolulu, HI, USA, 23–29 July 2023; pp. 28492–28518. Available online: https://proceedings.mlr.press/v202/radford23a.html (accessed on 6 September 2026).
  7. Szegedy, C.; Zaremba, W.; Sutskever, I.; Bruna, J.; Erhan, D.; Goodfellow, I.J.; Fergus, R. Intriguing properties of neural networks. In Proceedings of the 2nd International Conference on Learning Representations (ICLR 2014), Banff, AB, Canada, 14–16 April 2014. [Google Scholar] [CrossRef] [Scilit]
  8. Biggio, B.; Roli, F. Wild Patterns: Ten Years After the Rise of Adversarial Machine Learning. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, Toronto, ON, Canada, 15–19 October 2018. [Google Scholar] [CrossRef] [Scilit]
  9. Wang, L.; Zhang, T.; Han, Y.; Fang, M.; Jin, T.; Kang, J. Attack end-to-end autonomous driving through module-wise noise. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA, 17–18 June 2024; pp. 8349–8352. Available online: https://openaccess.thecvf.com/content/CVPR2024W/AdvML/html/Wang_Attack_End-to-End_Autonomous_Driving_through_Module-Wise_Noise_CVPRW_2024_paper.html (accessed on 6 September 2026).
  10. Carlini, N.; Mishra, P.; Vaidya, T.; Zhang, Y.; Sherr, M.; Shields, C.; Wagner, D.A.; Zhou, W. Hidden voice commands. In Proceedings of the 25th USENIX Security Symposium (USENIX Security 16), Austin, TX, USA, 10–12 August 2016; pp. 513–530. Available online: https://www.usenix.org/conference/usenixsecurity16/technical-sessions/presentation/carlini (accessed on 6 September 2026).
  11. Zuo, F.; Zeng, Q. Exploiting the sensitivity of L2 adversarial examples to erase-and-restore. In Proceedings of the 2021 ACM Asia Conference on Computer and Communications Security, Virtual Event, 7–11 June 2021; pp. 40–51. [Google Scholar] [CrossRef] [Scilit]
  12. Li, X.; Li, F. Adversarial examples detection in deep networks with convolutional filter statistics. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 5775–5783. [Google Scholar] [CrossRef] [Scilit]
  13. Shi, L.; Liao, T.; He, J. Defending adversarial attacks against DNN image classification models by a noise-fusion method. Electronics 2022, 11, 1814. [Google Scholar] [CrossRef] [Scilit]
  14. Li, B.; Chen, C.; Wang, W.; Carin, L. Certified adversarial robustness with additive noise. In Proceedings of the Advances in Neural Information Processing Systems 32 (NeurIPS 2019), Vancouver, BC, Canada, 8–14 December 2019; pp. 9459–9469. Available online: https://proceedings.neurips.cc/paper/2019/hash/335cd1b90bfa4ee70b39d08a4ae0cf2d-Abstract.html (accessed on 6 September 2026).
  15. An, G. The effects of adding noise during backpropagation training on a generalization performance. Neural Comput. 1996, 8, 643–674. [Google Scholar] [CrossRef] [Scilit]
  16. Goodfellow, I.J.; Shlens, J.; Szegedy, C. Explaining and harnessing adversarial examples. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015), San Diego, CA, USA, 7–9 May 2015. [Google Scholar] [CrossRef] [Scilit]
  17. Elsayed, G.F.; Goodfellow, I.J.; Sohl-Dickstein, J. Adversarial reprogramming of neural networks. In Proceedings of the 7th International Conference on Learning Representations (ICLR 2019), New Orleans, LA, USA, 6–9 May 2019; Available online: https://openreview.net/forum?id=Syx_Ss05tm (accessed on 6 September 2026).
  18. Schott, L.; Rauber, J.; Bethge, M.; Brendel, W. Towards the first adversarially robust neural network model on MNIST. In Proceedings of the 7th International Conference on Learning Representations (ICLR 2019), New Orleans, LA, USA, 6–9 May 2019; Available online: https://openreview.net/forum?id=S1EHOsC9tX (accessed on 6 September 2026).
  19. Zhang, H.; Yu, Y.; Jiao, J.; Xing, E.; El Ghaoui, L.; Jordan, M. Theoretically Principled Trade-off between Robustness and Accuracy. In Proceedings of the 36th International Conference on Machine Learning (ICML 2019), Long Beach, CA, USA, 9–15 June 2019; Available online: https://proceedings.mlr.press/v97/zhang19p.html (accessed on 6 September 2026).
  20. Engstrom, L.; Tran, B.; Tsipras, D.; Schmidt, L.; Madry, A. A rotation and a translation suffice: Fooling CNNs with simple transformations. In Proceedings of the International Conference on Learning Representations, New Orleans, LA, USA, 6–9 May 2019; Available online: https://openreview.net/forum?id=BJfvknCqFQ (accessed on 6 September 2026).
  21. Tramèr, F.; Boneh, D. Adversarial training and robustness for multiple perturbations. In Proceedings of the Advances in Neural Information Processing Systems 32 (NeurIPS 2019), Vancouver, BC, Canada, 8–14 December 2019; pp. 5858–5868. Available online: https://proceedings.neurips.cc/paper/2019/hash/5d4ae76f053f8f2516ad12961ef7fe97-Abstract.html (accessed on 6 September 2026).
  22. Nowroozi, E.; Mohammadi, M.; Rahdari, A.; Taheri, R.; Conti, M. A Random Deep Feature Selection Approach to Mitigate Transferable Adversarial Attacks. IEEE Trans. Netw. Serv. Manag. 2025, 22, 5301–5310. [Google Scholar] [CrossRef] [Scilit]
  23. Wong, E.; Rice, L.; Kolter, J.Z. Fast is better than free: Revisiting adversarial training. In Proceedings of the 8th International Conference on Learning Representations (ICLR 2020), Addis Ababa, Ethiopia, 26–30 April 2020; Available online: https://openreview.net/forum?id=BJx040EFvH (accessed on 6 September 2026).
  24. Rice, L.; Wong, E.; Kolter, J.Z. Overfitting in Adversarially Robust Deep Learning. In Proceedings of the 37th International Conference on Machine Learning (ICML 2020), Virtual, 13–18 July 2020; Available online: https://proceedings.mlr.press/v119/rice20a.html (accessed on 6 September 2026).
  25. Madry, A.; Makelov, A.; Schmidt, L.; Tsipras, D.; Vladu, A. Towards deep learning models resistant to adversarial attacks. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018; Available online: https://openreview.net/forum?id=rJzIBfZAb (accessed on 6 September 2026).
  26. Carlini, N.; Wagner, D.A. Towards evaluating the robustness of neural networks. In Proceedings of the 2017 IEEE Symposium on Security and Privacy, San Jose, CA, USA, 22–26 May 2017; pp. 39–57. [Google Scholar] [CrossRef] [Scilit]
  27. Tramèr, F.; Kurakin, A.; Papernot, N.; Goodfellow, I.J.; Boneh, D.; McDaniel, P.D. Ensemble adversarial training: Attacks and defenses. In Proceedings of the 6th International Conference on Learning Representations (ICLR 2018), Vancouver, BC, Canada, 30 April–3 May 2018; Available online: https://openreview.net/forum?id=rkZvSe-RZ (accessed on 6 September 2026).
  28. LeCun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE 1998, 86, 2278–2324. [Google Scholar] [CrossRef] [Scilit]
  29. Krizhevsky, A. Learning Multiple Layers of Features from Tiny Images; Technical Report; University of Toronto: Toronto, ON, Canada, 2009; Available online: https://api.semanticscholar.org/CorpusID:18268744 (accessed on 6 September 2026).
  30. Papernot, N.; McDaniel, P.; Goodfellow, I.J. Transferability in machine learning: From phenomena to black-box attacks using adversarial samples. arXiv 2016, arXiv:1605.07277. [Google Scholar] [CrossRef] [Scilit]
  31. Zagoruyko, S.; Komodakis, N. Wide residual networks. In Proceedings of the British Machine Vision Conference 2016 (BMVC 2016), York, UK, 19–22 September 2016; Available online: https://bmva-archive.org.uk/bmvc/2016/papers/paper087/index.html (accessed on 6 September 2026).
  32. Maini, P.; Wong, E.; Kolter, J.Z. Adversarial Robustness Against the Union of Multiple Perturbation Models. In Proceedings of the 37th International Conference on Machine Learning (ICML), Virtual Event, 13–18 July 2020; PMLR 119, pp. 6640–6650. Available online: https://proceedings.mlr.press/v119/maini20a.html (accessed on 6 September 2026).
  33. Croce, F.; Hein, M. Reliable Evaluation of Adversarial Robustness with an Ensemble of Diverse Parameter-Free Attacks. In Proceedings of the 37th International Conference on Machine Learning (ICML), Virtual Event, 13–18 July 2020; Volume 119, pp. 2206–2216. Available online: https://proceedings.mlr.press/v119/croce20b.html (accessed on 6 September 2026).
Figure 1. Visualization of CIFAR-100 adversarial examples generated by FGSM, PGD, and CW under GVAT. The first column shows the original clean examples, while the second to tenth columns show adversarial examples generated by FGSM, PGD, and CW. The values 0 ° , 50 ° , and 100 ° denote the manually specified maximum sampling angles around the original gradient direction, which control the allowed deviation of the sampled direction from the gradient direction.
Figure 1. Visualization of CIFAR-100 adversarial examples generated by FGSM, PGD, and CW under GVAT. The first column shows the original clean examples, while the second to tenth columns show adversarial examples generated by FGSM, PGD, and CW. The values 0 ° , 50 ° , and 100 ° denote the manually specified maximum sampling angles around the original gradient direction, which control the allowed deviation of the sampled direction from the gradient direction.
Computation 14 00211 g001
Figure 2. Comparison of GVAT and L 2 -adjusted adversarial training using FGSM and PGD. The left and right panels correspond to the adversarial attacks used during training, namely FGSM and PGD, respectively. The x-axis represents different adversarial tests, and the y-axis represents Top-1 accuracy.
Figure 2. Comparison of GVAT and L 2 -adjusted adversarial training using FGSM and PGD. The left and right panels correspond to the adversarial attacks used during training, namely FGSM and PGD, respectively. The x-axis represents different adversarial tests, and the y-axis represents Top-1 accuracy.
Computation 14 00211 g002
Table 1. Experimental settings of adversarial attacks. The table reports the settings used on MNIST, CIFAR-10, and CIFAR-100, including the attack method, norm constraint, perturbation budget, step size, number of iterations, and whether GVAT was used. A checkmark indicates that GVAT was applied.
Table 1. Experimental settings of adversarial attacks. The table reports the settings used on MNIST, CIFAR-10, and CIFAR-100, including the attack method, norm constraint, perturbation budget, step size, number of iterations, and whether GVAT was used. A checkmark indicates that GVAT was applied.
DatasetModelAttack
Method
Distance
Metric
DistanceStep
Size
Iteration
Steps
GVAT
MNISTCNNFGSM L 2 611
FGSM L 0.311
MNISTCNNPGD L 2 4240
PGD L 0.150.140
SLIDE L 1 20440
CW L 2 1200
CIFAR-10 &
CIFAR-100
WideResNet
-28-10
FGSM L 2 611
FGSM L 40/25511
PGD L 2 4210
PGD L 40/255210
SLIDE L 1 40820
CW L 2 150
Table 2. Classification Top-1 accuracy (%) of models trained with different adversarial examples. Rows represent training sets, and columns represent test sets. Clean denotes the original clean training or test set. Bold indicates the best result in each column.
Table 2. Classification Top-1 accuracy (%) of models trained with different adversarial examples. Rows represent training sets, and columns represent test sets. Clean denotes the original clean training or test set. Bold indicates the best result in each column.
DatasetTraining SetTesting Set
CleanFGSM, L 2 FGSM, L PGD, L 2 PGD, L SLIDE, L 1 CW, L 2
MNISTClean99.2239.3847.6517.1782.8549.0432.11
FGSM, L 2 98.9298.3596.5483.4098.8682.6475.50
FGSM, L 99.0186.6598.5462.3398.3576.9467.85
PGD, L 2 98.9487.8776.1798.7798.4684.5376.65
PGD, L 99.1284.3992.0267.7199.1670.9458.29
SLIDE, L 1 98.6086.6480.2796.7697.5298.0588.49
CW, L 2 98.0572.7162.9378.8190.6887.4996.69
CIFAR-10Clean94.4433.8933.3824.9822.6244.1047.59
FGSM, L 2 93.8992.4082.6965.2977.4575.3463.80
FGSM, L 94.0873.0187.4761.1283.5970.2367.43
PGD, L 2 93.9472.4261.5294.7865.8191.4865.77
PGD, L 91.3268.8568.5282.2586.4783.8174.94
SLIDE, L 1 93.9276.1069.6084.8077.3792.7771.73
CW, L 2 93.6671.6263.8188.9872.3989.6492.42
CIFAR-100Clean76.575.785.7316.384.4525.9624.35
FGSM, L 2 73.3456.9150.0649.0658.7555.7148.51
FGSM, L 74.5841.1961.3542.5166.5549.7034.70
PGD, L 2 74.5328.9919.3869.0619.4064.4240.13
PGD, L 73.7137.0743.1052.7667.4956.1946.20
SLIDE, L 1 74.6937.3723.1059.6635.8366.8146.63
CW, L 2 73.6831.3122.4859.9925.8364.5770.79
Table 3. Classification Top-1 accuracy (%) of models trained with GVAT adversarial examples under different training sets and maximum sampling angles θ . The setting θ = 0 ° denotes adversarial training using the original attack direction, while larger angles denote GVAT with directions sampled within the corresponding maximum angular range. Bold indicates the best result in each column.
Table 3. Classification Top-1 accuracy (%) of models trained with GVAT adversarial examples under different training sets and maximum sampling angles θ . The setting θ = 0 ° denotes adversarial training using the original attack direction, while larger angles denote GVAT with directions sampled within the corresponding maximum angular range. Bold indicates the best result in each column.
DatasetTraining SetGVAT  θ Testing Set
Clean FGSM  L 2 FGSM  L PGD  L 2 PGD  L SLIDE  L 1 CW  L 2
MNISTFGSM, L 2 0 ° 98.9298.3596.5483.4098.8682.6475.50
25 ° 98.9798.3097.3383.0498.7982.2071.36
50 ° 98.8397.2896.4676.9098.6780.2270.23
100 ° 98.7495.5497.1483.4098.5788.2776.72
120 ° 98.9094.8096.7681.7098.3988.5874.92
150 ° 98.9291.7095.5475.6597.8887.2076.70
MNISTPGD, L 2 0 ° 98.9487.8776.1798.7798.4684.5376.65
25 ° 99.0787.4677.4598.6698.3285.8876.55
50 ° 98.9490.8582.9498.5898.8684.2273.83
100 ° 98.9091.7087.1097.3999.1586.6677.25
120 ° 98.9895.1495.7495.7599.2192.9284.13
150 ° 98.9291.7095.5475.6597.8887.2073.72
MNISTCW, L 2 0 ° 98.0572.7162.9378.8190.6887.4996.69
25 ° 98.1776.7972.4880.8593.4786.5495.55
50 ° 98.0775.1272.9179.2892.3486.3995.67
100 ° 97.8878.2276.8880.9293.1886.0394.79
120 ° 97.9579.6079.9683.4993.4487.3795.66
150 ° 97.9082.3086.2276.7395.6785.5591.25
CIFAR-10FGSM, L 2 0 ° 93.8992.0082.6965.2977.4575.3463.80
25 ° 94.1089.5681.7766.5881.7176.3966.48
50 ° 94.2392.1885.9572.5883.4980.3167.62
100 ° 93.4184.9882.2891.3390.3491.5082.36
120 ° 94.1683.4880.7690.3989.0890.8781.03
150 ° 93.9581.8979.1889.4788.7989.9976.45
CIFAR-10PGD, L 2 0 ° 93.9472.4261.5294.7865.8191.4865.77
25 ° 93.2067.2258.8391.3660.1688.9857.26
50 ° 93.5670.8961.2590.1164.3089.6358.37
100 ° 93.6276.3368.5791.7374.1690.6966.95
120 ° 94.1474.3366.3690.8876.9790.5476.69
150 ° 93.3562.4258.0685.9370.5687.1273.69
CIFAR-10CW, L 2 0 ° 93.6671.6263.8188.9872.3989.6492.42
25 ° 94.2280.5775.8190.0887.2291.1492.81
50 ° 93.8279.0176.0489.2487.6690.2190.71
100 ° 94.4172.0271.1285.2988.4987.8087.48
120 ° 94.1370.2369.5884.0787.7587.2186.78
150 ° 94.2172.9071.8285.3888.2587.8488.37
CIFAR-100FGSM, L 2 0 ° 73.3456.9150.0649.0658.7555.7148.51
25 ° 74.2460.2151.8248.7860.9856.7452.12
50 ° 73.1958.0849.3255.7060.1660.0552.94
100 ° 73.2559.2152.9160.3865.1662.8156.13
120 ° 74.1355.8749.7358.5166.0161.5156.54
150 ° 74.2756.9750.9457.5865.2462.1157.92
CIFAR-100PGD, L 2 0 ° 74.5328.9919.3869.0619.4064.4240.13
25 ° 73.7528.8918.4165.1421.9964.4339.12
50 ° 73.6640.6726.2366.0732.1166.4041.73
100 ° 74.1246.1233.7964.5442.9866.0648.21
120 ° 74.7541.3628.9061.4840.2264.6849.97
150 ° 74.1733.0824.1054.6836.6159.8146.82
CIFAR-100CW, L 2 0 ° 73.6831.3122.4859.9925.8364.5770.79
25 ° 75.0450.6640.4062.0055.1466.3270.00
50 ° 74.9552.6442.7359.1459.8563.9367.45
100 ° 74.1939.0232.5149.0356.0856.7959.16
120 ° 73.1836.7530.0346.8453.8955.8058.32
150 ° 75.0343.7636.0750.3561.2158.6961.64
Table 4. Computational cost comparison of different adversarial training methods on CIFAR-100. This table reported the computational cost in terms of gradient evaluations, adversarial-example generation time, training time, total GPU time, and storage overhead.
Table 4. Computational cost comparison of different adversarial training methods on CIFAR-100. This table reported the computational cost in terms of gradient evaluations, adversarial-example generation time, training time, total GPU time, and storage overhead.
MethodAttack
Setting
Grad. Evals.
/Sample
Adv. Gen.
Time (h)
Training
Time (h)
GPU
Time (h)
Storage
(GB)
Multi-ATPGD, L 2
PGD L
CW, L 2
9202.8513.4316.282.57
MSDPGD over
L 1 , L 2 , L
300.9010.3511.250.85
ATFGSM, L 2 10.2410.3710.610.85
GVATFGSM, L 2 10.2410.4310.670.85
Table 5. Top-1 Classification Accuracy (%) of Multi-Attack Defense Methods on MNIST, CIFAR-10, and CIFAR-100. Bold indicates the best result in each column.
Table 5. Top-1 Classification Accuracy (%) of Multi-Attack Defense Methods on MNIST, CIFAR-10, and CIFAR-100. Bold indicates the best result in each column.
DatasetMethodTesting SetAvg.
FGSM, L 2 FGSM, L PGD, L 2 PGD, L SLIDE, L 1 CW, L 2
MNISTMulti-AT94.0990.8599.1799.3796.6098.0196.35
MSD81.2668.0897.4196.8784.4278.1684.36
AT98.3596.5483.4098.8682.6475.5089.22
GVAT95.5497.1483.4098.5788.2776.7289.94
CIFAR-10Multi-AT87.2080.9293.0192.6293.0693.4590.04
MSD83.0680.5491.2091.1291.0477.5885.75
AT92.0082.6965.2977.4575.3463.8076.10
GVAT84.9882.2891.3390.3491.5082.3687.13
CIFAR-100Multi-AT60.3061.9971.3676.5274.5878.0070.46
MSD54.9250.9763.4167.8664.8458.3460.05
AT56.9150.0649.0658.7555.7148.5153.17
GVAT59.2152.9160.3865.1662.8156.1359.43
Table 6. White-box robustness evaluation using AutoAttack on MNIST, CIFAR-10, and CIFAR-100. The reported values are Top-1 classification accuracy (%) under APGD-CE, APGD-DLR, FAB-T, Square Attack, and the standard AutoAttack ensemble. Bold indicates the best result in each column.
Table 6. White-box robustness evaluation using AutoAttack on MNIST, CIFAR-10, and CIFAR-100. The reported values are Top-1 classification accuracy (%) under APGD-CE, APGD-DLR, FAB-T, Square Attack, and the standard AutoAttack ensemble. Bold indicates the best result in each column.
DatasetTraining SetGVAT  θ Testing Set
APGD-CE APGD-DLR FAB-T SQUARE STANDARD
MNISTFGSM, L 2 0 ° 34.250.337.857.050.04
25 ° 24.180.118.864.830.02
50 ° 7.460.988.079.740.17
100 ° 5.421.678.5310.730.42
120 ° 35.303.4310.7015.981.14
150 ° 49.1810.9115.5827.537.12
PGD, L 2 0 ° 14.260.0011.900.170.00
25 ° 0.590.007.660.200.00
50 ° 11.700.009.150.130.00
100 ° 1.170.008.351.400.00
120 ° 15.510.1410.903.250.01
150 ° 38.7841.2244.7555.1537.82
CW, L 2 0 ° 1.410.0113.180.220.00
25 ° 0.540.0612.540.650.00
50 ° 1.520.0313.970.350.00
100 ° 0.880.0211.710.960.01
120 ° 1.500.0515.450.610.00
150 ° 4.334.9011.0411.933.08
CIFAR-10FGSM, L 2 0 ° 0.010.070.1618.340.00
25 ° 0.030.200.0926.860.00
50 ° 0.130.210.1529.540.00
100 ° 2.946.301.4044.610.85
120 ° 4.6510.733.4149.602.64
150 ° 4.3811.243.3249.182.39
PGD, L 2 0 ° 0.000.000.533.240.00
25 ° 0.000.000.319.430.00
50 ° 0.000.010.1412.200.00
100 ° 0.020.040.2411.360.00
120 ° 0.000.000.2211.550.00
150 ° 0.230.860.2328.180.08
CW, L 2 0 ° 0.090.290.1719.170.00
25 ° 0.320.770.5126.740.14
50 ° 4.189.612.9846.672.41
100 ° 12.2823.0110.7556.039.52
120 ° 12.2018.959.6354.338.45
150 ° 12.6721.0611.3255.1410.06
CIFAR-100FGSM, L 2 0 ° 1.551.671.5124.780.89
25 ° 1.621.401.2925.120.80
50 ° 1.231.261.1925.360.69
100 ° 2.362.872.6526.431.70
120 ° 2.202.301.9825.851.44
150 ° 2.022.501.9026.211.46
PGD, L 2 0 ° 0.030.020.374.310.00
25 ° 0.120.090.327.250.03
50 ° 0.040.040.348.590.00
100 ° 0.250.240.5214.350.09
120 ° 0.310.250.5116.640.08
150 ° 0.490.600.7617.420.22
CW, L 2 0 ° 0.070.050.287.300.01
25 ° 0.460.440.6917.730.20
50 ° 1.531.731.5223.910.94
100 ° 1.911.871.6824.541.19
120 ° 1.601.721.3923.421.06
150 ° 2.021.771.4723.621.11
Table 7. Classification Top-1 accuracy (%) on CIFAR-100 for models trained with L 2 -adjusted FGSM or PGD adversarial examples at different attack strengths. The third column reports the Top-1 accuracy used to indicate the strength of the corresponding training adversarial examples. Bold indicates the best result in each column.
Table 7. Classification Top-1 accuracy (%) on CIFAR-100 for models trained with L 2 -adjusted FGSM or PGD adversarial examples at different attack strengths. The third column reports the Top-1 accuracy used to indicate the strength of the corresponding training adversarial examples. Bold indicates the best result in each column.
DatasetTraining SetAccuracyTesting Set
Clean FGSM  L 2 FGSM  L PGD  L 2 PGD  L SLIDE  L 1 CW  L 2
CIFAR-100PGD, L 2 2.2373.7723.4816.1566.6116.8161.4438.69
10.2974.8519.0112.3665.6713.6562.2738.53
50.3274.8211.819.6540.0912.0548.7136.82
FGSM, L 2 2.5873.3456.9150.0649.0658.7555.7148.51
15.1173.4155.6939.3659.7641.8163.5341.67
37.4373.3419.3313.5657.9316.5059.6437.16
Table 8. Top-1 accuracy (%) on CIFAR-100 under adversarial examples generated using different maximum sampling angles θ . The model was trained only on clean examples. Lower accuracy indicates stronger attack strength.
Table 8. Top-1 accuracy (%) on CIFAR-100 under adversarial examples generated using different maximum sampling angles θ . The model was trained only on clean examples. Lower accuracy indicates stronger attack strength.
GVAT  θ FGSM  L 2 PGD  L 2 CW  L 2
0 ° 5.7816.3824.35
25 ° 5.9417.3022.58
50 ° 6.9119.4317.47
100 ° 18.3534.5710.65
120 ° 26.8947.2710.12
150 ° 32.4159.3810.98
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Niu, D.; Shi, L. Generalization of Defense Effects Learned from a Single Adversarial Attack. Computation 2026, 14, 211. https://doi.org/10.3390/computation14090211

AMA Style

Niu D, Shi L. Generalization of Defense Effects Learned from a Single Adversarial Attack. Computation. 2026; 14(9):211. https://doi.org/10.3390/computation14090211

Chicago/Turabian Style

Niu, Dongxian, and Lin Shi. 2026. "Generalization of Defense Effects Learned from a Single Adversarial Attack" Computation 14, no. 9: 211. https://doi.org/10.3390/computation14090211

APA Style

Niu, D., & Shi, L. (2026). Generalization of Defense Effects Learned from a Single Adversarial Attack. Computation, 14(9), 211. https://doi.org/10.3390/computation14090211

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop