Adversarial AutoAugment

Xinyu Zhang, Qiang Wang, Jian Zhang, Zhao Zhong

TL;DR

Adversarial AutoAugment (AdvAA) transforms the search for data augmentation policies into a "Min-Max" game where a policy network acts as an adversary, generating increasingly difficult image transformations to challenge a target model. This approach achieves state-of-the-art accuracy while being roughly $12\times$ more computationally efficient than the original AutoAugment.

What Problem Does This Paper Address?

Deep learning models rely heavily on Data Augmentation (DA)—techniques like rotating, cropping, or flipping images—to generalize better to new data. While researchers historically designed these policies by hand, recent methods like AutoAugment (AA) use Reinforcement Learning to find the best policies automatically.

However, traditional AutoAugment has two major flaws:

  1. Extreme Cost: It requires tens of thousands of GPU hours because it trains thousands of "child models" to evaluate different policies.
  2. Proxy Task Gap: To save time, AA searches for policies on small datasets and models, then transfers them to the final "target" task. These transferred policies are often sub-optimal for larger, more complex target models.

The authors of this paper aim to search for augmentation policies directly on the target task in a computationally affordable way.

Methods

The authors propose a framework called Adversarial AutoAugment, formulated as a Min-Max game:

Adversarial AutoAugment Framework
  • The Target Network (The Learner): Aims to minimize training loss. It tries to learn robust features from the images it is given.
  • The Policy Network (The Adversary): An RNN-based controller that aims to maximize the target network's loss. It searches for "hard" augmentation policies that expose the learner's weaknesses.

Key Innovations

  • Online Search: Unlike prior work that searches for a policy before training, AdvAA searches during training. The policy is dynamic; as the target model gets smarter, the adversary generates harder examples.
  • Large Batch Augmentation: For every mini-batch of data, the system generates $M$ different augmented versions in parallel. This "large batch" approach stabilizes training and provides more feedback to the policy network.
  • REINFORCE Algorithm: Since image transformations (like "rotate 15 degrees") are not differentiable, the authors use the REINFORCE policy gradient method to update the adversary based on the training losses of the target network.

Datasets

The method was evaluated on three standard computer vision benchmarks:

  • CIFAR-10: 60,000 small images across 10 classes.
  • CIFAR-100: Same as above, but with 100 classes.
  • ImageNet: The gold standard for image classification, containing ~1.2 million training images across 1,000 classes.

Key Insights and Ideas

  • Harder is Better: The core "aha" moment is that a model becomes more robust when it is forced to learn from "adversarial" augmentations. By specifically looking for transformations that the model struggles with, the model is pushed to learn more invariant features.
  • Dynamic Difficulty: The paper shows that the "magnitude" of augmentations (how much an image is distorted) naturally increases as training progresses. The adversary learns to "turn up the heat" as the learner gets better.
Evolution of augmentation policies over training epochs
  • Efficiency through Reuse: By evaluating the policy network using the same training steps used to train the target model, the authors eliminate the need to train thousands of separate child models.

Key Results

AdvAA delivers significant improvements in both performance and speed:

  • CIFAR-10: Achieved a 1.36% top-1 test error (using PyramidNet+ShakeDrop), which was the best-performing single model at the time of publication.
  • ImageNet: Improved ResNet-50 accuracy from 76.3% (baseline) to 79.40%. It even reached 80.00% on the ResNet-50-D variant without using any extra data.
  • Speedup: On ImageNet, AdvAA reduced the total computing cost by 12× and shortened the wall-clock time overhead by 11× compared to the original AutoAugment.
  • Transferability: Policies learned on ImageNet were found to transfer very well to other architectures and datasets, outperforming policies found via traditional proxy-task searches.

Limitations and Future Work

  • Hyperparameter Sensitivity: The method introduces a new parameter $M$ (the number of parallel augmentations). While the authors found $M=8$ to be a sweet spot, higher values increase memory requirements.
  • Search Space Constraints: The search space is still limited to a predefined set of 16 discrete operations (rotation, color inversion, etc.). Future work could explore more continuous or generative augmentation spaces.
  • Computational Floor: While much faster than AutoAugment, the "large batch" requirement ($M=8$) still means the training process is more computationally intensive than standard training with a fixed augmentation policy.

Summary updated

BibTeX
@inproceedings{zhang2020adversarial,
  author = {Xinyu Zhang and Qiang Wang and Jian Zhang and Zhao Zhong},
  title = {{Adversarial AutoAugment}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
}
Figure