Papers › Self-regulating Prompts: Foundational Model Adaptation without Forgetting

Self-regulating Prompts: Foundational Model Adaptation without Forgetting

13 Jul 2023ICCV 2023 1arXiv:2307.06948archive 2025-07-28

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

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.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2307.06948")

Code

Syntology Ran 7 of 21 code samples harvested from 2 repositories linked to this paper; 14 have no recorded run. Of those that ran: 4 ran · our draft was wrong; 3 ran with no contract checked.

By repository: official repository: 6 samples from 1 repository, 4 ran; community (archive-listed): 15 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

muzairkhattak/promptsrc officialmentioned in papermentioned on GitHubpytorchMIT report
asif-hanif/vafa mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

21 samples harvested; 7 ran; 0 honoured the contract we drafted; 14 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

4ran · our draft was wrong
3ran
14unverified

Licence: 0 of the 21 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

basic_clean muzairkhattak/PromptSRC/clip/simple_tokenizer.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 98f385d847636a3e · report
compute_ci95 muzairkhattak/PromptSRC/parse_test_res.py official repository ran fingerprinted MIT (permissive) · ba26afd892405335 · report
get_pairs muzairkhattak/PromptSRC/clip/simple_tokenizer.py official repository ran · our draft was wrong MIT (permissive) · d919ae32e5e4e616 · report
whitespace_clean muzairkhattak/PromptSRC/clip/simple_tokenizer.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 9542161e9640b858 · report
build_model muzairkhattak/PromptSRC/clip/model.py official repository unverified MIT (permissive) · 48ac2bd4dcbfb717 · report
load muzairkhattak/PromptSRC/clip/clip.py official repository unverified MIT (permissive) · fbf8c0143d9c48e3 · report
clip_by_tensor asif-hanif/vafa/generate_adv_samples.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 11d8e1b97b2f5801 · report
dice asif-hanif/vafa/trainer.py community (archive-listed) ran MIT (permissive) · 7b0ecad70df7f175 · report
diff_round asif-hanif/vafa/attacks/vafa/utils.py community (archive-listed) ran fingerprinted MIT (permissive) · 37251df462837488 · report
basic_iterative_method_l_inf asif-hanif/vafa/attacks/bim.py community (archive-listed) unverified MIT (permissive) · 26f9951311aad9a4 · report
block_merging_2d asif-hanif/vafa/attacks/vafa/decompression.py community (archive-listed) unverified MIT (permissive) · 06d539bf83ec69a8 · report
block_merging_3d asif-hanif/vafa/attacks/vafa/decompression.py community (archive-listed) unverified MIT (permissive) · b4bd444510dc7370 · report
block_splitting_2d asif-hanif/vafa/attacks/vafa/compression.py community (archive-listed) unverified MIT (permissive) · 6ec553f76a64ec2b · report
block_splitting_3d asif-hanif/vafa/attacks/vafa/compression.py community (archive-listed) unverified MIT (permissive) · 540c488a5c1d1cbd · report
dct_3d asif-hanif/vafa/attacks/vafa/compression.py community (archive-listed) unverified MIT (permissive) · 717c228e9810218e · report
fast_gradient_sign_method_l_inf asif-hanif/vafa/attacks/fgsm.py community (archive-listed) unverified MIT (permissive) · 5eac0a1d1c33cb09 · report
gaussain_noise asif-hanif/vafa/attacks/gn.py community (archive-listed) unverified MIT (permissive) · 191a40826c2817e4 · report
get_slices asif-hanif/vafa/generate_adv_samples.py community (archive-listed) unverified MIT (permissive) · c3db89de9732f13a · report
idct_3d asif-hanif/vafa/attacks/vafa/decompression.py community (archive-listed) unverified MIT (permissive) · 355f982908ae421b · report
phi_diff asif-hanif/vafa/attacks/vafa/utils.py community (archive-listed) unverified MIT (permissive) · c8febed4b57496fc · report
profile asif-hanif/vafa/trainer.py community (archive-listed) unverified MIT (permissive) · 8d28994182c6f301 · report

Tasks

DiversityPrompt EngineeringPrompt Learningmodel

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Prompt Engineering Caltech-101 PromptSRC Harmonic mean 96.02 #11 of 14 Archive leaderboard report
Prompt Engineering DTD PromptSRC Harmonic mean 71.75 #8 of 14 Archive leaderboard report
Prompt Engineering EuroSAT PromptSRC Harmonic mean 82.32 #11 of 14 Archive leaderboard report
Prompt Engineering FGVC-Aircraft PromptSRC Harmonic mean 40.15 #8 of 14 Archive leaderboard report
Prompt Engineering Food-101 PromptSRC Harmonic mean 91.10 #7 of 13 Archive leaderboard report
Prompt Engineering ImageNet PromptSRC Harmonic mean 74.01 #11 of 15 Archive leaderboard report
Prompt Engineering ImageNet V2 PromptSRC Top-1 accuracy % 64.35 #4 of 8 Archive leaderboard report
Prompt Engineering ImageNet-A PromptSRC Top-1 accuracy % 50.90 #5 of 9 Archive leaderboard report
Prompt Engineering ImageNet-R PromptSRC Top-1 accuracy % 77.80 #2 of 9 Archive leaderboard report
Prompt Engineering ImageNet-S PromptSRC Top-1 accuracy % 49.55 #2 of 9 Archive leaderboard report
Prompt Engineering Oxford 102 Flower PromptSRC Harmonic mean 85.95 #7 of 14 Archive leaderboard report
Prompt Engineering Oxford-IIIT Pet Dataset PromptSRC Harmonic mean 96.30 #11 of 14 Archive leaderboard report
Prompt Engineering SUN397 PromptSRC Harmonic mean 80.52 #10 of 14 Archive leaderboard report
Prompt Engineering Stanford Cars PromptSRC Harmonic mean 76.58 #6 of 14 Archive leaderboard report
Prompt Engineering UCF101 PromptSRC Harmonic mean 82.74 #8 of 14 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

CLIP

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections