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

Effective Data Augmentation With Diffusion Models

Brandon Trabucco, Kyle Doherty, Max A Gurinas, Ruslan Salakhutdinov

TL;DR: Standard data augmentation relies on simple geometric tricks like flipping or rotating images, which fails to add true semantic variety. DA-Fusion solves this by using pre-trained diffusion models to "edit" real images—changing textures, species, or contexts—while preserving the original structure, leading to massive accuracy boosts in few-shot learning tasks.

The Challenge of Semantic Diversity

In deep learning, data is king. To make models robust, researchers use data augmentation: creating "new" training examples by slightly altering existing ones. However, traditional methods are stuck in the past. If you have a photo of a coffee mug, standard tools can flip it horizontally or change the brightness, but they cannot change the brand of the mug or the lighting of the room. These are "semantic" changes—alterations in meaning and appearance that go beyond simple geometry.

While modern generative models (like Stable Diffusion) can create stunning images from scratch, they often struggle with "few-shot" scenarios where you only have a handful of examples of a niche concept (like a specific invasive weed). They either generate generic versions of the object or fail to capture the subtle details needed for high-stakes classification.

The DA-Fusion Approach

The authors introduce DA-Fusion (Data Augmentation with Diffusion), a pipeline that turns a text-to-image model into a powerful semantic editor. It consists of three main steps:

  1. Textual Inversion: Instead of using generic words like "dog," the method learns a unique "pseudo-prompt" (a mathematical embedding) for a specific class based on just a few images. This allows the model to understand novel or fine-grained concepts that weren't in its original training set.
  2. Image-to-Image Transformation (SDEdit): Rather than generating images from a blank canvas, DA-Fusion takes a real training image, adds a controlled amount of noise to it, and then uses the diffusion model to "denoise" it back using the learned pseudo-prompt. This preserves the basic layout of the original image while allowing the model to swap out textures, colors, and fine details.
  3. Randomized Intensity: To maximize diversity, the authors randomly vary how much noise is added. Low noise results in subtle changes; high noise allows the model to reinvent the image almost entirely.
Examples of augmented training images generated by DA-Fusion

Evaluation Domains

The authors benchmarked DA-Fusion across seven diverse datasets:

  • Standard Vision Benchmarks: Caltech101, Flowers102, FGVC Aircraft, Stanford Cars, COCO, and PASCAL VOC.
  • The "Leafy Spurge" Dataset: A novel, real-world dataset introduced in this paper featuring top-down drone imagery of an invasive plant species. This serves as a rigorous test for "unseen" concepts, as the base diffusion model had never seen aerial views of this specific weed.

Core Contributions

  • Semantic vs. Geometric Diversity: The core insight is that generative models can fill the gaps where traditional augmentation fails. By changing the content of the scene rather than just its orientation, the classifier learns what actually defines a class (e.g., the shape of a leaf) versus what is just background noise.
  • Addressing the "Leakage" Problem: A major concern with using models trained on internet-scale data is that they might have already seen the "test" data during pre-training. The authors addressed this head-on by testing "Model-Centric" and "Data-Centric" defenses—essentially "erasing" the model's memory of certain classes to prove that the performance gains come from the method, not just the model's prior knowledge.
  • Universal Controllability: DA-Fusion doesn't require complex prompt engineering. By optimizing the embeddings directly, the system becomes a "plug-and-play" tool for almost any visual domain.

Performance Gains

DA-Fusion consistently outperformed both standard augmentations (like RandAugment) and previous generative approaches:

  • Accuracy Boosts: The method improved few-shot classification accuracy by +5 to +15 percentage points across all tested domains.
  • Fine-Grained Success: The gains were most pronounced for "fine-grain" concepts (like distinguishing between specific aircraft models or flower species), where traditional flips and crops provide very little useful information.
  • Real-World Utility: On the novel Leafy Spurge weed recognition task, DA-Fusion provided a significant boost, proving it can generalize to specialized scientific data that exists far outside the typical training distribution of diffusion models.

Limitations and Future Directions

While powerful, DA-Fusion has a few hurdles to clear:

  • Lack of Explicit Control: Currently, the model decides what to change. You cannot easily instruct it to "change the color of the car but keep the wheels exactly the same." Integrating more localized editing techniques (like Prompt-to-Prompt) could be a next step.
  • Computational Cost: Generating thousands of synthetic images via diffusion is significantly slower and more computationally expensive than simple geometric transformations.
  • Temporal Consistency: Applying this to video or reinforcement learning would require maintaining consistency across frames, which is a known challenge for current diffusion models.
  • Safety and Bias: Like all generative tools, there is a risk of the model introducing or amplifying biases present in its pre-training data, necessitating careful monitoring.

Summary updated

BibTeX
@inproceedings{trabucco2024effective,
  author = {Brandon Trabucco and Kyle Doherty and Max A Gurinas and Ruslan Salakhutdinov},
  title = {{Effective Data Augmentation With Diffusion Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=ZWzUA9zeAg},
}
Figure