Sungmin Cha, Kyunghyun Cho and Taesup Moon
Paper: [Link]
Abstract: We introduce a novel Pseudo-Negative Regularization (PNR) framework for effective continual self-supervised learning (CSSL). Our PNR leverages pseudo-negatives obtained through model-based augmentation in a way that newly learned representations may not contradict what has been learned in the past. Specifically, for the InfoNCE-based contrastive learning methods, we define symmetric pseudo-negatives obtained from current and previous models and use them in both main and regularization loss terms. Furthermore, we extend this idea to non-contrastive learning methods which do not inherently rely on negatives. For these methods, a pseudo-negative is defined as the output from the previous model for a differently augmented version of the anchor sample and is asymmetrically applied to the regularization term. Extensive experimental results demonstrate that our PNR framework achieves state-of-the-art performance in representation learning during CSSL by effectively balancing the trade-off between plasticity and stability.
We followed the experimental environment of CaSSLe as closely as possible. For details, please refer 'cassle.yml'.
- Create the environment: conda env create -f cassle.yml
- Clone the repository: git clone https://github.com/csm9493/PNR.git
- Navigate to the project directory: cd PNR
- Create folders: mkdir experiments trained_models wandb
- Run Wandb.
- Navigate to the project directory: cd PNR
- Check 'run_cifar100.sh' and change
PROJECT
,ENTITY
andDATA_DIR
. - Run the script: ./run_cifar100.sh
Note that each
.sh
file for experiments using the ImageNet-100 and DomainNet datasets contains code for two stages: "Step 1: CSSL" and "Step 2: Linear Evaluation." After completing Step 1 (CSSL), remember to update the model path inPRETRAINED_PATH
before starting the linear evaluation.
- Navigate to the project directory: cd PNR
- Download ImageNet-100 dataset and place it in
YOUR_DATASET_PATH
.
- For Class-IL experiments
- Check run_imagenet100_class.sh and change
PROJECT
,ENTITY
,DATA_DIR
,YOUR_IMAGENET100_TRAIN_PATH
, andYOUR_IMAGENET100_VAL_PATH
. - Run the script: ./run_imagenet100_class.sh
- For Data-IL experiments
- Check run_imagenet100_data.sh and change
PROJECT
,ENTITY
,DATA_DIR
,YOUR_IMAGENET100_TRAIN_PATH
, andYOUR_IMAGENET100_VAL_PATH
. - Run the script: ./run_imagenet100_data.sh
- Navigate to the project directory: cd PNR
- Download DomainNet dataset and place it in
YOUR_DOMAINNET_PATH
. - Check run_domainnet.sh and change
PROJECT
,ENTITY
,DATA_DIR
, andYOUR_DOMAINNET_PATH
- Run the script: ./run_domainnet.sh
This code is implemented based on the official code of CaSSLe and I would like to show my sincere gratitude to authors of it.
@InProceedings{pmlr-v235-cha24a, title = {Regularizing with Pseudo-Negatives for Continual Self-Supervised Learning}, author = {Cha, Sungmin and Cho, Kyunghyun and Moon, Taesup}, booktitle = {Proceedings of the 41st International Conference on Machine Learning}, pages = {6048--6065}, year = {2024}, editor = {Salakhutdinov, Ruslan and Kolter, Zico and Heller, Katherine and Weller, Adrian and Oliver, Nuria and Scarlett, Jonathan and Berkenkamp, Felix}, volume = {235}, series = {Proceedings of Machine Learning Research}, month = {21--27 Jul}, publisher = {PMLR} }