Why Adversarially Train Diffusion Models?

Maria Rosaria Briglia, Mujtaba Hussain Mirza, Giuseppe Lisanti, Iacopo MasiICLR 2026

TL;DR

This paper introduces a principled way to bring Adversarial Training (AT) to Diffusion Models by shifting the objective from invariance to equivariance. By training models to handle local perturbations during the denoising process, the authors produce generative models that are significantly more robust to corrupted training data, less prone to memorizing specific images, and resilient against adversarial attacks at inference time.

The Challenge with Real-World Diffusion Models

Diffusion models (DMs) have revolutionized generative AI, but they face three major hurdles in real-world deployment:

  1. Dirty Data: Large-scale datasets are often web-scraped and contain significant noise, outliers, or corruptions. Standard DMs tend to "learn the noise," leading to grainy or unrealistic samples.
  2. Memorization: DMs are notorious for memorizing training samples, raising serious privacy concerns and copyright issues due to information leakage.
  3. Adversarial Vulnerability: Just like classifiers, generative models can be "attacked" at inference time with subtle perturbations that cause them to produce garbage or specific malicious outputs.

Existing "noise-aware" training methods often require knowing the exact type and intensity of noise beforehand—an unrealistic assumption for real-world "in-the-wild" data. This paper seeks a more general, robust training paradigm that doesn't rely on such strict priors.

Methods: From Invariance to Equivariance

The authors propose a novel adaptation of Adversarial Training specifically tailored for score-based generative models.

The core breakthrough is the distinction between invariance and equivariance:

  • Invariance (Standard AT): In classification, we want the output to stay the same even if the input is slightly perturbed (e.g., a perturbed "cat" image should still be classified as a "cat").
  • Equivariance (Proposed AT): In diffusion, if we perturb a noisy image $x_t$ by some small $\delta$, the model shouldn't ignore it. Instead, it should predict the original noise plus that perturbation ($\epsilon + \delta$) to successfully navigate back to the clean data point $x_0$.
Equivariance in Diffusion Models

The researchers implemented this by adding a regularization term ($L_{reg}$) to the standard diffusion loss. This term minimizes the difference between the model's prediction on a clean sample and its prediction on a perturbed sample (either random or adversarially crafted via a modified FGSM/PGD approach). To keep the training stable, they used a time-varying "perturbation ray" $r(t)$ that shrinks as the generation process approaches the clean data.

Key Insights and Ideas

  • Invariance is Destructive: The paper proves that applying standard "classifier-style" invariance to DMs actually causes the model to diverge and fail to learn the data distribution. Equivariance is the mathematically correct path for regression-based generative tasks.
  • Smoothing the Score Field: Adversarial training acts as a "smoothing" factor. It forces the model to learn a more consistent score field (the vector field that guides denoising), making the trajectories toward the data manifold sharper and less "faded."
  • Faster Sampling as a Side Effect: Because the learned score field is smoother and more robust, the authors found that their models actually perform better with fewer sampling steps (e.g., 500 steps vs. 1000), whereas standard models degrade quickly.
  • Generalization over Memorization: By forcing the model to handle perturbations, it becomes less likely to overfit to the exact pixel values of training samples. This effectively "blurs" the memorized details while preserving the overall data distribution.
Robustness and Score Field Smoothing

Key Results

The study validated these claims on both synthetic 3D data (allowing for precise error analysis against known ground truths) and standard benchmarks like CIFAR-10, CelebA, and LSUN Bedroom.

  • Robustness to Heavy Noise: On CIFAR-10 with 90% of the training data corrupted by Gaussian noise ($\sigma=0.2$), the baseline DDPM's performance collapsed (FID > 100). The proposed Robust_adv model maintained high fidelity with an FID of ~24.8.
  • Reduced Memorization: Using DINOv2 embeddings to check for similarity, the authors showed a drastic reduction in "near-duplicate" generations compared to standard DDPM, indicating better privacy preservation.
  • Attack Resilience: In "white-box" settings where the generation trajectory was attacked, the robust models could tolerate attacks on up to 50% of the inference timesteps and still produce recognizable, high-quality images, while the baseline failed almost immediately.

Limitations and Future Work

The primary drawback is computational overhead. Adversarial training requires an additional backward pass to calculate the gradients for the perturbation, making training roughly 2.5x slower than standard diffusion.

To address this, the authors provided preliminary results showing that fine-tuning a pre-trained model with their robust loss for just the last few epochs can achieve similar benefits with much less cost. Future work aims to scale this to even larger datasets and explore "fully corrupted" settings where 100% of the training data is noisy.

Summary updated

BibTeX
@inproceedings{briglia2026why,
  author = {Maria Rosaria Briglia and Mujtaba Hussain Mirza and Giuseppe Lisanti and Iacopo Masi},
  title = {{Why Adversarially Train Diffusion Models?}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=lL6htAaolp},
}
Figure