Abstract
Neural networks are susceptible to adversarial samples: samples with imperceptible noise, crafted to manipulate a network's prediction. In order to learn robust models, a training procedure called Adversarial Training has been introduced. During adversarial training, models are trained with mini-batches containing adversarial samples. To scale adversarial training for large datasets and networks, fast and simple methods like the Fast Gradient Sign Method (FGSM) are used. However, models trained using single-step adversarial training methods often learn to generate weaker adversaries by masking their gradients, rather than becoming truly robust. In this work, we propose a regularization term in the training loss to mitigate the effect of gradient masking. The proposed term penalizes the distance between logits of FGSM and R-FGSM (FGSM with added random noise) adversaries. This single-step approach is significantly faster than state-of-the-art iterative methods like PGD while achieving comparable robustness.
Introduction: The Efficiency-Robustness Trade-off
Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial samples—inputs with tiny, imperceptible perturbations designed to fool the model. To defend against this, researchers use Adversarial Training, where the model is trained on these malicious samples. However, a significant trade-off exists between computational efficiency and genuine robustness.
Single-step methods, such as the Fast Gradient Sign Method (FGSM), are computationally efficient but often fail due to gradient masking. In these cases, the model learns to make its local loss landscape jagged and highly non-linear. This "breaks" simple gradient-based attacks during training, making the model appear robust when it is actually still vulnerable to more sophisticated multi-step attacks. Conversely, multi-step methods like Projected Gradient Descent (PGD) are highly effective but computationally expensive, requiring many iterations for every training step. This paper proposes a method to bridge this gap, achieving the speed of single-step training with the genuine robustness of iterative methods.
Methodology: Penalizing the Masking Signature
The core contribution is a new regularization term added to the standard training loss. The authors observed that gradient masking has a distinct quantitative signature: a dramatic spike in the Euclidean ($L_2$) distance between the logits (pre-softmax outputs) of two different fast attacks.
Specifically, the regularizer penalizes the distance between:
- An adversarial sample generated by standard FGSM.
- An adversarial sample generated by R-FGSM (FGSM preceded by a small random perturbation).
By forcing these two outputs to be similar, the regularizer discourages the model from creating sharp, jagged loss landscapes. This keeps the local loss function linear enough that a single-step attack remains a "strong" adversary during training, forcing the model to learn real features rather than numerical tricks.
Results and Robustness
The proposed method was evaluated on MNIST and CIFAR-10 benchmarks using architectures like LeNet+ and ResNet-34. The results demonstrate that the regularizer effectively prevents the collapse of robustness seen in standard single-step training.
On MNIST, the proposed method achieved approximately 87.7% accuracy against a powerful 100-step PGD attack, whereas standard FGSM training collapsed to near 0.01% accuracy. On CIFAR-10, the method maintained "on par" robustness with PGD training while being more than twice as fast: PGD training took roughly 238 seconds per epoch, while the proposed regularized method took only 108 seconds.
Furthermore, the models showed strong resistance to "transfer attacks," where an adversary is generated on a different model and tested on the target. This confirms the robustness is genuine and not just a result of masking gradients from a specific attack algorithm.
Conclusion
By introducing a simple logit-distance regularizer, this work demonstrates that single-step adversarial training can be made genuinely robust. This approach provides a scalable path for training robust deep learning models on larger datasets without the prohibitive cost of iterative adversarial generation. Future work may explore the theoretical relationship between logit distance and loss landscape curvature, as well as scaling the method to larger datasets like ImageNet.
Summary updated