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

Image retrieval outperforms diffusion models on data augmentation

Max F Burg, Florian Wenzel, Dominik Zietlow, Max Horn, Osama Makansi, Francesco Locatello, Chris Russell

Abstract

Many approaches have been proposed to use diffusion models to augment training datasets for downstream tasks, such as classification. However, diffusion models are themselves trained on large datasets, often with noisy annotations, and it remains an open question to which extent these models contribute to downstream classification performance. In particular, it remains unclear if they generalize enough to improve over directly using the additional data of their pre-training process for augmentation. We systematically evaluate a range of existing methods to generate images from diffusion models and study new extensions to assess their benefit for data augmentation. Personalizing diffusion models towards the target data outperforms simpler prompting strategies. However, using the pre-training data of the diffusion model alone, via a simple nearest-neighbor retrieval procedure, leads to even stronger downstream performance. Our study explores the potential of diffusion models in generating new training data, and surprisingly finds that these sophisticated models are not yet able to beat a simple and strong image retrieval baseline on simple downstream vision tasks.

Introduction

Deep learning models are notoriously data-hungry. When training data is scarce, data augmentation—creating new training examples to improve model robustness and accuracy—becomes essential. Recently, Diffusion Models (DMs) like Stable Diffusion have emerged as powerful tools for this purpose, promising an infinite supply of high-quality synthetic images.

However, a fundamental irony exists: these diffusion models are themselves trained on gargantuan datasets of real images, such as LAION-5b. This raises a critical question: if we need more data, why use a complex, computationally expensive model to hallucinate new images when we could simply retrieve the real images the model was trained on? This paper systematically benchmarks various diffusion-based augmentation strategies against a simple retrieval baseline.

Methods

The researchers categorized augmentation strategies into four main buckets:

  1. Unconditional Generation: Methods like "Boomerang" add noise to existing images and then denoise them to create slight variations.
  2. Prompt-based Conditioning: Guiding the DM with text prompts (e.g., "A photo of a [class name]") using various templates.
  3. Personalization (Fine-tuning): Sophisticated approaches like "Pseudoword+DM" involve fine-tuning the DM to better match the specific style and distribution of the target dataset.
  4. Retrieval (The Baseline): Using CLIP embeddings to perform a nearest-neighbor search in the LAION-5b dataset to find real images matching target classes.
Taxonomy of evaluated data augmentation methods and the experimental protocol.

The study primarily used ImageNet (ILSVRC2012), focusing on a 10% sub-sample to simulate low-data regimes and the full 100% dataset to test scalability. Caltech256 was used for additional verification.

Results

The experimental results reveal that "fancy" generative methods do not necessarily translate to better performance.

Accuracy and Efficiency

On 10% ImageNet, the baseline accuracy was 57.2%. While the best diffusion-based method (Pseudoword+DM) improved this to 61.2%, the simple Retrieval baseline outperformed all generative methods, reaching 62.6%. This trend continued on the full ImageNet dataset, where Retrieval achieved 79.0% accuracy, surpassing both the best DM method (78.8%) and the standard ResNet-50 baseline (76.1%).

Comparison of ResNet-50 top-1 accuracy across different augmentation types for 10% and 100% ImageNet.

Beyond accuracy, Retrieval proved significantly more efficient. It was 30x faster than prompt-based DM methods and 56x faster than advanced fine-tuning methods.

The "Domain Shift" Trap

A key insight from the study is the impact of domain shift. Diffusion models often generate "too perfect" or modern images. For instance, a DM-generated "desktop computer" might look like a modern Mac, whereas ImageNet's "desktop computer" category contains beige boxes from the mid-2000s. This distribution mismatch can actually hinder classifier performance. Retrieval avoids this by sourcing real images that often better align with the historical or specific distribution of the target dataset.

Conclusion

The study demonstrates that for boosting model performance today, searching for more real data is often superior to generating synthetic data. Retrieval is not only more accurate but also vastly more compute-efficient. While generative models may have an edge in niche domains where external data is unavailable, for general vision tasks, simple retrieval remains the strongest baseline. Future work may explore hybrid approaches that combine retrieval with generative "editing" to maximize both data relevance and diversity.

Summary updated

BibTeX
@article{burg2023image,
  author = {Max F Burg and Florian Wenzel and Dominik Zietlow and Max Horn and Osama Makansi and Francesco Locatello and Chris Russell},
  title = {{Image retrieval outperforms diffusion models on data augmentation}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=xflYdGZMpv},
}
Figure