Efficient and Effective Augmentation Strategy for Adversarial Training

Sravanti Addepalli, Samyak Jain, R. Venkatesh Babu

Abstract

Adversarial training (AT) of Deep Neural Networks is known to be significantly more data-hungry when compared to standard training. Furthermore, complex data augmentations such as AutoAugment, which have led to substantial gains in standard training of image classifiers, have not been successful with Adversarial Training. We first explain this contrasting behavior by viewing augmentation during training as a problem of domain generalization, and further propose Diverse Augmentation-based Joint Adversarial Training (DAJAT) to use data augmentations effectively in adversarial training. We aim to handle the conflicting goals of enhancing the diversity of the training dataset and training with data that is close to the test distribution by using a combination of simple and complex augmentations with separate batch normalization layers during training. We further utilize the popular Jensen-Shannon divergence loss to encourage the joint learning of the diverse augmentations, thereby allowing simple augmentations to guide the learning of complex ones. Lastly, to improve the computational efficiency of the proposed method, we propose and utilize a two-step defense, Ascending Constraint Adversarial Training (ACAT), that uses an increasing epsilon schedule and weight-space smoothing to prevent gradient masking. The proposed method DAJAT achieves substantially better robustness-accuracy trade-off when compared to existing methods on the RobustBench Leaderboard on ResNet-18 and WideResNet-34-10.

Introduction

Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial attacks—small, intentional perturbations that can cause a model to misclassify an image with high confidence. Adversarial Training (AT), where a model is trained on these perturbed images, remains the most effective defense. However, AT suffers from a significant "sample complexity" problem: it requires far more data than standard training to achieve comparable generalization.

In standard computer vision, data scarcity is often mitigated through complex data augmentations like AutoAugment. Curiously, these same techniques frequently degrade performance when applied to Adversarial Training. This paper identifies this phenomenon as a domain generalization problem and introduces DAJAT (Diverse Augmentation-based Joint Adversarial Training) and ACAT (Ascending Constraint Adversarial Training) to bridge the gap between data augmentation and adversarial robustness.

The Challenge: Why Augmentation Fails in AT

The authors argue that complex augmentations (e.g., shearing, rotating, color-shifting) create a significant "domain shift" from the original test distribution. In standard training, models can often ignore these shifts to learn robust features. However, because Adversarial Training is already a high-complexity task, the model struggles to reconcile the shifting low-level statistics of complex augmentations with the requirement of defending against adversarial perturbations. This results in a trade-off where diversity hurts the model's ability to generalize to the test set.

Proposed Methodology

1. DAJAT: Diverse Augmentation-based Joint Adversarial Training

DAJAT is designed to leverage the diversity of complex augmentations without succumbing to the domain shift problem. It employs two key mechanisms:

  • Split Batch Normalization (BN): This is the core innovation. Instead of forcing all images through the same Batch Norm layers, the model maintains separate BN statistics and parameters for "simple" augmentations (like random crops and flips) and "complex" augmentations (like AutoAugment). This allows the model to adapt to the different low-level statistics of each augmentation type independently, preventing the complex augmentations from polluting the features learned from the base distribution.
  • Jensen-Shannon (JS) Divergence Loss: To ensure the model learns consistent features across these different domains, the training loss includes a JS divergence term. This encourages the model to produce similar predictions for the same image regardless of the augmentation applied. In effect, the "easier" simple augmentations guide the learning process for the more difficult, heavily distorted complex ones.

2. ACAT: Efficient Adversarial Training

Standard AT is computationally expensive, often requiring 10 or more optimization steps per training image to generate an effective adversarial attack. To make DAJAT practical, the authors propose ACAT, a two-step defense strategy:

  • 2-Step Defense: ACAT utilizes only two attack steps during training, significantly reducing the computational overhead.
  • Ascending Epsilon Schedule: Rather than training with the full perturbation radius ($\epsilon$) from the start, ACAT gradually increases $\epsilon$ as training progresses. This curriculum-based approach allows the model to converge more stably.
  • Weight-Space Smoothing: By incorporating Adversarial Weight Perturbation (AWP), ACAT ensures the loss landscape remains smooth. This prevents "gradient masking," a failure mode where a model appears robust during training but remains vulnerable to sophisticated attacks.

Experimental Results

The researchers evaluated DAJAT on CIFAR-10, CIFAR-100, and ImageNette (a 128x128 resolution subset of ImageNet). The results demonstrate a superior trade-off between standard accuracy and adversarial robustness:

  • RobustBench Performance: DAJAT achieved state-of-the-art results on the CIFAR-100 RobustBench leaderboard for the WideResNet-34-10 architecture.
  • Accuracy Gains: Compared to the standard TRADES-AWP defense, DAJAT improved clean accuracy by 3.8% to 7% across various benchmarks while simultaneously increasing robustness against the rigorous "AutoAttack" suite.
  • Data Efficiency: The benefits of DAJAT were most pronounced in low-data regimes, proving that diverse augmentations can effectively compensate for a lack of original training samples if managed correctly.
  • Computational Speed: Despite the use of multiple augmentations, the ACAT schedule allowed the training process to be more efficient than the traditional 10-step TRADES-AWP baseline.

Conclusion and Future Work

DAJAT demonstrates that complex data augmentations can be a powerful tool for Adversarial Training if the resulting domain shift is managed through Split Batch Normalization and consistency regularization. While the current work focuses on standard AutoAugment policies and BN-based architectures, it provides a framework for future exploration into more aggressive augmentations—such as those generated by GANs or Diffusion models—and adaptation to non-BN architectures like Vision Transformers.

Summary updated

BibTeX
@inproceedings{addepalli2022efficient,
  author = {Sravanti Addepalli and Samyak Jain and R. Venkatesh Babu},
  title = {{Efficient and Effective Augmentation Strategy for Adversarial Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=CbqTiSVijr},
}
Figure