Automated Robustness with Adversarial Training as a Post-Processing Step

Ambrish Rawat, Mathieu Sinn, Beat BuesserarXiv 2021

Introduction

Deep learning models are notoriously fragile; small, imperceptible perturbations, known as adversarial examples, can easily trick them into making incorrect predictions. While Adversarial Training (AT)—training a model on these "tricky" examples—is a proven defense, it is computationally expensive and highly sensitive to hyperparameters such as the attack budget ($\epsilon$) and the ratio of adversarial to clean data.

To address these challenges, researchers often employ Neural Architecture Search (NAS) to automatically discover robust designs. However, searching for robustness during the NAS process is computationally intensive, often requiring weeks of GPU time. This paper introduces HAPS (Hardening As Post-processing Step), a fully automated pipeline that decouples architecture search from robustness training. The authors investigate whether a high-performing architecture can be found first and "hardened" later, achieving state-of-the-art robustness with significantly reduced overhead.

Methodology: HAPS

The proposed HAPS pipeline consists of two distinct stages:

  1. Neural Architecture Search: An evolutionary algorithm (NCEvolve) is used to find an optimal network architecture based solely on standard accuracy.
  2. Hardening As Post-processing Step: The core contribution is an automated "hardening" protocol that utilizes two critical annealing policies to prevent "training collapse":
  3. Sample Annealing: The training starts with 0% adversarial samples in each batch, gradually increasing to 50%.
  4. Budget Annealing: The perturbation budget ($\epsilon$) starts at zero and is incrementally increased (e.g., up to 16 for image data).

These annealing steps ensure that the model is not overwhelmed by strong adversarial attacks early in the training process, allowing for stable convergence across various datasets without manual hyperparameter tuning.

Experimental Evaluation

The HAPS approach was validated across a diverse set of tasks, including 11 image classification datasets (e.g., CIFAR10, SVHN, GTSRB) and 9 text classification datasets (e.g., IMDB, CoLA). For text, adversarial attacks were conducted in the GloVe embedding space.

Results on Image Classification

On the CIFAR10 benchmark, HAPS achieved a robust accuracy of 46.4%, outperforming or matching state-of-the-art methods that incorporate robustness directly into the search process.

Table 1: Comparison of HAPS against other methods on CIFAR10. HAPS achieves competitive robust accuracy with a significantly lower time budget.

As shown in Table 1, HAPS reached this level of robustness in approximately 2 days, compared to 14 days for search-based methods—a 7x speedup. The effectiveness of the budget annealing process is further visualized in Figure 1.

Figure 1: Robustness evaluation for different phases of HAPS on CIFAR10. As the training budget $\epsilon$ increases through annealing, the model becomes resilient to stronger PGD attacks.

Generalization to Text

The method also demonstrated strong performance in the NLP domain. For instance, on the CoLA dataset, robust accuracy improved from 1.89% (using standard NCEvolve) to over 70% after applying the HAPS hardening process.

Discussion and Key Insights

The results suggest that a "special" architecture is not strictly necessary for robustness; standard architectures optimized for accuracy can be effectively hardened post-hoc. The primary factor for success appears to be training stability rather than specific architectural features. By gradually increasing the difficulty of adversarial examples, the system adapts to any dataset automatically.

However, a "robustness tax" remains evident: hardening typically results in a 5-10% decrease in accuracy on clean, benign data. Furthermore, HAPS showed limitations on datasets with low data density (e.g., Food101), where poor mixing during adversarial training hindered performance.

Conclusion

HAPS provides a highly efficient, automated alternative to traditional robust NAS. By treating robustness as a post-processing step with strategic annealing, it achieves competitive results with a fraction of the computational cost. Future work may explore the applicability of this approach to other adversarial threat models beyond $l_\infty$ bounded perturbations.

Summary updated

BibTeX
@misc{rawat2021automated,
  author = {Ambrish Rawat and Mathieu Sinn and Beat Buesser},
  title = {{Automated Robustness with Adversarial Training as a Post-Processing Step}},
  year = {2021},
  eprint = {2109.02532},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.02532},
}
Figure