Abstract
Deep learning classifiers often rely on spurious correlations—incidental features like backgrounds that correlate with labels—rather than core object characteristics. Traditional debiasing methods, such as Last Layer Retraining (LLR), require expensive, manually annotated group-balanced datasets. We present TLDR (Text-based Last-layer retraining for Debiasing image classifieRs), a framework that leverages Large Language Models (LLMs) and vision-language models to debias classifiers using text as a proxy for images. By projecting CLIP text embeddings into a classifier's feature space while neutralizing the "modality gap," TLDR achieves debiasing performance competitive with image-based methods without the need for costly human annotation.
Addressing Spurious Correlations
Classifiers frequently "cheat" by picking up on spurious correlations. For example, a model might learn to identify "waterbirds" by the presence of water in the background rather than the bird itself. Existing solutions like Last Layer Retraining (LLR) work by retraining only the final classification layer using a "group-balanced" dataset (e.g., equal numbers of waterbirds on land and water). However, collecting these datasets is difficult because "minority groups" are rare and expensive to annotate.
The TLDR Framework
The authors propose a four-step pipeline to debias a general image classifier (e.g., a ResNet-50) using only text:
- Closed-Form Projector Estimation: To use text for retraining, CLIP text embeddings must be mapped into the classifier's specific feature space. TLDR derives a linear projector ($\Pi$) using a closed-form ridge regression. A key innovation is enforcing a condition where the projector's weights are orthogonal to the modality gap ($W^\top g = 0$), the systematic difference between image and text embeddings in CLIP.
- Diverse Text Generation: GPT-3.5 generates hundreds of synonyms and descriptions for both class labels (e.g., "Ahinga") and spurious attributes (e.g., "a forest").
- Validation of Embedding Alignment (VEA): A two-stage filtering process ensures generated text is semantically close to the class label in CLIP space and compatible with the target classifier’s feature space.
- Text-based LLR: Finally, the last layer of the biased classifier is retrained using these validated, projected text embeddings in a group-balanced fashion.
Experimental Results
TLDR was evaluated on standard benchmarks including Waterbirds, CelebA, and SpuCoAnimals.
- Competitive Performance: On Waterbirds, TLDR achieved a 92.1% Worst Group Accuracy (WGA), nearly matching the 92.5% of DFR, which requires real, human-annotated images.
- Superiority over Text Baselines: TLDR significantly outperformed other text-based methods like DrML and zero-shot CLIP, particularly on complex datasets like SpuCoAnimals (36.2% WGA vs. 22.4% for the next best baseline).
- Robustness: The method remains effective even when the minority group in the original training set is as low as 0.05%, a scenario where most debiasing methods fail.
Conclusion and Limitations
TLDR demonstrates that text can effectively represent the "distributional width" of a class to redefine classification boundaries. While powerful, the method's success depends on CLIP's internal knowledge and requires prior knowledge of the spurious attributes to prompt the LLM. Future work may focus on automating the discovery of these correlations and mitigating potential biases inherited from foundation models.
Summary updated