[ICCV2025]LGSP-Prompt: Revisiting Pool-based Prompt Learning for Few-shot Class-incremental Learning

March 18, 2026 ยท View on GitHub

ICCV 2025 arXiv GitHub Stars License

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 released
  • 2025.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

DatasetDomainImagesBase ClassesNovel ClassesDownload
CUB-200Birds11,788100100 (10 sessions, 10 classes each)GDrive / Baidu Pan
iNF200Fungi10,000100100 (10 sessions, 10 classes each)GDrive / Baidu Pan
FGVC-AircraftAircraft10,0005050 (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


๐ŸŒŸ Star this repo if you find it helpful! ๐ŸŒŸ

"From token saturation to spatial innovation - rethinking prompt learning for FSCIL"