TL;DR
GroupCoOp is a highly efficient fine-tuning method that prevents vision-language models (VLMs) from latching onto misleading "shortcuts" or spurious correlations in imbalanced datasets. By learning multiple group-specific text prompts instead of altering visual features, it achieves state-of-the-art group robustness across five benchmarks while training a mere 0.016% of the network's parameters.
What Problem Does This Paper Address?
When we fine-tune large Vision-Language Models like CLIP on specific downstream tasks, they often suffer from a lack of group robustness. Because real-world datasets are frequently imbalanced, models tend to exploit undesirable shortcuts—known as spurious correlations—between the target label and irrelevant background attributes. For example, a model trained to classify bird species might proficiently identify a waterbird against a water background (the majority group) but fail completely when the same bird appears on land (the minority group).
Previous parameter-efficient fine-tuning (PEFT) methods attempted to fix this by training adapters to transform visual features so they align with a single, static text prompt for each class. However, learning these complex visual transformations is incredibly difficult for minority groups that suffer from a severe lack of training samples, often leading to poor generalization and the neglect of minority subgroups.
Methods
Instead of modifying visual features, the authors introduce Group Context Optimization (GroupCoOp). The core idea is to keep both the image and text encoders frozen, and instead learn multiple group-specific text prompts that act as specialized classifiers for different subgroups within the same class.
The framework consists of two main components:
- Group Context Optimization: For each subgroup, the model learns a set of continuous, learnable context word vectors alongside the class name. Because these prompts pass through the VLM's pre-trained text encoder, they can leverage rich language priors to form effective classifiers, even for minority groups with very few images.
- Pseudo Group Labeling: Since real-world training sets rarely come with explicit subgroup annotations (e.g., background labels), GroupCoOp utilizes a small, group-labeled validation set to train a proxy spurious attribute classifier. It establishes an optimized confidence threshold ($\tau$) to assign highly reliable pseudo-group labels to the training data, using random sampling for low-confidence images to avoid reinforcing existing biases.
Datasets
The authors evaluated GroupCoOp across five diverse real-world benchmarks:
- Waterbirds: Object vs. background spurious correlations (birds on land vs. water).
- CelebA: Face attribute classification prone to demographic bias (hair color vs. gender).
- Metashift: Natural image classification with severe context shifts (cats/dogs vs. indoor/outdoor environments).
- BREEDS (Living17 and Nonliving26): Sub-population shifts evaluating robustness to unseen sub-classes.
- MultiCelebA: A complex setting featuring multiple simultaneous biases (age and gender).
Key Insights and Ideas
- Text over Vision Transformation: Modifying text prompts is inherently more data-efficient than transforming visual features. It allows the model to successfully learn representations for minority groups even in extreme scenarios where a subgroup contains only a single training sample.
- Embracing Intra-Class Diversity: Instead of forcing all variations of a class into a single text embedding space, GroupCoOp acknowledges that a class looks different across subgroups. Providing multiple text representatives per class prevents the embedding space from becoming scattered and disorganized.
- Thresholded Pseudo-Labeling: Standard clustering techniques (like K-Means) often fail to detect group imbalances within a class. Optimizing a confidence threshold on a validation set ensures that pseudo-labels capture true subgroup distributions without amplifying the dataset's inherent noise.
Key Results
- State-of-the-Art Performance: GroupCoOp achieved the best worst-group accuracy across all five benchmarks using five different CLIP architectures (RN50, RN101, ViT-B/16, ViT-B/32, and ViT-L/14).
- Extreme Parameter Efficiency: The method trains only 4,096 parameters—a mere 0.016% of a standard ResNet50 backbone. Despite this, it frequently outperformed full fine-tuning methods that update 100% of the network's parameters.
- Massive Gains on Context Shifts: On the Metashift dataset, GroupCoOp achieved a worst-group accuracy of 89.2%, outperforming the previous state-of-the-art method (CFR) by a massive 9.8%.
Limitations and Future Work
While GroupCoOp successfully eliminates the need for expensive group annotations on the large-scale training set, it still relies on a small, group-labeled validation set to optimize the pseudo-labeling threshold and tune hyperparameters. The authors note that developing a completely unsupervised subgroup discovery mechanism that removes the need for any group-labeled validation data remains a promising direction for future research.
Summary updated