In the arms race between hackers and AI developers, "adversarial training" has become the gold standard for defense. By training a model on images specifically designed to fool it, we can make that model more robust. However, there has always been a "robustness tax": as models get better at resisting attacks, their accuracy on normal, "natural" images often takes a hit.
A team of researchers from the National University of Singapore and RIKEN AIP recently presented a paper at ICML that suggests we’ve been attacking our models too hard during training. Their solution, Friendly Adversarial Training (FAT), suggests that "friendly" attacks—those that just barely trip the model up—actually lead to better, more generalized performance.
TL;DR
Standard adversarial training uses the "most adversarial" data to harden models, which often ruins their accuracy on normal images. This paper introduces Friendly Adversarial Training (FAT), which uses "least adversarial" misclassified data to find a better balance, achieving high robustness while significantly improving natural accuracy and training speed.
What Problem Does This Paper Address?
Most adversarial training follows a minimax strategy: an "inner" loop searches for the perturbation that maximizes the model's loss (the strongest attack), and an "outer" loop updates the model to minimize that loss.
The authors argue this approach is too pessimistic. When we force a model to fit the most extreme adversarial examples, we encounter the cross-over mixture problem. This happens when an adversarial version of a "dog" image is pushed so far that it actually looks like (or occupies the feature space of) a "cat." If the model is forced to label this "cat-like" image as a "dog," it gets confused, leading to poor generalization on normal images.
Methods
The core innovation is a shift in the training objective. Instead of searching for the data that maximizes loss, FAT searches for friendly adversarial data: the data that minimizes loss among all samples that are already "confidently misclassified."
To implement this, the authors propose early-stopped PGD (PGD-$K$-$\tau$).
- Standard PGD: Runs for a fixed number of steps (e.g., 10) to find the absolute worst-case perturbation.
- Early-stopped PGD: Starts searching for an adversarial example, but as soon as the image is misclassified by a certain margin ($\rho$), the search stops.
This ensures the adversarial examples stay near the decision boundary rather than crossing deep into the territory of another class. It also acts as a form of curriculum learning, where the model starts with easy "friendly" adversaries and gradually faces tougher ones as its own decision boundaries improve.
Datasets
The authors evaluated their method on two standard computer vision benchmarks:
- CIFAR-10: A collection of 60,000 small images across 10 classes (planes, dogs, etc.).
- SVHN (Street View House Numbers): A real-world dataset of house numbers cropped from Google Street View images.
They tested these using various architectures, including Small CNNs, ResNet-18, and Wide ResNet (WRN-32-10 and WRN-34-10).
Key Insights and Ideas
- The Nietzsche Principle: Inspired by the quote "that which does not kill us makes us stronger," the authors posit that training on "killer" adversaries (those that cross deep into other classes) destroys the learning process. Training on "survivable" adversaries builds better defenses.
- Efficiency is a Feature: Because the PGD search stops early once a misclassification is found, FAT requires significantly fewer backward propagations. This makes it much faster than standard adversarial training.
- Larger Perturbation Bounds: Standard training often fails if the attack radius ($\epsilon$) is too large. FAT allows models to be trained with larger $\epsilon$ values without the training "collapsing," because it prevents the cross-over mixture problem even at higher distances.
- Compatibility: FAT isn't just a standalone method; it can be integrated into other popular frameworks like TRADES or MART to improve their natural accuracy.
Key Results
The results show that FAT effectively breaks the "robustness vs. accuracy" trade-off:
- Higher Natural Accuracy: On CIFAR-10 using a WRN-32-10, FAT achieved 89.34% natural accuracy, compared to 87.30% for standard Madry adversarial training.
- Competitive Robustness: Despite being "friendlier," FAT maintained or exceeded the robustness of other methods against strong attacks like PGD-100 and C&W attacks.
- State-of-the-Art Performance: When combined with the TRADES framework, FAT achieved a natural accuracy of 89.94% while keeping robust accuracy high, outperforming previous benchmarks.
- Speed: Training statistics showed that FAT often requires only 20-50% of the computational effort for adversarial data generation compared to fixed-step PGD.
Limitations and Future Work
While FAT shows impressive empirical results, the authors note a few areas for further exploration:
- Hyperparameter Tuning: The "stop" threshold ($\tau$ or $\rho$) is a new hyperparameter that needs to be tuned. While the paper suggests $\tau \in \{0, 1, 2, 3\}$ is usually sufficient, finding the optimal value automatically would be a plus.
- Theoretical Depth: While the authors provide an upper bound on adversarial risk to justify FAT, they suggest more work is needed to theoretically study the generalization of FAT through lenses like Rademacher complexity.
- Attack Variety: The current implementation focuses on PGD-based attacks; exploring how "friendly" versions of other attacks (like AutoAttack) behave could be beneficial.
Primary Source: Attacks Which Do Not Kill Training Make Adversarial Learning Stronger (ICML 2020)
Summary updated