[ICCV2025]LGSP-Prompt: Revisiting Pool-based Prompt Learning for Few-shot Class-incremental Learning
March 18, 2026 ยท View on GitHub
Authors: Yongwei Jiang, Yixiong Zou*, Yuhua Li, Ruixuan Li
Affiliation: School of Computer Science and Technology, Huazhong University of Science and Technology
๐ฅ News
2025.09.28๐ Code and implementation released2025.06.26๐ Our paper is accepted at ICCV 2025!
๐ก Highlights
TLDR: We present the first study of pool-based prompt learning in FSCIL settings, revealing token-dimension saturation issues when applying L2P to few-shot scenarios, and propose LGSP-Prompt that innovatively shifts from token dimension to spatial dimension for superior performance.
๐ฆ Installation
Prerequisites
- Python >= 3.8
- PyTorch >= 1.12.0
- timm >= 0.6.7
- Vision Transformer backbone
Quick Setup
# Clone the repository
git clone https://github.com/Jywsuperman/LGSP.git
cd LGSP
# Create conda environment
conda create -n lgsp python=3.9 -y
conda activate lgsp
# Install PyTorch (match your CUDA version)
pip install torch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 --index-url https://download.pytorch.org/whl/cu116
# Install all dependencies
pip install -r requirements.txt
๐ Dataset Preparation
Datasets Overview
| Dataset | Domain | Images | Base Classes | Novel Classes | Download |
|---|---|---|---|---|---|
| CUB-200 | Birds | 11,788 | 100 | 100 (10 sessions, 10 classes each) | GDrive / Baidu Pan |
| iNF200 | Fungi | 10,000 | 100 | 100 (10 sessions, 10 classes each) | GDrive / Baidu Pan |
| FGVC-Aircraft | Aircraft | 10,000 | 50 | 50 (10 sessions, 5 classes each) | GDrive / Baidu Pan |
Note: Novel classes are divided into sessions for incremental few-shot learning
Directory Structure
your_workspace/
โโโ ๐ต LGSP/ # This repository (contains session splits)
โ โโโ data/
โ โ โโโ index_list/ # Session split files
โ โโโ models/
โ โโโ utils_data/
โ โโโ train.py
โ
โโโ ๐ data/ # Dataset folder (same level as LGSP)
โ
โโโ ๐ข CUB_200_2011/ # Bird species dataset
โ โโโ attributes/
โ โโโ images/
โ โโโ classes.txt
โ โโโ ...
โ
โโโ ๐ก fgvc-aircraft-2013b/ # Aircraft dataset
โ โโโ data/
โ โ โโโ images/
โ โ โโโ variants.txt
โ โโโ ...
โ
โโโ ๐ฃ iNF200/ # Natural image dataset
โโโ train_mini/
โ โโโ [class folders]
โโโ val/
โโโ [class folders]
๐ Quick Start
Training LGSP-Prompt
Run the training script with pre-configured parameters:
cd run_script
python vit_run_pretrain.py
Configuration
Modify parameters in run_script/vit_run_pretrain.py:
# Dataset selection (uncomment one)
dataset = 'cub200'
# dataset = 'FGVCAircraft'
# dataset = 'iNF200'
# Training parameters
epochs_bases = [80] # Base session epochs
epochs_new = 5 # Novel session epochs
gpu_num = 1 # GPU ID
# Learning rates
lr_base = 0.01 # Base classifier LR
lr_new = 0.06 # Novel classifier LR
lr_PromptTokens_base = 0.02 # Base prompt tokens LR
lr_PromptTokens_novel = 0.003 # Novel prompt tokens LR
# Data directory
data_dir = '/path/to/your_workspace/data' # Update this path
Manual Training (Alternative)
You can also run training directly:
# FGVCAircraft FSCIL
python train.py \
-project base \
-dataset FGVCAircraft \
-base_mode ft_dot \
-new_mode avg_cos \
-lr_base 0.01 \
-lr_new 0.06 \
-epochs_base 80 \
-epochs_new 5 \
-gpu 0 \
-vit \
-dataroot /path/to/your_workspace/data
Note: For different datasets, simply change the dataset variable in the configuration file.
๐ Citation
If you find our work useful for your research, please cite:
@inproceedings{jiang2025revisiting,
title={Revisiting pool-based prompt learning for few-shot class-incremental learning},
author={Jiang, Yongwei and Zou, Yixiong and Li, Yuhua and Li, Ruixuan},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
pages={1303--1313},
year={2025}
}
๐ค Acknowledgments
We thank the authors of the following works that inspired our research:
- L2P for pioneering prompt pool learning
- VPT for visual prompt tuning foundation
- PriViLege for FSCIL baselines
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ง Contact
- Yongwei Jiang: jiangyongwei@hust.edu.cn
- GitHub Issues: Create an issue
๐ Star this repo if you find it helpful! ๐
"From token saturation to spatial innovation - rethinking prompt learning for FSCIL"