Abstract
In modern computer vision, the acquisition of high-quality, curated datasets remains a significant bottleneck. While generative models like Stable Diffusion (SD) can produce high-fidelity images, their utility in training discriminative models has been limited by distribution shifts and lack of diversity. This paper presents Diffusion Inversion, a novel two-stage framework that inverts real images into the latent space of a foundation model to generate diverse, task-specific synthetic data. Our approach demonstrates that synthetic data can not only supplement but outperform real-world datasets, offering a 2-3x improvement in sample complexity and a 6.5x boost in generation speed.
Introduction
Deep learning's success is fundamentally tied to data. However, collecting large-scale, labeled datasets is often prohibitively expensive or restricted by privacy concerns. While text-to-image models offer a potential solution, they frequently suffer from a "reality gap." Prompt-based generation often fails to capture the specific distribution of a target dataset, leading to models that do not generalize well to real-world examples. Furthermore, these methods often struggle with "mode collapse" or miss the "long-tail" nuances present in specialized domains like medical or satellite imagery.
Methodology
The proposed Diffusion Inversion method addresses these challenges through a two-stage pipeline designed to bridge the gap between foundation models and specific downstream tasks.
Stage 1: Embedding Learning (Inversion)
Rather than relying on imprecise text prompts, the framework identifies the specific conditioning vector $c$ within Stable Diffusion's latent space that best reconstructs a given real image. This process effectively "translates" the visual information of a real sample into the generative model's internal language, capturing nuances that human language cannot describe.
Stage 2: Sampling and Mixing
To introduce diversity, the learned embeddings are not simply re-rendered. Instead, the system applies perturbations—such as Gaussian noise or interpolation between vectors—to generate novel variants. These variants maintain the core characteristics of the original class while exploring new regions of the data distribution.
To enhance practical utility, the authors optimized the generation process for lower resolutions (e.g., 128x128), bypassing the standard 512x512 output of Stable Diffusion. This optimization resulted in a 6.5x decrease in sampling time, making the pipeline viable for large-scale training.
Datasets
The method was validated across several benchmarks, including general vision (CIFAR-10, CIFAR-100, STL10), natural images (ImageNette), and specialized domains such as EuroSAT (satellite) and MedMNISTv2 (medical), where text-based prompting is particularly challenging.
Key Results and Insights
The experimental results highlight several critical advantages of Diffusion Inversion:
- Performance Superiority: On the STL10 dataset, training on synthetic data generated via Diffusion Inversion improved ResNet18 test accuracy from 83.3% (real data) to 89.0%.
- Sample Complexity: The method achieves parity with real-data models while requiring 2-3x fewer real samples, effectively acting as a powerful few-shot learning tool.
- The 3x Scaling Rule: A key finding is that while a synthetic dataset of equal size to the real one may slightly underperform, scaling the synthetic data to approximately 3x the original size allows the model to surpass the baseline performance.
- Domain Versatility: The approach maintains scientific integrity in specialized fields like histopathology, where generic generative models typically fail due to a lack of domain-specific knowledge in their text encoders.
Discussion and Limitations
While Diffusion Inversion marks a significant step forward, several challenges remain. The generation of massive datasets still incurs substantial storage and computational costs. Additionally, the "autoencoder bottleneck" in Stable Diffusion can lead to information loss when processing very low-resolution images (e.g., 32x32). Finally, as a derivative of a foundation model, the system may inherit societal biases present in the original training data of Stable Diffusion.
Future research will focus on accelerating sampling techniques and developing more sophisticated interpolation algorithms to further refine the quality and diversity of the generated training sets.
Summary updated