Abstract
Current status quo in machine learning is to use static datasets of real images for training, which often come from long-tailed distributions. With the recent advances in generative models, researchers have started augmenting these static datasets with synthetic data, reporting moderate performance improvements on classification tasks. We hypothesize that these performance gains are limited by the lack of feedback from the classifier to the generative model, which would promote the usefulness of the generated samples to improve the classifier's performance. In this work, we introduce a framework for augmenting static datasets with useful synthetic samples, which leverages one-shot feedback from the classifier to drive the sampling of the generative model. In order for the framework to be effective, we find that the samples must be close to the support of the real data of the task at hand, and be sufficiently diverse. We validate three feedback criteria on a long-tailed dataset (ImageNet-LT, Places-LT) as well as a group-imbalanced dataset (NICO++). On ImageNet-LT, we achieve state-of-the-art results, with over $4\%$ improvement on underrepresented classes while being twice efficient in terms of the number of generated synthetic samples. Similarly, on Places-LT we achieve state-of-the-art results as well as nearly $4\%$ improvement on underrepresented classes. NICO++ also enjoys marked boosts of over $5\%$ in worst group accuracy. With these results, our framework paves the path towards effectively leveraging state-of-the-art text-to-image models as data sources that can be queried to improve downstream applications.
Introduction
Machine learning models often struggle when trained on "long-tailed" or imbalanced datasets, where a few majority classes dominate the training signal while many minority classes have very few examples. While modern generative models like Stable Diffusion offer a potential solution by synthesizing data for these rare classes, standard augmentation techniques often yield marginal gains. This failure typically stems from three issues: a lack of feedback between the classifier and the generator, a distribution mismatch where synthetic samples don't align with the real task's style or context, and a lack of diversity in the generated "typical" samples.
The Feedback-Guided Framework
To address these limitations, we propose a "closed-loop" framework that uses a pre-trained classifier to guide a Latent Diffusion Model (LDM). Instead of generating samples in a vacuum, the generative model receives direct feedback on which samples would be most "useful" for the classifier's learning process.
The framework employs three primary feedback criteria to steer the diffusion process:
- Loss: Synthesizing images that the current classifier misclassifies.
- Entropy: Generating images where the classifier's prediction is most uncertain.
- Hardness: Creating images that are statistically distant from the class average.
Empirically, we found that Entropy guidance consistently provides the most informative signal, pushing the generator to produce samples near the classifier's decision boundary.
Ensuring Relevance and Diversity
A key challenge in using text-to-image models is ambiguity; for instance, the prompt "sorrel" might produce a horse or a plant. We resolve this through Dual Conditioning, where the generator is conditioned on both a text prompt and a random real image from the target class. To prevent the model from merely memorizing or copying the reference image, we introduce Embedding Dropout, which forces the model to generate diverse variations rather than exact replicas.
Experimental Results
We evaluated our framework on three major benchmarks: ImageNet-LT, Places-LT, and NICO++.
On ImageNet-LT, our method achieved a 4% improvement on underrepresented classes compared to previous state-of-the-art methods. Notably, it achieved these results with only 1.3 million synthetic images, making it twice as efficient as competing approaches that required 2.6 million images. Similarly, Places-LT saw a nearly 4% boost in accuracy for rare classes.
In the case of NICO++, which tests group imbalance (e.g., identifying a "dog" in various contexts like "grass" or "water"), our framework delivered a 5% improvement in worst-group accuracy, demonstrating its ability to help models generalize to rare or out-of-distribution contexts.
Qualitative analysis confirms that our pipeline generates images that align much more closely with the visual style of the real training data. As shown in the comparison above, while standard text-to-image synthesis might produce stylized drawings (b), our feedback-guided approach produces realistic photos (c) that are more useful for training robust classifiers.
Conclusion and Future Directions
By closing the loop between classification and generation, we demonstrate that synthetic data can be a powerful tool for overcoming dataset imbalance. While the current "one-shot" feedback mechanism is highly effective, future work could explore an online, active learning setup where the generator and classifier are updated continuously. This framework represents a significant step toward using large-scale generative models as dynamic, queryable data sources for downstream machine learning tasks.
Summary updated