[Paper Review] Leaving Reality to Imagination: Robust Classification via Generated Datasets
Training ImageNet classifiers on real data augmented with generated data from Stable Diffusion improves accuracy and effective robustness against natural distribution shifts, outperforming standard augmentation alone.
Recent research on robustness has revealed significant performance gaps between neural image classifiers trained on datasets that are similar to the test set, and those that are from a naturally shifted distribution, such as sketches, paintings, and animations of the object categories observed during training. Prior work focuses on reducing this gap by designing engineered augmentations of training data or through unsupervised pretraining of a single large model on massive in-the-wild training datasets scraped from the Internet. However, the notion of a dataset is also undergoing a paradigm shift in recent years. With drastic improvements in the quality, ease-of-use, and access to modern generative models, generated data is pervading the web. In this light, we study the question: How do these generated datasets influence the natural robustness of image classifiers? We find that Imagenet classifiers trained on real data augmented with generated data achieve higher accuracy and effective robustness than standard training and popular augmentation strategies in the presence of natural distribution shifts. We analyze various factors influencing these results, including the choice of conditioning strategies and the amount of generated data. Additionally, we find that the standard ImageNet classifiers suffer a performance degradation of upto 20\% on the generated data, indicating their fragility at accurately classifying the objects under novel variations. Lastly, we demonstrate that the image classifiers, which have been trained on real data augmented with generated data from the base generative model, exhibit greater resilience to natural distribution shifts compared to the classifiers trained on real data augmented with generated data from the finetuned generative model on the real data. The code, models, and datasets are available at https://github.com/Hritikbansal/generative-robustness.
Motivation & Objective
- Motivate robustness gaps when testing on naturally shifted datasets (e.g., sketches, renditions).
- Investigate how generated data from modern in-the-wild generative models influences classifier robustness.
- Evaluate training with real data, generated data, and a mix on ImageNet and natural distribution shift datasets.
- Analyze conditioning strategies, dataset size effects, and generation templates on robustness and accuracy.
- Provide publicly available code, models, and datasets for reproducible benchmarking.
Proposed method
- Generate a large synthetic dataset (1.3M images) using Stable Diffusion conditioned on ImageNet class labels via diverse textual templates.
- Augment real ImageNet-1K training data with the synthetic dataset and train classifiers from scratch.
- Evaluate on natural distribution shift datasets (ImageNet-Sketch, ImageNet-R, ImageNet-V2, ObjectNet) and compare with real-only and generated-only training.
- Compare zero-shot generation with hand-crafted augmentations and latent diffusion models to assess diversity and effectiveness.
- Analyze data generation strategies (templates, real images, mix) and their impact on accuracy and effective robustness (ER).
- Provide a baseline for robustness benchmarking by releasing base/generated datasets and code.
Experimental results
Research questions
- RQ1Does mixing real data with generated data improve accuracy and effective robustness on natural distribution shift datasets?
- RQ2How do generation strategies (text templates, real-image conditioning, or their mix) affect robustness and accuracy?
- RQ3What is the impact of generated data size relative to real data on ER and accuracy?
- RQ4How does finetuning the generative model on real data influence robustness on shifted distributions?
- RQ5Are generated datasets effective for benchmarking existing ImageNet classifiers on synthetic shifts?
Key findings
- Training with real data augmented by generated data yields equal or better absolute accuracy and higher robust performance on natural distribution shift datasets compared to real-only or generated-only training.
- Generated data alone increases effective robustness but often lowers absolute accuracy, whereas the real+generated mix provides a favorable balance.
- Class-label based generation with diverse templates outperforms single-template prompts and is near best strategies for training robustness.
- Standard ImageNet classifiers exhibit up to ~20% degradation on generated data, indicating fragility to novel variations, while mixed training mitigates this gap.
- Zero-shot CLIP conditioning yields strong robustness without domain-adaptation of the generator, and mixing with real data can achieve high accuracy on real/generated data.
- Finetuning the generator on real data reduces distribution gap but does not always improve accuracy as much as using base-generated data for augmentation.
- Increasing the generated data size generally increases ER, suggesting larger synthetic datasets can enhance robustness under compute budgets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.