Official Pytorch implementation of "CLOSER: Towards Better Representation Learning for Few-Shot Class-Incremental Learning" accepted at ECCV2024. Paper
If you find this repo useful for your research, please consider citing our paper:
@InProceedings{oh2024closer,
author = {Oh, Junghun and Baik, Sungyong and Lee, Kyoung Mu},
title = {CLOSER: Towards Better Representation Learning for Few-Shot Class-Incremental Learning},
booktitle = {IEEE/CVF European conference on computer vision (ECCV)},
year = {2024}
}
Aiming to incrementally learn new classes with only few samples while preserving the knowledge of base (old) classes, few-shot class-incremental learning (FSCIL) faces several challenges, such as overfitting and catastrophic forgetting. Such a challenging problem is often tackled by fixing a feature extractor trained on base classes to reduce the adverse effects of overfitting and forgetting. Under such formulation, our primary focus is representation learning on base classes to tackle the unique challenge of FSCIL: simultaneously achieving the transferability and discriminability of the learned representation. Building upon the recent efforts for enhancing the transferability, such as promoting the spread of features, we find that trying to secure the spread of features within a more confined feature space enables the learned representation to strike a better balance between the transferability and discriminability. Thus, in stark contrast to priory beliefs that the inter-class distance should be maximized, we claim that the CLOSER different classes are, the better for FSCIL. The empirical results and analysis from the perspective of information bottleneck theory justify our simple yet seemingly counter-intuitive representation learning method, raising research questions and suggesting alternative research directions.
For detailed descriptions on the proposed method and experimental results, please refer to the paper.
conda env create -n YourEnv -f dependencies.yaml
conda activate YourEnv
Please follow the instruction in CEC.
python train.py -project closer -dataset cifar100 -lr_base 0.1 -epochs_base 200 -gpu $gpu --closer --save closer -batch_size_base 128 -seed 1 --ssc_lamb 0.1 --inter_lamb 1 --temp 32
python train.py -project closer -dataset mini_imagenet -lr_base 0.1 -epochs_base 200 -gpu $gpu --closer --save closer -batch_size_base 128 -seed 1 --ssc_lamb 0.1 --inter_lamb 0.5 --temp 32
python train.py -project closer -dataset cub200 -lr_base 0.005 -epochs_base 50 -gpu $gpu --closer --save closer -batch_size_base 256 -seed 1 --ssc_lamb 0.01 --inter_lamb 1.5 --temp 32
See the effect of inter-class distance minimization loss by controlling the 'inter_lamb' argument!
We uploaded the trained models using CLOSER here.
For evaluation the models:
python train.py -project closer -dataset $dataset -gpu $gpu --closer --save closer_trained --eval_only -model_dir $model_dir
We reference the following repositories: