Introduction
Foundational vision-language models, such as CLIP, have demonstrated remarkable zero-shot capabilities across a wide array of visual tasks. To further enhance their performance on specific downstream applications, researchers often employ prompt learning. This technique involves training a small set of learnable parameters (prompts) while keeping the backbone model frozen. However, standard prompt learning frequently leads to overfitting, where the model excels at the training task but loses its inherent ability to generalize to novel, unseen classes.
The Overfitting Challenge
The primary issue with naive prompt learning is the "drift" from the generalized feature space of the original model toward a narrow, task-specific manifold. As the prompts adapt to the training data, they often discard the broad semantic knowledge that makes foundational models powerful. This trade-off results in improved performance on base classes at the significant expense of novel class accuracy.
The PromptSRC Framework
To address this, we present PromptSRC (Prompting with Self-regulating Constraints). PromptSRC introduces a multi-faceted approach to regularize the learning process, ensuring that the adapted model retains its foundational strengths while gaining task-specific expertise. The framework relies on three core components:
1. Mutual Agreement Maximization (SCL)
The framework utilizes a Self-Consistency Loss (SCL) to enforce similarity between the features produced by the prompted model and those of the original frozen CLIP model. By maximizing this mutual agreement, the model is constrained to stay within the generalized solution manifold while learning task-specific nuances.
2. Gaussian Weighted Prompt Aggregation (GPA)
Prompt performance varies throughout the training trajectory. Early prompts may be under-optimized, while late-stage prompts often overfit. PromptSRC employs a Gaussian-weighted ensemble of prompts collected during training, prioritizing the "mature yet general" representations found in the middle of the training process.
3. Textual Diversity Regularization
To prevent the text encoder from overfitting to limited label descriptions, PromptSRC incorporates a diverse pool of 60 textual templates (e.g., "a photo of a...", "a rendering of a..."). This textual augmentation balances the diversity between visual and linguistic inputs, leading to more robust and generalized representations.
Experimental Evaluation
PromptSRC was evaluated on 11 diverse benchmarks, including ImageNet, fine-grained datasets (e.g., OxfordPets, StanfordCars), and specialized domains (e.g., EuroSAT). The evaluation focused on three key areas: base-to-novel generalization, cross-dataset transfer, and domain generalization.
Results and Discussion
PromptSRC consistently achieves state-of-the-art results, outperforming established methods like CoOp, CoCoOp, and MaPLe:
- Generalization: On average, PromptSRC achieved a +1.42% improvement in harmonic mean (HM) over MaPLe and a +8.26% gain over zero-shot CLIP across 11 datasets.
- Fine-Grained Performance: Significant gains were observed in specialized tasks, such as a +3.1% HM increase on Stanford Cars and +3.7% on FGVC Aircraft.
- Efficiency: Remarkably, PromptSRC achieves these results with only 46K tunable parameters, a fraction of the 3.55M parameters required by MaPLe, making it highly efficient for deployment.
Conclusion
PromptSRC demonstrates that explicit self-regulation is key to adapting foundational models without sacrificing their generalization capabilities. By balancing task-specific learning with consistency constraints and textual diversity, PromptSRC provides a robust and efficient framework for model adaptation. Future work will explore the scalability of these constraints to larger models and multi-modal settings.
Summary updated