TL;DR
This paper introduces an automated, open-ended pipeline that discovers and explains failure modes in computer vision models by coupling off-the-shelf text-to-image generators with image captioning models. By generating synthetic images, captioning the inputs that cause misclassifications, and testing those descriptions counterfactually, the method uncovers semantic bugs and spurious correlations without requiring manual dataset curation.
What Problem Does This Paper Address?
Deep vision models frequently rely on spurious correlations—such as associating specific backgrounds or co-occurring objects with a class—causing them to fail unpredictably when deployed in the wild. Historically, surfacing these failure modes required manually curating synthetic datasets (e.g., pasting objects onto unnatural backgrounds) or scraping massive web datasets like ImageNet-A. Both methods are labor-intensive, restricted by human preconceptions of what might fail, and difficult to scale. The authors tackle the challenge of discovering visual bugs automatically and in an open-ended manner, producing interpretable, natural-language explanations for why a model fails.
Methods
The proposed framework treats the target vision model as a black box and operates in a cyclic generate-caption-test loop:
- Baseline Failure Discovery: The system prompts a conditional text-to-image model (e.g., Imagen, DALL·E 2, or Stable Diffusion) with generic class descriptions (e.g., "a realistic photograph of a fly (insect)") to produce baseline images and identify misclassified samples.
- Clustering & Captioning: Failure cases are grouped by predicted error class and feature representations. A multimodal captioning model (such as Flamingo) generates detailed sentences describing the failure clusters (capturing background, position, lighting, and context).
- Hypothesis Testing: The discovered captions act as "failure hypotheses." The generative model produces new images conditioned on these detailed captions to test whether the misclassification rate increases significantly compared to the baseline prompt.
- Caption Refinement: The system trims sentences and drops adjectives to isolate the minimal, human-readable semantic trigger behind the bug (e.g., reducing a long description down to "it is on a flower").
[Text-to-Image] --> Images --> [Classifier f] --> Misclassifications
^ |
|--------------- [Image Captioning] <-------------|
(Failure Hypothesis)
Datasets
- Evaluation & Pretraining: Vision models evaluated include ResNet-50, Inception-v3, BiT, and Vision Transformers (ViT-B/16, ViT-B/32) trained on ImageNet-1K and ImageNet-21K.
- Seed Source: Captions were also extracted from ImageNet-A images to scale up benchmark generation.
- Newly Introduced Datasets:
- IN-G-RN (12,332 images): A dataset of synthetic failure cases targeting ResNet-50.
- IN-G-VIT (9,536 images): A dataset of synthetic failure cases targeting ViT-B/16.
- Both datasets exhibit closer distribution alignment to ImageNet test images than ImageNet-A does (FID of 48.3 and 53.9 vs. 56.6; KID of 0.0305 and 0.0330 vs. 0.0460).
Key Insights and Ideas
- Language as an Explainable Latent Space: Instead of perturbing abstract latent vectors or pixel spaces, encoding failure hypotheses into natural language makes the discovered bugs immediately interpretable to non-experts.
- Uncovering Spurious Shortcuts: The system exposes model confusions driven by contextual shortcuts:
- Fly is confused with bee because of flowers.
- Crayfish is confused with chainlink fence because of fishing nets.
- Persian cat is confused with wild felines (snow leopard) simply by putting the cat outdoors on green grass.
- High Transferability Across Models and Real Data: Bugs discovered on synthetic images transfer to real-world photographs from Google Image Search and across different model initializations and architectures.
Key Results
- Failure Amplification via Text Triggers:
- Appending "the background is green" to Persian cat images increased the total error rate 6× (0.11% to 0.64%) and raised confusion to snow leopard by 14× (0.00022% to 0.0032%).
- Appending "it is on a flower" to fly images increased misclassification as bee by 497× (0.0014% to 0.72%).
- Appending "it is in a net" to crayfish images triggered a 3,721× surge in misclassification as chainlink fence (0.00047% to 1.73%).
- Adversarial Transferability:
- Failures in IN-G-RN transferred to another independently trained ResNet-50 seed 78% of the time.
- Failures in IN-G-VIT transferred to a second ViT seed 77% of the time.
- Cross-architecture transfer remained high: IN-G-RN caused 39%–53% error rates on large-scale pretrained models (BiT, ViT), while IN-G-VIT caused 50%–61% error rates.
Limitations and Future Work
- Coverage & Search Completeness: The pipeline can confirm the presence of bugs but cannot prove their absence; rare, long-tail real-world scenarios are unlikely to be generated by off-the-shelf generative models.
- Generative Biases: Text-to-image models reflect web distribution biases (e.g., generating blue crayfish at disproportionately high rates: ~9% vs. 1 in 10,000 in nature).
- Captioning Bottlenecks: Captions can be ungrounded or miss complex visual relationships that humans perceive instantly.
- Out-of-Distribution Artifacts: Text-to-image models occasionally produce stylized, painterly, or physically implausible renderings rather than photorealistic scenes.
- Future Directions: Incorporating active adversarial prompt searches (rather than random sampling), fine-tuning generators on domain-specific data (e.g., medical imaging), and addressing data privacy in generative pipelines.
Summary updated