TL;DR
This paper introduces DALDA, a novel data augmentation framework that uses Large Language Models (LLMs) to generate richer text prompts for Diffusion Models (DMs), leading to more diverse synthetic images. It also incorporates an Adaptive Guidance Scaling (AGS) mechanism that dynamically adjusts the influence of image and text prompts based on a CLIPScore, ensuring synthetic images remain within the target distribution while maximizing diversity.
What Problem Does This Paper Address?
Data augmentation is crucial for improving the performance of machine learning models, especially in data-scarce scenarios. Diffusion Models (DMs) have shown great promise in generating synthetic images for augmentation. However, a key challenge is to increase the diversity of these synthetic images without them straying from the intended target distribution. Existing methods often struggle to balance this trade-off, either producing images that are too similar or images that are inconsistent with the class. Furthermore, simply relying on text prompts can limit the semantic richness and diversity of generated images, especially when dealing with limited real-world examples.
Methods
DALDA tackles this problem through a multi-stage approach:
- LLM-Enhanced Text Prompts: The framework leverages LLMs (specifically GPT-4) to generate semantically rich text prompts. These prompts go beyond simple class names by incorporating details about actions, viewpoints, and environmental features, informed by dataset and class-specific information. This enriches the semantic content, particularly for classes with few training examples.
- Adaptive Guidance Scaling (AGS): To ensure synthetic images stay within the target distribution, DALDA introduces AGS. This mechanism dynamically adjusts the guidance weight ($\lambda$) during image generation. Before generating an image, the CLIPScore is calculated for each real image to measure its alignment with its class name. Based on this score, AGS adjusts $\lambda$:
- For images with low CLIPScores (indicating a potential mismatch between image and class), $\lambda$ is adjusted to favor image guidance, reducing the influence of text prompts to maintain consistency and prevent deviation from the target distribution.
- For images with high CLIPScores (indicating good alignment), $\lambda$ is adjusted to favor text guidance, increasing the influence of LLM-generated prompts to enhance diversity.
- Multi-Modal Conditional Diffusion Model (MMDM): The enriched text prompts from the LLM and the original real images (as visual prompts) are fed into an MMDM (based on Stable Diffusion) for synthetic image generation. The AGS mechanism dynamically influences the generation process by adjusting the balance between text and image guidance.
Datasets
The paper evaluates DALDA on the following datasets:
- Oxford Pets: A fine-grained dataset with approximately 200 images per class, known for variations in scale, pose, and lighting. This dataset falls into the High CLIPScore (HC) group.
- Caltech-101: A common dataset with around 50 images per category, used for object recognition. This dataset also falls into the High CLIPScore (HC) group.
- Flowers102: A fine-grained dataset of flower categories, with between 40 and 258 images per class. This dataset falls into the Low CLIPScore (LC) group.
Key Insights and Ideas
- LLMs unlock richer semantic diversity: By using LLMs to generate detailed, context-aware text prompts, DALDA can inject novel semantic information that goes beyond simple class labels, leading to more varied synthetic images.
- CLIPScore is a crucial indicator for guidance: The alignment between a real image and its class, as measured by CLIPScore, is a powerful signal for controlling the generation process. It allows the model to adapt its strategy based on the inherent quality of the image-class pairing.
- Dynamic guidance is key to balancing diversity and consistency: The AGS mechanism is central to DALDA's success. It intelligently shifts the balance between image and text guidance to either promote diversity (for well-aligned images) or enforce consistency (for less aligned images), preventing out-of-distribution samples.
- Few-shot learning benefits significantly: DALDA's ability to generate diverse and consistent synthetic data makes it particularly effective in few-shot learning scenarios where real data is scarce.
Key Results
- Enhanced Diversity: DALDA consistently achieves higher diversity metrics (lower CLIP-I, higher LPIPS) compared to baseline methods like Real Guidance and DA-Fusion across different datasets.
- Improved Classification Accuracy: In 1-shot classification tasks, DALDA demonstrates significant improvements. For instance, on the HC datasets, it shows average accuracy improvements of +11.42% (Acc-RN50) and +0.72% (Acc-CLIP) over Real Guidance, and +13.87% and +0.64% over DA-Fusion, with statistically significant p-values.
- Practicality: DALDA generates synthetic images without requiring additional fine-tuning of the diffusion model, making it more efficient than methods like DA-Fusion.
- Robustness to Data Scarcity: The method maintains a consistent level of diversity even with a single example per class, quickly converging to the target diversity.
Limitations and Future Work
- Reliance on CLIP: The framework's reliance on CLIPScore means it inherits CLIP's limitations, particularly for datasets where CLIP's understanding might be less effective (e.g., Flowers102).
- Downstream Model Sensitivity: The effectiveness of synthetic images can vary depending on the downstream model. While DALDA shows strong improvements with ResNet, the gains are smaller for CLIP classifiers, suggesting further exploration of model-specific generation strategies.
- Exploring Better Metrics: The authors suggest investigating metrics beyond CLIPScore for evaluating image faithfulness and adherence to text inputs.
- Downstream Model Knowledge: Future work could explore incorporating downstream model knowledge directly into the synthetic image generation process.
Summary updated