TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Self-regulating Prompts: Foundational Model Adaptation wit...

Self-regulating Prompts: Foundational Model Adaptation without Forgetting

Muhammad Uzair Khattak, Syed Talal Wasim, Muzammal Naseer, Salman Khan, Ming-Hsuan Yang, Fahad Shahbaz Khan

2023-07-13ICCV 2023 1Prompt Engineering
PaperPDFCode(official)Code

Abstract

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.

Results

TaskDatasetMetricValueModel
Prompt EngineeringImageNet-RTop-1 accuracy %77.8PromptSRC
Prompt EngineeringStanford CarsHarmonic mean76.58PromptSRC
Prompt EngineeringOxford 102 FlowerHarmonic mean85.95PromptSRC
Prompt EngineeringEuroSATHarmonic mean82.32PromptSRC
Prompt EngineeringOxford-IIIT Pet DatasetHarmonic mean96.3PromptSRC
Prompt EngineeringImageNet-STop-1 accuracy %49.55PromptSRC
Prompt EngineeringDTDHarmonic mean71.75PromptSRC
Prompt EngineeringUCF101Harmonic mean82.74PromptSRC
Prompt EngineeringFood-101Harmonic mean91.1PromptSRC
Prompt EngineeringCaltech-101Harmonic mean96.02PromptSRC
Prompt EngineeringImageNetHarmonic mean74.01PromptSRC
Prompt EngineeringFGVC-AircraftHarmonic mean40.15PromptSRC
Prompt EngineeringSUN397Harmonic mean80.52PromptSRC
Prompt EngineeringImageNet-ATop-1 accuracy %50.9PromptSRC
Prompt EngineeringImageNet V2Top-1 accuracy %64.35PromptSRC

Related Papers

Leveraging Language Prior for Infrared Small Target Detection2025-07-17Emotional Support with LLM-based Empathetic Dialogue Generation2025-07-17Prompt Engineering in Segment Anything Model: Methodologies, Applications, and Emerging Challenges2025-07-13AdaptaGen: Domain-Specific Image Generation through Hierarchical Semantic Optimization Framework2025-07-08Helping CLIP See Both the Forest and the Trees: A Decomposition and Description Approach2025-07-04State and Memory is All You Need for Robust and Reliable AI Agents2025-06-30Prompt Mechanisms in Medical Imaging: A Comprehensive Survey2025-06-28Fine-Tuning and Prompt Engineering of LLMs, for the Creation of Multi-Agent AI for Addressing Sustainable Protein Production Challenges2025-06-25