Abstract
Deep learning models often struggle with distribution shifts between training and test environments. This paper presents a novel "closed-loop" framework for generating synthetic training data using diffusion models. By integrating feedback from a target model to identify vulnerabilities and guidance toward a specific test distribution via CLIP, the proposed Guided Adversarial Prompts (GAP) generate highly efficient, "hard" training examples. Experimental results across classification and regression tasks, including Waterbirds and iWildCam, demonstrate that GAP significantly improves model robustness and data efficiency compared to traditional open-loop synthetic data generation.
Introduction
The brittleness of deep learning models under distribution shift remains a significant challenge. While generative models like Stable Diffusion offer a path to augment training sets, current "open-loop" approaches rely on pre-defined prompts that may not address a model's specific weaknesses. This research introduces an adaptive system that "interrogates" a model to find its blind spots and generates targeted images to mitigate them, moving beyond static data collection.
Methods: Guided Adversarial Prompts (GAP)
The core of the framework is the use of two feedback mechanisms to steer a text-to-image diffusion model:
- Adversarial Prompts (AP): This model-informed feedback optimizes the text embedding space of the diffusion model to find prompts that maximize the loss of the supervised model. It identifies specific visual features that cause the model to fail.
- Target Distribution Feedback: This steers generation toward a specific style or environment (e.g., fog, nighttime) using CLIP guidance, matching generated images to textual descriptions or unlabeled target images.
By combining these into Guided Adversarial Prompts (GAP), the system creates images that are both difficult for the model and representative of the target domain. To maintain label faithfulness, the authors utilize SDEdit and inpainting techniques.
Experimental Evaluation
The authors evaluated GAP on several benchmarks:
- Classification: Waterbirds (spurious correlations) and iWildCam (domain generalization).
- Regression: Taskonomy and Omnidata for depth estimation.
- Robustness: Common Corruptions (CC & 3DCC) and the Replica dataset.
Key Results and Insights
- Discovery of Counterfactuals: In the Waterbirds dataset, GAP automatically generated "counterfactual" images (e.g., waterbirds on land), forcing the model to ignore spurious background correlations.
- Performance Gains: On iWildCam, GAP achieved 81.2% accuracy, outperforming Agnostic Prompts (69.8%) and standard augmentations like CutMix (69.6%).
- Data Efficiency: GAP proved more effective in low-data regimes, requiring fewer generated images to reach peak performance compared to open-loop methods.
- Robustness in Regression: For depth estimation under defocus blur, GAP reduced $\ell_1$ error from 4.93 to 3.88.
Conclusion
The GAP framework demonstrates that "hard" adversarial examples, when guided by target distribution feedback, are superior to large volumes of random synthetic data. While computational costs and label shift remain areas for future exploration, this closed-loop approach provides a powerful tool for building robust machine learning systems.
Summary updated