Abstract
Deep neural networks can be unreliable in the real world when the training set does not adequately cover all the settings where they are deployed. Focusing on image classification, we consider the setting where we have an error distribution $\mathcal{E}$ representing a deployment scenario where the model fails. We have access to a small set of samples ${\mathcal{E}_{{\text{sample}}}}$ from $\mathcal{E}$ and it can be expensive to obtain additional samples. In the traditional model development framework, mitigating failures of the model in $\mathcal{E}$ can be challenging and is often done in an ad hoc manner. In this paper, we propose a general methodology for model debugging that can systemically improve model performance on $\mathcal{E}$ while maintaining its performance on the original test set. Our key assumption is that we have access to a large pool of weakly (noisily) labeled data $\mathcal{F}$. However, naively adding $\mathcal{F}$ to the training would hurt model performance due to the large extent of label noise. Our Data-Centric Debugging (DCD) framework carefully creates a debug-train set by selecting images from $\mathcal{F}$ that are visually similar to the images in ${\mathcal{E}_{{\text{sample}}}}$. To do this, we use the ℓ2 distance in the feature space (penultimate layer activations) of various models including ResNet, Robust ResNet and DINO where we observe DINO ViTs are significantly better at discovering similar images compared to Resnets. Compared to the baselines that maintain model performance on the test set, we achieve significantly (+9.45%) improved results on the debug-heldout sets.
Introduction
Even state-of-the-art deep learning models frequently stumble in real-world deployment. These failures, such as misidentifying a "toy poodle" in an unusual setting or a "frypan" from an atypical angle, are often rooted in gaps within the training data. Traditionally, addressing these "error distributions" is an ad-hoc, manual, and expensive process involving data collection and retraining. Simply incorporating massive amounts of noisy web data often degrades performance due to a low signal-to-noise ratio. This research proposes Data-Centric Debugging (DCD), a systematic framework to identify and fix specific failure modes by retrieving relevant data from large, weakly labeled pools.
Methods: The DCD Framework
The DCD framework shifts the focus from model architecture to data quality through a retrieval-and-refine pipeline:
- Identify Failures: Start with a small set of images ($\mathcal{E}_{sample}$) where the model consistently fails.
- The Split: Divide these failures into a Debug-Seed set (for retrieval) and a Debug-Heldout set (for evaluation of generalization).
- Targeted Retrieval: Use Debug-Seed images as queries to search a large pool ($\mathcal{F}$) of ~950,000 weakly labeled Flickr images.
- Feature Embeddings: Calculate visual similarity using $\ell_2$ distance in feature space. The authors found DINO ViT (Vision Transformer) features significantly more effective than standard ResNet features for capturing object context and texture.
- Retraining: Add the retrieved images to the original training set and retrain the model to "debug" its knowledge gaps.
Datasets
The study utilized several key datasets:
- ImageNet: The base training set.
- ImageNet-V2: Specifically the "MatchedFrequency" subset, used to identify initial model failures.
- Flickr: A pool of ~950,000 images across 160 classes serving as the weakly labeled data source.
- FOCUS: A dataset of objects in common and uncommon settings (e.g., "frog in snow") used to evaluate context retention during retrieval.
Key Insights
- DINO as a Superior Retriever: Self-supervised models like DINO outperform supervised models in visual similarity tasks. While a ResNet might focus on simple geometric shapes (e.g., circularity for a frypan), DINO captures complex textures and environmental context, leading to higher-quality training samples.
- Generalization via Heldout Testing: By evaluating on a "Debug-Heldout" set, the authors demonstrate that DCD helps the model generalize to the entire distribution of a failure mode, rather than just memorizing specific seed images.
- Relevance Over Quantity: Adding the entire noisy Flickr dataset can drop accuracy by over 13%. DCD proves that a targeted subset of noisy data is far more beneficial than massive, uncurated noise.
Key Results
- Significant Performance Gains: On "Debug-Heldout" sets where the original model had 0% accuracy, the DCD-DINO approach achieved 29.62% accuracy, outperforming semi-supervised baselines by nearly 10%.
- Stability on Original Tasks: DCD improves failure mode performance without "catastrophic forgetting." Overall ImageNet accuracy was maintained or slightly improved (+1.73% on certain subsets).
- Contextual Accuracy: Experiments on the FOCUS dataset showed that DINO-based retrieval retained correct environmental context significantly better than ResNet-50.
Limitations and Future Work
DCD's effectiveness depends on the quality and relevance of the image pool ($\mathcal{F}$). If the pool lacks the necessary data for a specific domain (e.g., medical imaging), retrieval will fail. Additionally, identifying the initial error distribution still requires human insight. Future work could extend DCD to NLP or use it to mitigate social biases by retrieving more diverse representations of specific groups.
Summary updated