Split-and-Bridge

February 3, 2021 ยท View on GitHub

Split-and-Bridge: Adaptable Class Incremental Learning within a Single Neural Network in AAAI2021 by Jong-Yeong Kim and Dong-Wan Choi

Results

Average accuracies over all the incrmental tasks of ResNet-18 using CIFAR-100

The following results can be reproduced with command:

python main.py --dataset CIFAR100 --trainer split -- base-classes 50 --step-size 50 --rho 1
python main.py --dataset CIFAR100 --trainer split -- base-classes 20 --step-size 20 --rho 1.35
python main.py --dataset CIFAR100 --trainer split -- base-classes 10 --step-size 10 --rho 1.15
python main.py --dataset CIFAR100 --trainer split -- base-classes 5 --step-size 5 --rho 1
Number of tasks251020
STD with iCaRL68.0263.058.0560.36
STD with Bic70.1368.2261.1048.68
STD with WA69.7268.7363.9854.93
DD with WA69.3468.5363.7757.03
S&B with WA (ours)69.7769.7667.5661.52

Average accuracies over all the incrmental tasks of ResNet-18 using Tiny-ImageNet

The following results can be reproduced with command:

python main.py --dataset TinyImagenet --trainer split -- base-classes 100 --step-size 100 --rho 1
python main.py --dataset TinyImagenet --trainer split -- base-classes 40 --step-size 40 --rho 1.35
python main.py --dataset TinyImagenet --trainer split -- base-classes 20 --step-size 20 --rho 1.2
python main.py --dataset TinyImagenet --trainer split -- base-classes 10 --step-size 10 --rho 1.113
Number of tasks251020
STD with iCaRL55.3552.0548.6146.41
STD with Bic57.9056.1549.1742.43
STD with WA57.4956.4552.3447.10
DD with WA58.2157.5353.5148.15
S&B with WA (ours)59.057.6455.1151.64

Comparative performance of Split(1phase), Split+Bridge(1phase + 2phase) and S&B with WA on CIFAR-100

Number of tasks12
Split81.1662.02
Split+Bridge81.1666.40
S&B with WA81.1669.60
Number of tasks12345
Split85.0575.5560.1160.4054.28
Split+Bridge85.0577.2266.3860.4054.28
S&B with WA85.0577.4769.9166.2960.80
Number of tasks12345678910
Split82.6076.2571.4369.0860.0850.5637.8951.7149.1144.64
Split+Bridge82.6080.0574.6772.1265.8660.2857.3051.7149.1144.64
S&B with WA82.6080.5576.7074.9770.4265.8562.7060.1057.3654.08
Number of tasks1234567891011121314151617181920
Split78.6068.069.5371.2567.1661.4363.8559.5258.9347.8645.5646.8744.8039.6136.3335.3534.2531.0430.2827.09
Split+Bridge78.6079.4079.4076.8072.0468.4068.3766.7565.1055.5456.0554.7054.1350.0846.5845.5544.3842.4339.6838.27
S&B with WA78.6078.6079.8777.3075.0471.0770.5769.7067.9760.5860.3158.6356.5754.2651.0949.047.6446.8244.4341.91

Usage

Prerequisites

  1. Pytorch
  2. Python packages: numpy

Command

python main.py --dataset <choose dataset> --trainer <choose trainer>

Example: python main.py --dataset CIFAR100 --trainer split

Arguments

Required:

  • --dataset: Choose datset. Option: CIFAR100 or TinyImagenet
  • --trainer: Choose trainer. Option: split or icarl or bic or wa or dd

Optional:

  • --batch-size: input batch size for training. type: int, Default: 256
  • --workers: Number of workers in Dataloaders. type: int, Default: 0
  • --nepochs: Number of epochs for each increment. type: int, Default: 200
  • --lr: learning rate. type: float, Default: 0.1
  • --schedule: Decrease learning rate at these epochs. type: int, Default: [60,120,160]
  • --gammas: LR is multiplied by gamma on schedule, number of gammas should be equal to schedule. type: float, Default: [0.1, 0.1,0.1]
  • --momentum: SGD momentum. type: float, Default: 0.9
  • --decay: Weight decay (L2 penalty). type: float, Default: 0.0005
  • --base-classes: Number of base classe. type: int, Default: 20
  • --step-size: How many classes to add in each increment. type: int, Default: 20
  • --memory-budget: How many images can we store at max. type: int, Default: 2000
  • --rho: adaptive split hyperparameter. type: float, Default: 1
  • --seed: Seeds values to be used; seed introduces randomness by changing order of classes. type: int, Default: 0

Acknowledgements

This implementation has been tested with Pytorch 1.2.0 on Windows 10.