Negative Data Augmentation

Abhishek Sinha, Kumar Ayush, Jiaming Song, Burak Uzkent, Hongxia Jin, Stefano Ermon

TL;DR

While standard data augmentation creates more "good" examples for a model to study, Negative Data Augmentation (NDA) intentionally creates "bad," out-of-distribution samples to show the model what to avoid. By integrating these negatives into GANs and contrastive learning, researchers achieved significant boosts in image generation quality, representation learning, and anomaly detection.

The Problem: Greedy Models and Texture Bias

Deep learning models are notoriously "greedy"—they often find the easiest path to a solution, even if that path ignores the actual structure of the data. For example, a Convolutional Neural Network (CNN) might identify a "car" based solely on the texture of shiny metal and rubber tires, completely ignoring whether those parts are arranged in a way that makes physical sense.

Standard data augmentation (like flipping or rotating an image) helps by teaching the model that certain transformations don't change the object's identity. However, it doesn't explicitly tell the model what a "non-car" looks like. This leads to "over-generalization," where a generative model might produce unrealistic images that have the right textures but the wrong global structure. The authors address this by proposing a formal way to leverage prior knowledge about what does not constitute valid data.

Methods: Destructive Transforms and NDA-GAN

The core idea is to generate samples that are guaranteed to be out-of-distribution (OOD) but still "informative."

Examples of different augmentation strategies, including NDA methods like Jigsaw and Stitching.
  1. The NDA Strategy: Instead of semantic-preserving transforms, they use "destructive" transforms. The most effective is the Jigsaw transform, which breaks an image into a grid and shuffles the patches. This preserves local textures but destroys global coherence. Other methods include Stitching (combining halves of different images).
  2. NDA-GAN: In a standard GAN, the discriminator distinguishes between "Real" and "Fake" (generated) data. In the NDA framework, the discriminator is also shown "Negative" data (real images that have been Jigsawed).
NDA-GAN architecture showing the discriminator learning from real, generated, and negative (transformed) samples.

This forces the discriminator to learn that global structure matters, which in turn biases the generator to avoid producing "jumbled" images.

  1. NDA-CPC (Contrastive Learning): In self-supervised learning, models learn by bringing representations of "positive" pairs closer together. The authors modify the Contrastive Predictive Coding (CPC) objective to explicitly push the representations of NDA samples away from the representations of real data.

Key Insights

  • The "Boundary" is Key: Not all negative data is useful. Sampling random noise is technically NDA, but it's so far from the data distribution that the model learns nothing. The "best" negatives are those that are close to the data manifold but clearly invalid—like a Jigsawed image that has all the right "parts" but in the wrong places.
  • Correcting the CNN Bias: CNNs are naturally biased toward local features (textures). NDA acts as a corrective inductive bias, forcing the network to prioritize global structure to distinguish real images from their shuffled counterparts.
  • Theoretical Safety: The authors provide a proof showing that in the limit of infinite data, adding NDA doesn't "break" the model. The optimal generator will still recover the true data distribution; NDA simply helps the model converge to a better solution faster when data is finite.

Key Results

The authors evaluated their approach across a wide variety of tasks, including image generation (CIFAR-10, CelebA), representation learning (ImageNet-100, UCF101), and anomaly detection.

  • Better Images: On CIFAR-10, using Jigsaw NDA improved the Fréchet Inception Distance (FID)—a measure of image quality—from 18.64 down to 12.61 (lower is better).
  • Superior Anomaly Detection: A BigGAN trained with NDA was significantly better at identifying OOD samples (like Gaussian noise or corrupted images) than a standard BigGAN or specialized Energy-Based Models (EBMs).
  • Improved Representations: In self-supervised learning, adding NDA to the MoCo-v2 baseline improved downstream classification accuracy across CIFAR and ImageNet-100.
  • Video Action Recognition: Applying Jigsaw NDA to video frames improved action recognition on UCF101 from 61.35% to 66.07%, setting a new state-of-the-art for single-stream (RGB only) self-supervised methods at the time.

Limitations and Future Work

While NDA is simple to implement, it does require an additional forward pass for the negative samples during training, slightly increasing computational cost. Furthermore, current NDA strategies (like Jigsaw) are highly visual. Finding effective NDAs for other domains, like Natural Language Processing (NLP) or audio, remains an open challenge, as does automating the search for the most informative negative augmentations.

Summary updated

BibTeX
@inproceedings{sinha2021negative,
  author = {Abhishek Sinha and Kumar Ayush and Jiaming Song and Burak Uzkent and Hongxia Jin and Stefano Ermon},
  title = {{Negative Data Augmentation}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=Ovp8dvB8IBH},
}
Figure