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

DiffAug: A Diffuse-and-Denoise Augmentation for Training Robust Classifiers

Chandramouli Shama Sastry, Sri Harsha Dumpala, Sageev Oore

TL;DR

DiffAug is a simple, one-step "diffuse-and-denoise" augmentation technique that significantly improves image classifier robustness against corruptions, distribution shifts, and adversarial attacks. By applying a single forward and reverse diffusion step during training, the authors achieve state-of-the-art robustness and out-of-distribution (OOD) detection without requiring any additional data or the heavy computational burden of multi-step generative sampling.

What Problem Does This Paper Address?

Modern deep learning classifiers are notoriously brittle. A model that performs perfectly on clean images might fail catastrophically when faced with common corruptions (like blur or snow), artistic renditions, or adversarial "noise."

While generative data augmentation—using models like Stable Diffusion to create synthetic training data—has shown promise in fixing this, it faces two major hurdles:

  1. Computational Cost: Generating high-quality synthetic images usually requires dozens of "denoising" steps, making it too slow for many standard training pipelines.
  2. Data Dependency: Most generative methods rely on massive external datasets (like LAION-5B) to train the generator, making it unclear if the gains come from the technique itself or just the extra data.

The authors of DiffAug ask: Can we leverage the power of diffusion models to train robust classifiers using only the original dataset and a fraction of the compute?

Methods

The core of the paper is DiffAug, a two-part augmentation process:

  1. Diffuse: Take a training image $x_0$ and add Gaussian noise to it (forward diffusion) to reach a random timestep $t$.
  2. Denoise: Apply a single reverse-diffusion step using a pre-trained score network to produce a "denoised" version $\hat{x}_t$.
Visualizing the DiffAug diffuse-and-denoise process from clean image to varying noise levels.

Crucially, the authors don't try to produce a perfect, photorealistic image. Instead, they use this single-step denoised image as a training sample. They found that even if the image is blurry or semantically altered at high noise levels, it provides a powerful regularization effect.

Beyond basic training, the authors introduce:

  • DiffAug-Ensemble (DE): A test-time augmentation where multiple DiffAug versions of a test image are averaged for a more robust prediction.
  • Denoising-Augmented (DA) Classifier: A new way to train "guidance" classifiers (used in image generation) by feeding them both the noisy image and its single-step denoised counterpart.

Datasets

The researchers evaluated their approach across a wide battery of benchmarks:

  • Training: ImageNet-1k and CIFAR10.
  • Covariate Shift (Robustness): ImageNet-C (corruptions), ImageNet-R (renditions), ImageNet-S (sketches), ImageNet-A (adversarial), and ImageNet-D (diverse).
  • OOD Detection: The OpenOOD benchmark, including the SSB-Hard and NINCO datasets.

Key Insights and Ideas

  • Regularization over Realism: You don't need a "perfect" synthetic image to improve a classifier. The "vicinal" distribution created by single-step denoising—images that are slightly off the natural manifold but still semantically related—teaches the model to focus on robust, high-level features rather than brittle pixel-level details.
  • Perceptually Aligned Gradients (PAG): One of the most striking qualitative findings is that DiffAug training naturally leads to PAG. In standard models, the "gradient" (what the model looks at to make a decision) often looks like random noise. In DiffAug-trained models, these gradients look like actual objects, matching human perception.
  • Computational Efficiency: By using only one denoising step, DiffAug-Ensemble is roughly 10x faster than previous state-of-the-art adaptation methods like DDA, while often outperforming them.
  • Synergy with Classic Augmentation: DiffAug isn't a replacement for methods like AugMix or DeepAugment; it acts as a force multiplier. Combining them leads to even higher levels of robustness.

Key Results

  • Robustness Gains: A ResNet-50 trained with DiffAug saw its accuracy on ImageNet-C (severity 5) jump from 17.87% to 20.87% in default mode, and up to 32.22% when using the DiffAug-Ensemble at test time.
Robustness improvements across various ImageNet shift datasets using DiffAug.
  • OOD Detection: On the challenging Near-OOD task, DiffAug improved the AUROC (Area Under the Receiver Operating Characteristic) across all tested algorithms, with the combination of AugMix+DiffAug reaching an AUROC of 84.81, rivaling top leaderboard methods.
  • Better Generation: When used to guide image generation, the DA-Classifier improved the Fréchet Inception Distance (FID) on CIFAR10 from 2.81 to 2.34, indicating higher quality and more coherent generated images.

Limitations and Future Work

  • Training Overhead: While much faster than multi-step generation, DiffAug still requires a forward pass through a diffusion score network during training, which is more computationally expensive than simple geometric flips or color jitters.
  • Label Noise at High $t$: At very high noise levels (large $t$), the denoising process can occasionally change the class of an object (e.g., a dog might start looking like a building). The authors suggest that future work could use label-smoothing or multi-step denoising to mitigate this "manifold intrusion."
  • Latent Space vs. Pixel Space: The authors noted that the robustness gains were less pronounced when applying DiffAug in the latent space of models like Stable Diffusion compared to direct pixel-space diffusion. Exploring why this gap exists is a key area for future research.

Summary updated

BibTeX
@inproceedings{sastry2024diffaug,
  author = {Chandramouli Shama Sastry and Sri Harsha Dumpala and Sageev Oore},
  title = {{DiffAug: A Diffuse-and-Denoise Augmentation for Training Robust Classifiers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Tpx9gcZVBf},
}
Figure