NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Safe Augmentation: Learning Task-Specific Transformations from Data

Irynei Baran, Orest Kupyn, Arseny KravchenkoarXiv 2019

Introduction

Data augmentation is a cornerstone of modern deep learning, particularly in computer vision. By artificially expanding a dataset through transformations like flipping, cropping, or color jittering, models can achieve significantly better generalization. However, selecting the appropriate augmentations currently remains a manual, expert-driven process. A transformation that is beneficial for one dataset, such as horizontal flipping for natural images (ImageNet), can be detrimental for another, such as digit recognition (SVHN), where it might change the semantic meaning of the data (e.g., flipping a '6' into a '9').

Existing automated solutions like Google’s AutoAugment rely on computationally expensive reinforcement learning. The authors of this paper propose Safe Augmentation, a model-agnostic method that automatically identifies task-specific transformations that preserve the underlying data distribution without requiring exhaustive, "black-box" searches.

Methodology: The Safety Filter

The researchers developed a four-step pipeline to distinguish "safe" augmentations from harmful ones:

  1. Multi-label Training: A Convolutional Neural Network (CNN) is trained to simultaneously perform the primary task (e.g., classification) and a proxy task: predicting which specific augmentations from a candidate set were applied to the input.
  2. False Positive Evaluation: The trained model is tested on "clean" (unaugmented) data. The "false positive" rate measures how often the model incorrectly identifies an augmentation as present. A high rate suggests the transformation makes images look out-of-distribution.
  3. Classification Accuracy: The model's ability to correctly identify applied transformations is measured. A high accuracy indicates the transformation provides a clear, learnable signal.
  4. The Safety Filter: An augmentation is deemed "safe" if it maintains a low false-positive rate on clean data and high classification accuracy when applied.
Augmentation vs. Classification performance on Tiny ImageNet. The safety filter uses classification accuracy and false positive rates to identify beneficial transformations.

Task-Specific Discovery and Results

The method was validated across several standard benchmarks, including CIFAR-10/100, SVHN, Tiny ImageNet, and Cityscapes. A key insight is that the "safe" set varies significantly by task. For instance, in the SVHN digit dataset, color-based transforms (Brightness, Contrast, Gamma) were identified as safe, while many geometric transforms were rejected to maintain the integrity of the digits.

Safe augmentation sets across different datasets.

Performance Highlights

  • CIFAR-10: Accuracy improved to 88.59% (DenseNet-121), compared to a 79.39% baseline without augmentation.
  • SVHN: Achieved 97.01% accuracy (DenseNet-169), outperforming the standard baseline of 95.63%.
  • Cityscapes: For semantic segmentation, safe fine-tuning increased the Mean Intersection over Union (mIoU) from 51.11% to 62.09%.

Discussion and Limitations

Safe Augmentation offers an explainable alternative to reinforcement learning-based methods. By providing a clear list of chosen transforms based on empirical metrics, it allows researchers to understand why certain augmentations were selected.

However, some limitations remain. The current method evaluates transformations independently, which can lead to redundant selections (e.g., multiple types of cropping). The authors addressed this by manually pruning redundancies in a "Safe v2" set. Future work could automate the selection of optimal transformation magnitudes and explore the framework's potential for improving adversarial robustness.

Summary updated

BibTeX
@misc{baran2019safe,
  author = {Irynei Baran and Orest Kupyn and Arseny Kravchenko},
  title = {{Safe Augmentation: Learning Task-Specific Transformations from Data}},
  year = {2019},
  eprint = {1907.12896},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.12896},
}
Figure