Learning Augmentation Distributions using Transformed Risk Minimization

Evangelos Chatzipantazis, Stefanos Pertigkiozoglou, Kostas Daniilidis, Edgar Dobriban

Abstract

We propose a new Transformed Risk Minimization (TRM) framework as an extension of classical risk minimization. In TRM, we optimize not only over predictive models, but also over data transformations; specifically over distributions thereof. As a key application, we focus on learning augmentations; for instance appropriate rotations of images, to improve classification performance with a given class of predictors. Our TRM method (1) jointly learns transformations and models in a single training loop, (2) works with any training algorithm applicable to standard risk minimization, and (3) handles any transforms, such as discrete and continuous classes of augmentations. To avoid overfitting when implementing empirical transformed risk minimization, we propose a novel regularizer based on PAC-Bayes theory. For learning augmentations of images, we propose a new parametrization of the space of augmentations via a stochastic composition of blocks of geometric transforms. This leads to the new Stochastic Compositional Augmentation Learning (SCALE) algorithm. The performance of TRM with SCALE compares favorably to prior methods on CIFAR10/100. Additionally, we show empirically that SCALE can correctly learn certain symmetries in the data distribution (recovering rotations on rotated MNIST) and can also improve calibration of the learned model.

Introduction

Data augmentation is a cornerstone of modern deep learning, yet it remains a "black art" of manual tuning and domain intuition. In computer vision, we know that a cat is still a cat whether it's flipped horizontally or rotated by 10 degrees. We encode this knowledge using data augmentation. However, choosing the right augmentations is difficult. If you rotate a digit "6" too much, it becomes a "9"—excessive augmentation hurts performance. Conversely, too little augmentation prevents the model from generalizing to tilted inputs.

Traditionally, practitioners use "AutoAugment" style methods that search for policies in a separate, expensive pre-processing step. Other methods are limited to either continuous transforms (like rotation) or discrete ones (like horizontal flips). The core challenge is that adding augmentations usually increases training error, so a model trained to minimize loss will naturally try to "turn off" augmentations. This paper introduces SCALE, an algorithm that automatically learns the optimal distribution of data augmentations jointly with the model in a single training loop.

The TRM Framework and SCALE Algorithm

The authors propose a framework called Transformed Risk Minimization (TRM). Instead of minimizing risk over just the model parameters, they minimize it over the model and a distribution of transformations. To make this practical, they introduce the SCALE (Stochastic Compositional Augmentation Learning) algorithm.

Figure 1: Comparison of standard risk minimization (RM) and standard augmentation against the proposed TRM framework on a spiral dataset. TRM successfully learns the underlying symmetry of the data, leading to a superior decision boundary.

SCALE represents augmentations as a sequence of compositional blocks (e.g., Rotation $\rightarrow$ Scaling $\rightarrow$ Flipping). Each block has two learnable parameters: $\pi$ (the probability of applying the transform) and $\alpha$ (the magnitude or range of the transform). To prevent the "collapse to identity" problem—where the optimizer simply removes all augmentations to lower training loss—the authors derive a theoretically grounded PAC-Bayes regularizer. This term essentially "rewards" the model for choosing broader and more frequent augmentations, creating a tug-of-war with the training loss that results in an optimal balance.

Key Insights

  • The "Zero-Gap" Theorem: The authors prove that if a dataset has an underlying symmetry, TRM is theoretically guaranteed to recover it and produce a model as optimal as one where the symmetry was known beforehand.
  • Invariance vs. Training Ease: The paper highlights a fundamental tension: augmentations make the training set harder to "memorize," but they make the resulting model more robust. The PAC-Bayes regularizer is the mathematical bridge that allows the optimizer to navigate this trade-off.
  • Calibration Improvement: Learning augmentations significantly improves model calibration (how well the model's confidence matches its actual accuracy). By seeing many transformed versions of the data, the model becomes less overconfident.

Experimental Evaluation

The authors evaluated SCALE on several diverse tasks:

  • MNIST & RotMNIST: Used to show that the algorithm can "discover" symmetries (e.g., realizing that RotMNIST is invariant to 360-degree rotations).
  • CIFAR-10 & CIFAR-100: Standard image classification benchmarks where SCALE achieved 83.3% accuracy on CIFAR-100, outperforming previous "learnable" methods like Augerino (79.3%) and DADA (80.1%).
  • SVHN: Demonstrated that augmentation policies learned on one dataset don't always transfer well, highlighting the need for dataset-specific learning.
  • Language Navigation (Matterport3D/R2R): A complex task where an agent follows natural language instructions, showing SCALE works beyond simple image classification.

SCALE is also highly efficient. While search-based methods like Fast-AutoAugment can add 8+ hours to training, SCALE adds only about 1.5 hours of overhead to a standard 5-hour training run.

Limitations and Future Work

While SCALE learns the parameters of the distributions, it still requires the user to define the types of transformations (the "blocks") available. It cannot currently "invent" a brand-new type of image transformation from scratch. Additionally, SCALE introduces its own regularization hyperparameter ($\lambda_{reg}$), which requires initial setting. Future directions include extending this framework to other domains like 3D point clouds or audio, where the "correct" augmentations are even less intuitive than in 2D images.

Summary updated

BibTeX
@article{chatzipantazis2023learning,
  author = {Evangelos Chatzipantazis and Stefanos Pertigkiozoglou and Kostas Daniilidis and Edgar Dobriban},
  title = {{Learning Augmentation Distributions using Transformed Risk Minimization}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=LRYtNj8Xw0},
}
Figure