A2: Efficient Automated Attacker for Boosting Adversarial Training

Zhuoer Xu, Guanghui Zhu, Changhua Meng, Shiwen Cui, Zhenzhe Ying, Weiqiang Wang, Ming Gu, Yihua Huang

TL;DR

Adversarial training (AT) is only as good as the "attacker" used during training, but manually tuning these attackers is a slow, expert-heavy process. $A^2$ (Automated Attacker) is a new framework that automatically searches for and constructs the most effective adversarial perturbations on-the-fly, boosting model robustness across various datasets with negligible computational overhead.

What Problem Does This Paper Address?

Deep Neural Networks are notoriously fragile; tiny, imperceptible "adversarial perturbations" can trick them into making confident, incorrect predictions. Adversarial Training (AT) is the most effective defense, where a model is trained on "worst-case" examples generated by an attacker (typically using Projected Gradient Descent, or PGD).

However, AT faces a "strength vs. efficiency" dilemma. To get a truly robust model, you need a strong attacker. But making an attacker stronger usually means increasing the number of iterations (steps), which linearly increases training time. Furthermore, the "best" attack strategy—the right step size and method—often changes depending on the specific image being processed and the current state of the model. Manually tuning these hyperparameters for every scenario is impossible. The authors of $A^2$ aim to automate this "inner maximization" process to find stronger perturbations more efficiently.

Methods

The authors propose $A^2$, a parameterized automated attacker that treats the search for an attack strategy as an optimization problem.

Architecture of the A2 automated attacker framework
  1. Attacker Space: Instead of a fixed PGD attack, they define a search space consisting of $K$ "one-step attacker cells." Each cell contains:
  2. Perturbation Block: A choice of methods like FGM, FGSM, momentum-based versions, random noise, or an "Identity" operation (which allows the attacker to learn to stop early).
  3. Step Size Block: A range of potential step sizes.
  4. Attention-Based Selection: $A^2$ uses an attention mechanism to decide which operation to use. It takes the gradient of the current loss as a "query" and matches it against "keys" representing different attack operations.
  5. Differentiable Search: To make the choice of discrete attack methods searchable via gradient descent, they employ the Gumbel-Softmax reparameterization trick. This allows the system to backpropagate through the "choice" of an attack method.
  6. Bilevel Optimization: The training becomes a two-part dance: the attacker ($\alpha$) is updated to maximize the model's loss (finding the worst-case), while the model ($\theta$) is updated to minimize that loss.

Datasets

The researchers evaluated $A^2$ on three standard computer vision benchmarks:

  • CIFAR-10 & CIFAR-100: The industry standards for small-scale image classification.
  • SVHN (Street View House Numbers): A dataset of house numbers which presents different challenges than natural object recognition.

They tested these across multiple architectures, including ResNet-18 and various WideResNet (WRN-34-10, WRN-28-10) models.

Key Insights and Ideas

  • Dynamic Adaptation: The "aha moment" here is that the optimal attack isn't static. $A^2$ learns that different images require different "medicine." By adapting the attack on-the-fly, it finds vulnerabilities that fixed-step PGD misses.
  • Efficiency via Intelligence: A 20-step $A^2$ attack was found to be more effective than a 100-step PGD attack. This proves that how you take your steps is more important than how many steps you take.
  • Plug-and-Play Generality: $A^2$ isn't a new standalone defense; it’s a better "inner loop." The authors showed it could be combined with existing state-of-the-art methods like TRADES, MART, and AWP, consistently improving their results.
  • The "Identity" Trick: By including an "Identity" operation in the search space, the attacker can learn to stop perturbing an image once it has successfully fooled the model, preventing "over-attacking" which can actually hurt the training process.

Key Results

Comparison of attack effects between A2 and standard PGD
  • Stronger Attacks: In head-to-head tests against fixed models, $A^2$ consistently achieved lower "accuracy under attack" (meaning a more successful attack) than PGD at the same step count. For example, on a MART-trained ResNet, 10-step $A^2$ reached 53.65% accuracy vs. PGD-10's 54.78%.
  • Improved Robustness: When used for training, $A^2$ boosted the final robustness of models. On CIFAR-10 using the WRN-34-10 architecture, combining $A^2$ with the AWP method achieved a 54.86% score on the rigorous AutoAttack benchmark, outperforming the standard AWP (54.04%).
  • Low Overhead: Despite the added complexity of the attention mechanism, the training time for $A^2$ is very close to standard PGD. For a WideResNet-34, 20-step PGD took ~287 seconds per epoch, while 20-step $A^2$ took ~302 seconds—a small price to pay for the robustness gain.

Limitations and Future Work

  • Norm Constraints: The current work focuses primarily on $L_\infty$ norm-bounded attacks. Extending this to $L_2$ or other non-norm-based perturbations remains a future step.
  • Targeted Attacks: The authors suggest that adding "target loss" (trying to force the model into a specific wrong class) to the attacker space could further refine the training.
  • Beyond Vision: While this paper focuses on images, the authors express interest in applying the $A^2$ framework to Natural Language Processing (NLP), where adversarial examples are often discrete (changing words) and even harder to tune manually.

Summary updated

BibTeX
@inproceedings{xu2022efficient,
  author = {Zhuoer Xu and Guanghui Zhu and Changhua Meng and Shiwen Cui and Zhenzhe Ying and Weiqiang Wang and Ming Gu and Yihua Huang},
  title = {{A2: Efficient Automated Attacker for Boosting Adversarial Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=oternsUQ7C},
}
Figure