ProTPS: Prototype-Guided Text Prompt Selection for Continual Learning
Organizations: University of Washington, Seattle, WA, USA · Alaska Pacific University, Anchorage, Alaska, USA
Abstract
For continual learning, text-prompt-based methods leverage text encoders and learnable prompts to encode semantic features for sequentially arrived classes over time. A common challenge encountered by existing works is how to learn unique text prompts, which implicitly carry semantic information of new classes, so that the semantic features of newly arrived classes do not overlap with those of trained classes, thereby mitigating the catastrophic forgetting problem. To address this challenge, we propose a novel approach Prototype-guided Text Prompt Selection (ProTPS)'' to intentionally increase the training flexibility thus encouraging the learning of unique text prompts. Specifically, our ProTPS learns class-specific vision prototypes and text prompts. Vision prototypes guide the selection and learning of text prompts for each class. We first evaluate our ProTPS in both class incremental (CI) setting and cross-datasets continual (CDC) learning setting. Because our ProTPS achieves performance close to the upper bounds, we further collect a real-world dataset with 112 marine species collected over a span of six years, named Marine112, to bring new challenges to the community. Marine112 is authentically suited for the class and domain incremental (CDI) learning setting and is under natural long-tail distribution. The results under three settings show that our ProTPS performs favorably against the recent state-of-the-art methods. The implementation code and Marine112 dataset will be released upon the acceptance of our paper.
Figures & tables
| Prompt | Method | T-1 | T-2 | T-3 | T-4 | T-5 | T-6 | T-7 | T-8 | T-9 | T-10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| L2P [ 54 ] | 60.9 | 53.5 | 49.8 | 48.6 | 47.2 | 48.1 | 49.5 | 49.7 | 48.1 | 48.3 | |
| DualPrompt [ 53 ] | 72.5 | 60.8 | 55.7 | 54.3 | 53.2 | 53.6 | 53.8 | 53.3 | 52.8 | 52.6 | |
| CODA-P [ 41 ] | 91.1 | 86.5 | 82.9 | 80.3 | 79.8 | 78.2 | 77.1 | 77.2 | 75.6 | 75.2 | |
| HiDe-Prompt [ 49 ] | 92.3 | 90.1 | 89.8 | 87.5 | 85.5 | 85.9 | 84.5 | 85.9 | 83.5 | 82.9 | |
| CoOp [ 65 ] (1000) | 89.2 | 83.2 | 76.7 | 79.8 | 79.9 | 82.3 | 79.7 | 80.1 | 80.3 | 79.3 | |
| Continual-CLIP [ 43 ] | 93.3 | 87.6 | 83.1 | 81.7 | 80.5 | 80.2 | 79.3 | 78.5 | 76.9 | 75.4 |
| Prompt | Method | T-1 | T-2 | T-3 | T-4 | T-5 | T-6 | T-7 | T-8 | T-9 | T-10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| L2P [ 54 ] | 60.1 | 47.8 | 45.9 | 47.1 | 48.9 | 48.9 | 49.4 | 49.0 | 50.0 | 49.4 | |
| DualPrompt [ 53 ] | 73.9 | 60.2 | 56.4 | 55.3 | 54.5 | 53.3 | 53.4 | 53.1 | 53.5 | 54.0 | |
| CODA-P [ 41 ] | 94.3 | 87.3 | 83.7 | 82.7 | 81.3 | 78.2 | 76.7 | 74.0 | 74.1 | 72.3 | |
| HiDe-Prompt [ 49 ] | 95.4 | 93.6 | 90.7 | 89.5 | 87.9 | 85.5 | 84.0 | 82.0 | 82.2 | 81.0 | |
| CoOp [ 65 ] (1000) | 95.8 | 90.7 | 85.2 | 83.4 | 80.8 | 75.8 | 74.7 | 71.7 | 71.3 | 67.6 | |
| Continual-CLIP [ 43 ] | 95.3 | 92.3 | 82.1 | 79.2 | 78.5 | 77.9 | 75.7 | 75.2 | 74.8 | 73.4 |
| Prompt | Method | I2C | FT |
| L2P-1 [ 54 ] | 45.7 | -3.7 | |
| DualPrompt-1 [ 53 ] | 49.5 | -4.5 | |
| CODA-P-1 [ 41 ] | 66.9 | -5.4 | |
| HiDe-Prompt-1 [ 49 ] | 77.2 | -3.8 | |
| CoOp-1 [ 65 ] (1000) | 61.1 | -6.5 | |
| Continual-CLIP [ 43 ] | 73.4 | 0 |
| Prompt | Method | I+C |
| L2P-2 [ 54 ] | 41.6 | |
| DualPrompt-2 [ 53 ] | 45.8 | |
| CODA-P-2 [ 41 ] | 62.7 | |
| HiDe-Prompt-2 [ 49 ] | 75.3 | |
| CoOp-2 [ 65 ] (1000) | 55.4 | |
| Continual-CLIP [ 43 ] | 65.9 |
| Dataset | Authentic CL | Setting | Distribution | #Classes | Images | Fine-grained |
|---|---|---|---|---|---|---|
| Rotation MNIST [ 24 ] | DI | balanced | 10 | synthetic | ||
| Permutation MNIST [ 16 ] | DI | balanced | 10 | synthetic | ||
| NS-MiniImageNet [ 25 ] | DI | balanced | 100 | synthetic | ||
| CLEAR [ 21 ] | DI | balanced | 100 | real | ||
| DS-ImageNet-R [ 41 ] | CDI 1 1 1 DS-ImageNet-R introduces domain shifts that occur between classes, rather than within each class, as reflected in our training data. | balanced | 200 | real | ||
| CORe50-NIC [ 23 ] | CDI 2 2 2 CORe50-NIC aims to evaluate the model’s generalization to unseen domains, rather than its performance on domains learned incrementally, as demonstrated by our test protocol. | balanced | 50 | real |
| Prompt | Method | 2015 | 2016 | 2019 | 2020 | 2021 | 2022 |
|---|---|---|---|---|---|---|---|
| CODA-P [ 41 ] | 71.2 | 42.1 | 33.6 | 13.4 | 12.7 | 13.2 | |
| HiDe-Prompt [ 49 ] | 73.4 | 50.8 | 45.2 | 22.2 | 22.3 | 22.5 | |
| Continual-CLIP [ 43 ] | 12.7 | 11.8 | 10.2 | 9.6 | 10.1 | 9.5 | |
| Zero-Shot CLIP [ 35 ] | 15.4 | 13.1 | 11.6 | 10.3 | 10.5 | 9.6 | |
| CoOp [ 65 ] (1000) | 65.3 | 30.2 | 15.1 | 10.2 | 11.4 | 10.3 | |
| AttriCLIP [ 50 ] | 76.1 | 48.3 | 34.8 | 11.9 | 13.6 | 13.9 |
| PL | Prompt-Selection | STC | Last acc. | |
|---|---|---|---|---|
| refined | weight-top-1 | ✓ | ✓ | 83.28 |
| refined | weight-top-1 | ✓ | 80.95 (-2.33) | |
| refined | weight-top-1 | ✓ | 80.87 (-2.41) | |
| frozen | weight-top-1 | ✓ | ✓ | 80.65 (-2.63) |
| refined | ✓ | ✓ | 77.62 (-5.66) | |
| scratch | weight-top-1 | ✓ | ✓ | 58.42 (-24.86) |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Aggregation | Last acc. |
|---|---|
| Average | 93.92 |
| Max | 93.86 (-0.06) |
| Prompt | Method | CIFAR100 | ImageNet100 |
|---|---|---|---|
| - | SLCA [ 62 ] | 79.1 | 56.3 |
| L2P [ 54 ] | 49.4 | 48.3 | |
| DualPrompt [ 53 ] | 54.0 | 52.6 | |
| APG [ 42 ] | 54.2 | 53.1 | |
| CODA-P [ 41 ] | 72.3 | 75.2 | |
| HiDe-Prompt [ 49 ] | 81.0 | 82.9 |
| Prompt | Method | C | I2C | FT |
|---|---|---|---|---|
| S-liPrompts [ 52 ] | 58.9 | 53.3 | -5.6 | |
| L2P-1 [ 54 ] | 49.4 | 45.7 | -3.7 | |
| DualPrompt-1 [ 53 ] | 54.0 | 49.5 | -4.5 | |
| CODA-P-1 [ 41 ] | 72.3 | 66.9 | -5.4 | |
| HiDe-Prompt-1 [ 49 ] | 81.0 | 77.2 | -3.8 | |
| CoOp-1 [ 65 ] (1000) | 67.6 | 61.1 | -6.5 |
| Prompt | Method | I+C |
|---|---|---|
| S-liPrompts [ 52 ] | 39.6 | |
| L2P-2 [ 54 ] | 41.6 | |
| DualPrompt-2 [ 53 ] | 45.8 | |
| CODA-P-2 [ 41 ] | 62.7 | |
| HiDe-Prompt-2 [ 49 ] | 75.3 | |
| CoOp-2 [ 65 ] (1000) | 55.4 |
| Loss function | Last acc. |
|---|---|
| (ours) | 83.28 |
| SupCon Loss [ 13 ] | 82.57 (-0.71) |
| Method | CIFAR100 | ImageNet100 |
|---|---|---|
| Linear Probe CLIP | 86.69 | 95.52 |
| ProTPS (ours) | 87.19 | 95.86 |
| Method | Classifier | T-1 | T-2 | T-3 | T-4 | T-5 | T-6 | T-7 | T-8 | T-9 | T-10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Continual-CLIP [ 43 ] | text | 94.7 | 88.5 | 76.8 | 73.6 | 72.4 | 72.8 | 69.6 | 68.5 | 68.1 | 66.7 |
| Zero-Shot CLIP [ 35 ] | text | 95.6 | 89.2 | 77.7 | 74.6 | 73.9 | 74.1 | 70.6 | 70.1 | 69.6 | 68.3 |
| Prototypes-CLIP | vision | 95.6 | 90.7 | 81.5 | 77.1 | 75.9 | 75.7 | 72.8 | 72.3 | 71.4 | 69.9 |
| Continual-CLIP [ 43 ] | text | 95.3 | 92.3 | 82.1 | 79.2 | 78.5 | 77.9 | 75.7 | 75.2 | 74.8 | 73.4 |
| Zero-Shot CLIP [ 35 ] | text | 95.7 | 92.9 | 85.2 | 82.9 | 82.3 | 82.1 | 79.6 | 79.6 | 79.2 | 78.3 |
| Prototypes-CLIP | vision | 97.6 | 92.8 | 88.1 | 85.3 | 84.3 | 84.3 | 81.9 | 81.9 | 81.2 | 80.0 |
Continual Learning for VLMs
Continual learning for vision-language models studies how to adapt them to sequentially arriving data and tasks without losing earlier capabilities.
See all 77 papers