Abstract: Making deep neural networks robust to small adversarial noises has recently been sought in many applications. Adversarial training through iterative projected gradient descent (PGD) has been established as one of the mainstream ideas to achieve this goal. However, PGD is computationally demanding and often prohibitive in case of large datasets and models. For this reason, single-step PGD, also known as FGSM, has recently gained interest in the field. Unfortunately, FGSM-training leads to a phenomenon called "catastrophic overfitting," which is a sudden drop in the adversarial accuracy under the PGD attack. In this paper, we support the idea that small input gradients play a key role in this phenomenon, and hence propose to zero the input gradient elements that are small for crafting FGSM attacks. Our proposed idea, while being simple and efficient, achieves competitive adversarial accuracy on various datasets.
Introduction: The Challenge of Efficient Adversarial Training
Deep neural networks are notoriously fragile when faced with adversarial examples—inputs specifically crafted to trick them. To fix this, researchers use Adversarial Training (AT), where the model is trained on these "attack" images. The gold standard for AT is Projected Gradient Descent (PGD), but it is computationally expensive because it requires multiple iterations to craft each attack. The Fast Gradient Sign Method (FGSM) is a much faster, single-step alternative. However, FGSM-trained models often suffer from Catastrophic Overfitting (CO): the model appears robust during training, but its accuracy against a strong PGD attack suddenly drops to near zero in a single epoch.
Explaining Catastrophic Overfitting
The authors hypothesize that CO is caused by the mathematical properties of the sign function used in FGSM. When input gradients are very close to zero, even a tiny change in the model's weights can flip the sign of the gradient. This causes a massive, "catastrophic" jump in the weight updates, breaking the model's robustness.
Empirical evidence shows that as models become more robust, their input gradients become sparser (more elements near zero). Ironically, these near-zero elements are what trigger the catastrophic weight updates that eventually destroy robustness.
Proposed Methods: ZeroGrad and MultiGrad
To solve this, the authors propose two low-overhead techniques:
- ZeroGrad: This method identifies "fragile" elements of the input gradient—those with the smallest absolute values. It calculates a threshold (based on a quantile $q$) and sets any gradient element below that threshold to zero before applying the
signfunction. - MultiGrad: This approach seeks consensus by generating $N$ different FGSM perturbations from different random points. It only keeps gradient elements where all $N$ versions agree on the sign. If they disagree, the gradient is likely "fragile" and is set to zero.
Experimental Evaluation
The researchers evaluated their methods on CIFAR-10, CIFAR-100, and SVHN. On CIFAR-10, ZeroGrad and MultiGrad achieved ~47.5% and ~47.8% robust accuracy (against PGD-50), respectively. This is highly competitive with PGD-10 training (~50%) but achieved much faster.
In terms of efficiency, ZeroGrad's training time is nearly identical to standard FGSM-RS. In a head-to-head on a T4 GPU, ZeroGrad finished 30 epochs in ~22.6 minutes, while GradAlign took ~87.9 minutes and PGD-10 took ~124.2 minutes.
Discussion and Future Work
While effective, these methods have limitations. The quantile $q$ for ZeroGrad and the number of samples $N$ for MultiGrad require tuning for different datasets. For instance, SVHN requires a much higher threshold ($q=0.7$) due to irrelevant background pixels. Future work could focus on automated tuning methods or exploring gradient clipping as a complementary technique to prevent catastrophic weight jumps.
Summary updated