Abstract
Vision models with high overall accuracy often exhibit systematic errors in specific scenarios, posing potential serious safety concerns. Diagnosing bugs of vision models is gaining increased attention; however, traditional diagnostic approaches require significant annotation efforts. To address this issue, we propose a language-assisted diagnostic method that uses texts instead of images to diagnose bugs in vision models based on multi-modal models (e.g., CLIP). Our approach connects the embedding space of CLIP with the buggy vision model to be diagnosed. Utilizing a shared classifier and the cross-modal transferability of CLIP's embedding space, the text-branch of CLIP becomes a proxy model to find bugs. During diagnosis, a Large Language Model (LLM) is employed to obtain task-relevant corpora and extract keywords. Descriptions constructed with templates containing these keywords serve as input text to probe errors in the proxy model. We validate this ability on the Waterbirds and CelebA datasets, identifying both known and previously unknown bugs comprehensible to human experts.
Introduction
Deep learning models often achieve high overall accuracy while harboring "bugs"—systematic failures on specific subgroups of data. For instance, a model might identify "cows" perfectly on grass but fail when they appear on a beach because it has learned a spurious correlation between the animal and its typical background.
Traditionally, diagnosing these "slices" (underperforming subgroups) is a manual, labor-intensive process. It requires researchers to either have prior knowledge of potential biases or to collect and annotate thousands of images to find where the model trips up. This "data bottleneck" makes it incredibly difficult to audit models for fairness and safety in the real world.
Methodology: LaVMD
The authors introduce LaVMD (Language-assisted Vision Model Debugger), which shifts the debugging process from the visual domain to the linguistic domain through three key steps:
1. Feature Distillation (The Bridge)
The authors train a small "adapter" (a multi-layer perceptron) to align the embedding space of a pre-trained CLIP image encoder with the feature space of the "buggy" vision model. This essentially teaches CLIP to "see" the world through the eyes of the model being debugged.
2. Language Proxy Model
Because CLIP is multimodal, once the image spaces are aligned, the CLIP text encoder can act as a proxy. Researchers can feed text prompts (e.g., "a photo of a cow on a beach") into the system, and the model's existing classifier will react to that text as if it were an image.
3. LLM-Guided Attribute Discovery
To avoid needing a human to guess what might be wrong, the authors use Llama2 to generate a massive list of task-relevant attributes. These attributes are converted into "probe texts" to automatically scan the model for performance gaps. The authors also use "mean centering" to ensure that text and image features are mathematically compatible, improving the accuracy of the text-based diagnosis.
Experimental Evaluation
The framework was evaluated on three benchmark datasets known for spurious correlations:
- CelebA: Used to identify gender bias in hair color classification (e.g., models struggling with blond men).
- Waterbirds: Used to identify background bias (e.g., landbirds on water).
- NICO++: A complex dataset with various contexts (rock, grass, water) used to test the model's ability to handle diverse "real-world" scenarios.
Key Results
- High Precision: LaVMD achieved a Precision@10 of 0.95 on Waterbirds and 1.0 on CelebA, matching or exceeding state-of-the-art methods that require actual image samples.
- Effective Repair: By fine-tuning the model's last layer using only text features generated by the proxy, the authors significantly improved "worst-group accuracy." For example, on CelebA, the worst-group accuracy jumped from 35.6% to 81.6% using text-only intervention.
- Zero-Sample Robustness: Unlike previous methods (like Domino or FACTS) that need failure examples in a validation set, LaVMD remains effective even when the validation set contains zero bias-conflicting samples.
Conclusion
LaVMD demonstrates that you don't need to find a "failed" image to know a model will fail. If the language proxy model shows a high error gap for a specific text prompt, the physical model is almost certainly buggy in that visual context. By leveraging the cross-modal transferability of concepts in models like CLIP and using LLMs as "bias brainstormers," LaVMD provides a scalable, sample-free path to auditing and repairing vision models.
Summary updated