Identifying and Mitigating Model Failures through Few-shot CLIP-aided Diffusion Generation

Atoosa Malemir Chegini, Soheil FeiziarXiv 2023 · DOI

Deep learning models often rely on "spurious correlations"—shortcuts like identifying a "cow" by the presence of green grass rather than the animal's features. This leads to significant performance drops when models encounter objects in atypical contexts, such as a "cow on a beach." Traditionally, fixing these "hard sub-populations" required manual human intervention to identify, describe, and collect new data for failure modes.

Researchers from the University of Maryland have introduced an automated, human-out-of-the-loop framework that leverages Large Language Models (LLMs), vision-language models, and Diffusion models to systematically identify and fix these blind spots.

The Automated Debugging Pipeline

The proposed framework automates the entire "identify-describe-generate-fix" cycle. By combining the creative brainstorming of ChatGPT, the zero-shot classification of CLIP, and the generative power of Stable Diffusion, the system can autonomously improve model robustness.

The end-to-end framework for identifying and mitigating model failures through automated textualization and generation.

Methodology: Four Stages of Mitigation

  1. Failure Identification: The process begins by isolating images from a validation set that the model misclassifies, creating a "DebugSet."
  2. Failure Textualization:
    • ChatGPT is prompted to list uncommon backgrounds for each class (e.g., "What are uncommon backgrounds for a sea lion?").
  3. CLIP then performs zero-shot classification on the misclassified images against these text descriptions to label the specific failure mode (e.g., "Tench on a plate").
  4. Synthetic Data Generation: Using the identified failure modes as prompts, Stable Diffusion generates a small set of synthetic images (as few as 5 per failure) to provide the model with visual examples of the object in rare contexts.
  5. Efficient Retraining: To minimize computational costs, only the model's linear classification head is retrained. A weighted loss function balances original training data with the new synthetic "debug" data: $$loss_{lc} = loss_{lc}(generated) + \lambda \cdot loss_{lc}(original)$$ A hyperparameter $\lambda \approx 0.5$ was found to be optimal for improving robustness without sacrificing standard accuracy.
Examples of synthetic images generated by Stable Diffusion to address identified failure modes across various classes like Tench, Lemon, and Perfume.

Key Results and Insights

The framework was evaluated across 40 different model architectures, including ResNets, Vision Transformers (ViTs), and CLIP variants, using benchmarks like ImageNet-1000, CIFAR-10, and CIFAR-100.

  • Significant Performance Boost: The method achieved an average ~21% accuracy improvement on challenging sub-populations.
  • Collective Failure Mitigation: A key discovery was that models with similar architectures tend to fail on the same images in similar ways. This allows a single set of synthetic "remedy" data to fix multiple models simultaneously.
  • Efficiency of Few-Shot Learning: Generating just 5 images per failure mode was sufficient to significantly improve performance, demonstrating the high information density of targeted synthetic data.
  • Automated Interpretability: By mapping failures to text via CLIP, the system provides an automated, human-readable "bug report" for every model.

Limitations and Future Directions

While highly effective for background and color biases, the current scope is primarily focused on these specific attributes. Future work may extend the framework to other spurious correlations like object size or texture. Additionally, the system's efficacy is bounded by the generative capabilities of the underlying Diffusion model and the relevance of the backgrounds suggested by the LLM.

Reference: Chegini, A., & Feizi, S. (2023). Identifying and Mitigating Model Failures through Few-shot CLIP-aided Diffusion Generation. arXiv:2312.05464v1.

Summary updated

BibTeX
@misc{chegini2023identifying,
  author = {Atoosa Malemir Chegini and Soheil Feizi},
  title = {{Identifying and Mitigating Model Failures through Few-shot CLIP-aided Diffusion Generation}},
  year = {2023},
  eprint = {2312.05464},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.05464},
}
Figure