Prompt Tuning for CLIP on the Pretrained Manifold
Organizations: Guizhou University, Guiyang, China · Harbin Institute of Technology, China · The Chinese University of Hong Kong, Shenzhen, China
Abstract
Prompt tuning introduces learnable prompt vectors that adapt pretrained vision-language models to downstream tasks in a parameter-efficient manner. However, under limited supervision, prompt tuning alters pretrained representations and drives downstream features away from the pretrained manifold toward directions that are unfavorable for transfer. This drift degrades generalization. To address this limitation, we propose ManiPT, a framework that performs prompt tuning on the pretrained manifold. ManiPT introduces cosine consistency constraints in both the text and image modalities to confine the learned representations within the pretrained geometric neighborhood. Furthermore, we introduce a structural bias that enforces incremental corrections, guiding the adaptation along transferable directions to mitigate reliance on shortcut learning. From a theoretical perspective, ManiPT alleviates overfitting tendencies under limited data. Our experiments cover four downstream settings: unseen-class generalization, few-shot classification, cross-dataset transfer, and domain generalization. Across these settings, ManiPT achieves higher average performance than baseline methods. Notably, ManiPT provides an explicit perspective on how prompt tuning overfits under limited supervision.
Figures & tables
| Method | (a) Average | (b) ImageNet | (c) Caltech101 | (d) OxfordPets | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Base | Novel | HM | Base | Novel | HM | Base | Novel | HM | Base | Novel | HM | |
| CLIP | 69.34 | 74.22 | 71.70 | 72.43 | 68.14 | 70.22 | 96.84 | 94.00 | 95.40 | 91.17 | 97.26 | 94.12 |
| CoOp | 82.69 | 63.22 | 71.66 | 76.47 | 67.88 | 71.92 | 98.00 | 89.81 | 93.73 | 93.67 | 95.29 | 94.47 |
| CoCoOp | 80.47 | 71.69 | 75.83 | 75.98 | 70.43 | 73.10 | 97.96 | 93.81 | 95.84 | 95.20 | 97.69 | 96.43 |
| MaPLe | 82.28 | 75.14 | 78.55 | 76.66 | 70.54 | 73.47 | 97.74 | 94.36 | 96.02 | 95.43 | 97.76 | 96.58 |
| LLaMP | 85.16 | 77.71 | 81.27 | 77.99 | 71.27 | 74.48 | 98.45 | 95.85 | 97.13 | 96.31 | 97.74 | 97.02 |
| Source | Target | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ImageNet | Caltech101 | OxfordPets | StanfordCars | Flowers102 | Food101 | Aircraft | SUN397 | DTD | EuroSAT | UCF101 | Average | |
| CoOp | 71.51 | 93.70 | 89.14 | 64.51 | 68.71 | 85.30 | 18.47 | 64.15 | 41.92 | 46.39 | 66.55 | 63.88 |
| CoCoOp | 71.02 | 94.43 | 90.14 | 65.32 | 71.88 | 86.06 | 22.94 | 67.36 | 45.73 | 45.37 | 68.21 | 65.74 |
| MaPLe | 70.72 | 95.53 | 90.49 | 65.57 | 72.20 | 86.20 | 24.74 | 67.01 | 46.49 | 48.06 | 68.69 | 66.50 |
| CoPrompt | 70.80 | 94.50 | 90.73 | 65.67 | 72.30 | 86.43 | 24.00 | 67.57 | 47.07 | 51.90 | 69.73 | 66.99 |
| TAC | 72.77 | 94.53 | 90.67 | 65.30 | 72.20 | 85.83 | 23.53 | 67.63 | 47.57 | 48.07 | 70.00 | 66.53 |
| Source | Target | |||||
|---|---|---|---|---|---|---|
| ImageNet | -V2 | -S | -A | -R | Avg. | |
| CoOp | 71.51 | 64.20 | 47.99 | 49.71 | 75.21 | 59.28 |
| CoCoOp | 71.02 | 64.07 | 48.75 | 50.63 | 76.18 | 59.91 |
| MaPLe | 70.72 | 64.07 | 49.15 | 50.90 | 76.98 | 60.27 |
| CoPrompt | 70.80 | 64.25 | 49.43 | 50.50 | 77.51 | 60.42 |
| TAC | 72.77 | 65.97 | 50.30 | 51.73 | 78.50 | 61.63 |
| Structural Bias | Cos. Consistency | LLM Enrich. | Base | New | HM |
|---|---|---|---|---|---|
| 82.91 | 64.15 | 72.82 | |||
| ✓ | 84.85 | 68.32 | 75.71 | ||
| ✓ | 82.85 | 76.50 | 79.54 | ||
| ✓ | ✓ | 85.65 | 77.58 | 81.42 | |
| ✓ | ✓ | ✓ | 85.82 | 78.67 | 82.09 |
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Domain / Task | Classes | Train Size | Test Size |
| Standard Benchmarks | ||||
| ImageNet | General Objects | 1,000 | 1,281,167 | 50,000 |
| Caltech101 | General Objects | 100 | 4,128 | 2,465 |
| OxfordPets | Fine-grained (Pets) | 37 | 2,944 | 3,669 |
| StanfordCars | Fine-grained (Cars) | 196 | 6,509 | 8,041 |
| Flowers102 | Fine-grained (Flowers) | 102 | 4,093 | 2,463 |
| Mean | Drift | ||||
|---|---|---|---|---|---|
| Dataset | |||||
| ImageNet | 0.9952 | 0.8741 | 0.0045 | 0.1452 | |
| Caltech101 | 0.9978 | 0.8950 | -0.0021 | 0.1050 | |
| OxfordPets | 0.9965 | 0.8620 | 0.0012 | 0.1523 | |
| StanfordCars | 0.9910 | 0.8150 | 0.0078 | 0.2105 | |
| Flowers102 | 0.9930 | 0.8245 | -0.0048 | 0.1950 | |
| Dataset | Method | 1 shot | 2 shots | 4 shots | 8 shots | 16 shots |
|---|---|---|---|---|---|---|
| Average | Linear probe CLIP | 45.83 | 57.98 | 68.01 | 74.47 | 78.79 |
| CoOp | 67.56 | 70.65 | 74.02 | 76.98 | 79.89 | |
| CoCoOp | 66.79 | 67.65 | 71.21 | 72.96 | 74.90 | |
| MaPLe | 69.27 | 72.58 | 75.37 | 78.89 | 81.79 | |
| PromptSRC | 72.32 | 75.29 | 78.35 | 80.69 | 82.87 | |
| ManiPT | 74.75 | 76.77 | 80.01 | 82.12 | 84.64 |
| Strategy | Base | New | HM |
|---|---|---|---|
| Direct Tuning | 82.85 | 76.50 | 79.54 |
| Gate | 85.35 | 78.40 | 81.73 |
| Additive | 85.82 | 78.67 | 82.09 |
| Anchor Source | Base | New | HM |
|---|---|---|---|
| a photo of a {class} | 85.65 | 77.58 | 81.42 |
| Handcrafted Templates | 85.70 | 77.80 | 81.56 |
| LLM Descriptions | 85.82 | 78.67 | 82.09 |
| Base | New | HM | ||
|---|---|---|---|---|
| 84.85 | 68.32 | 75.71 | ||
| ✓ | 85.45 | 73.15 | 78.82 | |
| ✓ | 85.15 | 74.80 | 79.64 | |
| ✓ | ✓ | 85.82 | 78.67 | 82.09 |
| Regularization Method | Base | New | HM |
|---|---|---|---|
| No Constraint | 84.85 | 68.32 | 75.71 |
| L1 | 83.50 | 72.45 | 77.58 |
| L2 | 78.95 | 76.10 | 77.50 |
| Cosine | 85.82 | 78.67 | 82.09 |
| Variant | Base | New | HM |
|---|---|---|---|
| ManiPT (Full) | 85.82 | 78.67 | 82.09 |
| w/o Frozen Text ( ) | 83.45 | 77.25 | 80.23 |
| w/o Frozen Visual ( ) | 85.40 | 78.25 | 81.67 |
| Constraint Target | Base | New | HM |
|---|---|---|---|
| Prompt Features (prompt-branch , ) | 84.65 | 77.45 | 80.89 |
| Final Features (fused , ) | 85.82 | 78.67 | 82.09 |
| Initialization | Base | New | HM |
|---|---|---|---|
| Kaiming Uniform | 85.45 | 78.10 | 81.61 |
| Normal (std=0.02) | 85.82 | 78.67 | 82.09 |
| Method | Base | New | HM |
|---|---|---|---|
| Txt-only Deep Prompting | 85.45 | 69.40 | 76.60 |
| Vis-only Deep Prompting | 84.20 | 74.85 | 79.25 |
| ManiPT | 85.82 | 78.67 | 82.09 |
| Method | Training Time | Peak Memory | Infer. Latency | Params |
|---|---|---|---|---|
| (s/epoch) | (GB) | (ms/img) | (M) | |
| Zero-shot CLIP | N/A | N/A | 3.42 | 0.00 |
| CoOp | 29.12 | 8.33 | 3.50 | 0.01 |
| CoCoOp | 836.08 | 8.25 | 39.97 | 0.04 |
| MaPLe | 241.51 | 8.30 | 3.83 | 3.56 |
| PromptSRC | 248.49 | 8.63 | 3.87 | 0.05 |
| MaPLe | ManiPT | |||||||
|---|---|---|---|---|---|---|---|---|
| Dataset | ||||||||
| ImageNet | 0.1320 | 0.1250 | 0.1085 | 0.0750 | 0.0038 | 0.0045 | 0.0051 | 0.0055 |
| Caltech101 | 0.0980 | 0.0910 | 0.0750 | 0.0480 | -0.0025 | -0.0021 | -0.0010 | 0.0005 |
| OxfordPets | 0.0890 | 0.0840 | 0.0680 | 0.0420 | 0.0008 | 0.0012 | 0.0015 | 0.0020 |
| StanfordCars | 0.1585 | 0.1520 | 0.1350 | 0.0950 | 0.0072 | 0.0078 | 0.0082 | 0.0085 |
| Flowers102 | 0.1450 | 0.1380 | 0.1120 | 0.0750 | -0.0055 | -0.0048 | -0.0030 | -0.0010 |
| Symbol | Description |
|---|---|
| , | Input image space and label space |
| Class index set, denotes the number of classes | |
| Data distribution over | |
| Training dataset, denotes the number of samples | |
| Sets of all and class-specific token sequences for the text encoder | |
| Embedding dimension of CLIP features |
| Symbol | Description |
|---|---|
| Frozen CLIP text and image encoders (prompts are provided as additional inputs during tuning) | |
| Frozen CLIP text feature for class | |
| Frozen CLIP visual feature for image | |
| Prompt-branch text feature for class | |
| Prompt-branch visual feature for image | |
| Final fused text feature for class |