TeachAugment: Data Augmentation Optimization Using Teacher Knowledge

Teppei SuzukiCVPR 2022 · DOI

Introduction

Data augmentation is a cornerstone of modern deep learning, essential for training robust models that generalize well to unseen data. However, determining the optimal intensity and type of augmentation remains a significant challenge. If transformations are too conservative, the model fails to learn invariant features; if they are too aggressive, the resulting images may lose their semantic meaning (e.g., becoming pure noise), leading to a phenomenon known as "model collapse."

Existing automated methods like AutoAugment require immense computational resources, often thousands of GPU hours, to search for optimal policies. Faster adversarial methods, which attempt to generate challenging images by maximizing training loss, frequently suffer from collapse unless researchers manually constrain the search space or tune complex hyperparameters for every specific task.

Conceptual comparison between standard adversarial augmentation and TeachAugment.

Methodology

TeachAugment addresses the collapse problem by introducing a "teacher model" into the adversarial optimization loop. This framework ensures that augmented images remain informative yet recognizable.

The Dual-Objective Function

The core of TeachAugment is a minimax game. The augmentation model is trained with a dual objective: it must maximize the loss of the target model (to make the image "hard" for the learner) while simultaneously minimizing the loss of a teacher model (to ensure the image remains "recognizable" and semantically consistent).

Neural Augmentation Models

Unlike traditional methods that select from a discrete set of functions (e.g., rotate, shear), TeachAugment utilizes small Multi-Layer Perceptrons (MLPs) to generate color and geometric transformations. This approach makes the entire augmentation process differentiable, allowing the policy to be optimized via standard gradient descent rather than expensive reinforcement learning or grid searches.

The two-step optimization process for updating the target and augmentation models.

Teacher Strategies and Stabilization

The authors found that an Exponential Moving Average (EMA) teacher—a version of the target model updated slowly over time—performed best, eliminating the need for a separate pretrained teacher. To stabilize training, the framework incorporates techniques such as non-saturating loss, experience replay for augmentation policies, and Sliced Wasserstein Distance (SWD) to prevent extreme color drift.

Experimental Evaluation

TeachAugment was evaluated across multiple domains to demonstrate its versatility and performance:

  • Image Classification: On ImageNet, TeachAugment achieved a 22.2% top-1 error using a ResNet-50, surpassing both RandAugment and AutoAugment without requiring per-task hyperparameter tuning.
  • Semantic Segmentation: In tests on the Cityscapes dataset, TeachAugment consistently improved mIoU (Mean Intersection over Union) across various architectures (FCN, PSPNet, DeepLabv3), whereas traditional methods occasionally degraded performance on certain models.
  • Unsupervised Learning: When integrated into the SimSiam framework, TeachAugment boosted linear evaluation accuracy on ImageNet, proving that teacher-guided augmentation is effective even in the absence of explicit labels.

Discussion and Key Insights

The primary innovation of TeachAugment is the use of a teacher as a semantic "guardrail." By requiring that the teacher model can still classify an image correctly, the framework ensures that augmentations push the boundaries of the target model's knowledge without crossing into nonsense. This distinguishes "informative" images from merely "difficult" ones.

Limitations

While powerful, the current implementation of TeachAugment focuses on global color and geometric transformations. It does not yet support local transformations (like Equalize) or non-geometric augmentations such as Cutout or Mixup. Additionally, the alternating optimization loop increases training time by approximately three times compared to standard training, though this is significantly lower than the search costs associated with original AutoAugment methods.

Summary updated

BibTeX
@inproceedings{suzuki2022teachaugment,
  author = {Teppei Suzuki},
  title = {{TeachAugment: Data Augmentation Optimization Using Teacher Knowledge}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.01063},
}
Figure