Improving Robustness using Generated Data

Sven Gowal, Sylvestre-Alvise Rebuffi, Olivia Wiles, Florian Stimberg, Dan Andrei Calian, Timothy A. Mann

Introduction

Adversarial training typically requires massive amounts of data to achieve high robustness, often forcing researchers to rely on huge external datasets. This paper demonstrates that we can bypass the need for external data by using generative models (like diffusion models) trained solely on the original dataset to create millions of synthetic training examples. By pseudo-labeling and mixing this generated data with the original set, the authors achieve state-of-the-art adversarial robustness, beating previous methods that relied on real external data.

The Data Hunger of Adversarial Training

Neural networks are notoriously vulnerable to adversarial attacks—imperceptible tweaks to an input image that cause the model to make wildly incorrect predictions. The most effective defense is "adversarial training," which involves continuously generating and training on these perturbed examples.

However, adversarial training is incredibly data-hungry. To get high robust accuracy, researchers have historically relied on massive external datasets, most notably the "80 Million Tiny Images" (80M-TI) dataset. Unfortunately, 80M-TI was withdrawn due to offensive content, and relying on external data isn't always feasible in specialized domains (like medical imaging). The authors tackle a critical question: Can we achieve state-of-the-art robust accuracy without external data by squeezing more information out of the original, limited training set using generative models?

Methodology: Inflating the Training Set

The authors propose a three-step pipeline to artificially inflate the training set without looking outside the original distribution:

Proposed three-step pipeline for generating and utilizing synthetic data
  1. Train a Generative Model: Train an unconditional generative model (e.g., Denoising Diffusion Probabilistic Models (DDPM), StyleGAN2, BigGAN) only on the original training data.
  2. Generate and Pseudo-Label: Generate a massive synthetic dataset (ranging from 1 million to 100 million images). Since these images don't have labels, the authors train a standard, non-robust classifier on the original data and use it to assign "pseudo-labels" to the generated images.
  3. Adversarial Training: Train the final robust classifier using a mix of the original training data and the pseudo-labeled generated data. A mixing factor ($\alpha$) controls the ratio of real to synthetic images in each training batch.

Key Insights

  • Even "garbage" data helps: Surprisingly, the authors found that generating extremely blurry, low-quality data from a simple class-conditional Gaussian fit actually improves robustness. This proves that for robust generalization, data diversity and complementarity (filling in the gaps of the training distribution) are just as important as photorealism.
  • Diffusion beats GANs for robustness: While GANs (like StyleGAN2) sometimes achieved better visual quality scores (FID/IS), DDPM (diffusion) samples provided better coverage of the true data distribution. This broader coverage translated directly to higher robust accuracy, making diffusion models the superior choice for this technique.
  • Theoretical grounding: The paper provides mathematical sufficient conditions for why generated data helps. It boils down to three things: the pseudo-labeler must be accurate, the generated distribution must cover the true distribution well, and the generated samples shouldn't accidentally be adversarial themselves.
  • Capacity scales with coverage: If a generative model covers the true data distribution well, increasing the classifier's capacity (using wider/deeper networks) yields massive robustness gains.

Key Results and State-of-the-Art Performance

The approach was evaluated on CIFAR-10, CIFAR-100, SVHN, and TinyImageNet, explicitly avoiding the withdrawn 80M-TI dataset to prove its efficacy in a strict "no external data" regime.

Robust test accuracy comparison against prior state-of-the-art methods
  • Shattering the SOTA on CIFAR-10: Using 100 million DDPM-generated samples and a WideResNet-70-16, the authors achieved 66.10% robust accuracy against $L_\infty$ ($\epsilon=8/255$) attacks. This is a massive +8.96% absolute improvement over the previous state-of-the-art (without external data).
  • Beating external data: Remarkably, their best CIFAR-10 model beat all prior RobustBench entries that relied on external datasets (like 80M-TI), proving that high-quality generated data can fully replace the need for external data scraping.
  • Strong $L_2$ Robustness: Against $L_2$ ($\epsilon=128/255$) attacks on CIFAR-10, the model achieved 78.31% (+3.81% improvement).
  • Consistent across datasets: The approach yielded significant absolute improvements across the board: +3.49% on CIFAR-100, +4.07% on SVHN, and +5.10% on TinyImageNet.

Limitations and Future Work

The authors acknowledge a few limitations. First, the method is intrinsically bottlenecked by the accuracy of the non-robust pseudo-labeler; if the labeler is poor, the generated data will inject noise into the training process. Second, the approach is highly compute-intensive—generating 100 million diffusion samples and adversarially training a massive network for 2,000 epochs requires significant hardware resources.

Future work could explore dynamically adjusting the mixing ratio of real vs. generated data during training, applying this technique to larger-scale datasets like ImageNet, and developing more efficient ways to sample from diffusion models to cut down on compute costs.

Summary updated

BibTeX
@inproceedings{gowal2021improving,
  author = {Sven Gowal and Sylvestre-Alvise Rebuffi and Olivia Wiles and Florian Stimberg and Dan Andrei Calian and Timothy A. Mann},
  title = {{Improving Robustness using Generated Data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=KN_rU8dlsCC},
}
Figure