Self-regulating Prompts: Foundational Model Adaptation without Forgetting

Prompt learning has emerged as an efficient alternative for fine-tuning foundational models, such as CLIP, for various downstream tasks. Conventionally trained using the task-specific objective, i.e., cross-entropy loss, prompts tend to overfit downstream data distributions and find it challenging to capture task-agnostic general features from the frozen CLIP. This leads to the loss of the model's original generalization capability. To address this issue, our work introduces a self-regularization framework for prompting called PromptSRC (Prompting with Self-regulating Constraints). PromptSRC guides the prompts to optimize for both task-specific and task-agnostic general representations using a three-pronged approach by: (a) regulating prompted representations via mutual agreement maximization with the frozen model, (b) regulating with self-ensemble of prompts over the training trajectory to encode their complementary strengths, and (c) regulating with textual diversity to mitigate sample diversity imbalance with the visual branch. To the best of our knowledge, this is the first regularization framework for prompt learning that avoids overfitting by jointly attending to pre-trained model features, the training trajectory during prompting, and the textual diversity. PromptSRC explicitly steers the prompts to learn a representation space that maximizes performance on downstream tasks without compromising CLIP generalization. We perform extensive experiments on 4 benchmarks where PromptSRC overall performs favorably well compared to the existing methods. Our code and pre-trained models are publicly available at: https://github.com/muzairkhattak/PromptSRC.

PDF Abstract ICCV 2023 PDF ICCV 2023 Abstract

Results from the Paper


Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Prompt Engineering Caltech-101 PromptSRC Harmonic mean 96.02 # 7
Prompt Engineering DTD PromptSRC Harmonic mean 71.75 # 5
Prompt Engineering EuroSAT PromptSRC Harmonic mean 82.32 # 7
Prompt Engineering FGVC-Aircraft PromptSRC Harmonic mean 40.15 # 4
Prompt Engineering Food-101 PromptSRC Harmonic mean 91.10 # 6
Prompt Engineering ImageNet PromptSRC Harmonic mean 74.01 # 7
Prompt Engineering ImageNet-A PromptSRC Top-1 accuracy % 50.90 # 2
Prompt Engineering ImageNet-R PromptSRC Top-1 accuracy % 77.80 # 2
Prompt Engineering ImageNet-S PromptSRC Top-1 accuracy % 49.55 # 2
Prompt Engineering ImageNet V2 PromptSRC Top-1 accuracy % 64.35 # 2
Prompt Engineering Oxford 102 Flower PromptSRC Harmonic mean 85.95 # 4
Prompt Engineering Oxford-IIIT Pet Dataset PromptSRC Harmonic mean 96.30 # 7
Prompt Engineering Stanford Cars PromptSRC Harmonic mean 76.58 # 3
Prompt Engineering SUN397 PromptSRC Harmonic mean 80.52 # 6
Prompt Engineering UCF101 PromptSRC Harmonic mean 82.74 # 5

Methods