1. Training the original models and generating the indices for each label:


python batch_job_submit.py --job_type train --dataset cifar10 --method orig --model ResNet18 --mode wBN --seed -1 --unlearn_method RW
python batch_job_submit.py --job_type train --dataset cifar10 --method orig --model ResNet18 --mode wBN --seed -1 --unlearn_method retrain
python batch_job_submit.py --job_type train --dataset cifar10 --method orig --model VGG --mode wBN --seed -1 --unlearn_method RW
python batch_job_submit.py --job_type train --dataset cifar10 --method orig --model VGG --mode wBN --seed -1 --unlearn_method retrain

python batch_job_submit.py --job_type train --dataset cifar100 --method orig --model ResNet18 --mode wBN --seed -1 --unlearn_method RW
python batch_job_submit.py --job_type train --dataset cifar100 --method orig --model ResNet18 --mode wBN --seed -1 --unlearn_method retrain
python batch_job_submit.py --job_type train --dataset cifar100 --method orig --model VGG --mode wBN --seed -1 --unlearn_method RW
python batch_job_submit.py --job_type train --dataset cifar100 --method orig --model VGG --mode wBN --seed -1 --unlearn_method retrain

python batch_job_submit.py --job_type train --dataset mnist --method orig --model ResNet18 --mode wBN --seed -1 --unlearn_method RW
python batch_job_submit.py --job_type train --dataset mnist --method orig --model ResNet18 --mode wBN --seed -1 --unlearn_method retrain
python batch_job_submit.py --job_type train --dataset mnist --method orig --model VGG --mode wBN --seed -1 --unlearn_method RW
python batch_job_submit.py --job_type train --dataset mnist --method orig --model VGG --mode wBN --seed -1 --unlearn_method retrain

python batch_job_submit.py --job_type train --dataset imagenet --method orig --model ResNet18 --mode wBN --seed -1 --unlearn_method RW
python batch_job_submit.py --job_type train --dataset imagenet --method orig --model ResNet18 --mode wBN --seed -1 --unlearn_method retrain
python batch_job_submit.py --job_type train --dataset imagenet --method orig --model VGG --mode wBN --seed -1 --unlearn_method RW
python batch_job_submit.py --job_type train --dataset imagenet --method orig --model VGG --mode wBN --seed -1 --unlearn_method retrain

python batch_job_submit.py --job_type train --dataset imagenet --method orig --model ResNet18 --lr 0.1 --mode wBN --seed -1
python batch_job_submit.py --job_type train --dataset imagenet --method orig --model VGG --lr 0.1 --mode wBN --seed -1


3. Training the retrained models:

## mnist
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/mnist_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW_FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --lr 0.01 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/mnist_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW_FT_par

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/mnist_unnorm_layers/VGG_vanilla_orig_wBN_1  --unlearn_method RW
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/mnist_unnorm_original/VGG_vanilla_orig_wBN_1  --unlearn_method RW_FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/mnist_unnorm_original/VGG_vanilla_orig_wBN_1  --unlearn_method RW_FT_par

## cifar10

# retrain
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.01 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method retrain
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method retrain 

#RW
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --model VGG --lr 0.001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method RW 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_layers/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW_FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW_FT_par

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_layers/VGG_vanilla_orig_wBN_1  --unlearn_method RW 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_original/VGG_vanilla_orig_wBN_1  --unlearn_method RW_FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_original/VGG_vanilla_orig_wBN_1  --unlearn_method RW_FT_par

## cifar100

# retrain
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar100 --lr 5e-4 --epoch 201 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method retrain 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar100 --lr 0.1 --epoch 201 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method retrain 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar100 --lr 0.1 --epoch 201 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method retrain 

# RW
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/RW/scratch/cifar100_unnorm_layers/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/RW/scratch/cifar100_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW_FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/RW/scratch/cifar100_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW_FT_par

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/RW/scratch/cifar100_unnorm_layers/VGG_vanilla_orig_wBN_1  --unlearn_method RW 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/RW/scratch/cifar100_unnorm_original/VGG_vanilla_orig_wBN_1  --unlearn_method RW_FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.0001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/RW/scratch/cifar100_unnorm_original/VGG_vanilla_orig_wBN_1  --unlearn_method RW_FT_par

## imagenet
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset imagenet --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/imagenet_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/imagenet_unnorm_layers/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset imagenet --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/imagenet_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/imagenet_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW_FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset imagenet --lr 0.0001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/imagenet_label_1.csv --model_path ./class_unlearn/logs/RW/scratch/imagenet_unnorm_original/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW_FT_par

# RW
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar100 --lr 0.001 --epoch 21 --unlearn_indices ./class_unlearn/class_indices/imagenet_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/imagenet_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method RW 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar100 --lr 1e-3 --epoch 11 --unlearn_indices ./class_unlearn/class_indices/imagenet_label_10.csv --model_path ./class_unlearn/logs/correct/scratch/imagenet_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW 



## test

# RW
python apply_unlearn_clean.py --method orig --mode wBN --seed 1 --convsn 1.0 --model ResNet18 --lr 0.001 --dataset cifar10 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --source_model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_layers/ResNet18_vanilla_orig_wBN_1 --unlearn_method RW --LRsteps 40 --norm_cond unnorm --epochs 10 --remain use --salun_ratio 0.5
python apply_unlearn_clean.py --method orig --mode wBN --seed 1 --convsn 1.0 --model ResNet18 --lr 0.001 --dataset cifar10 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --source_model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method retrain --LRsteps 40 --norm_cond unnorm --epochs 10 --remain use --salun_ratio 0.5

python apply_unlearn.py --method orig --mode wBN --seed 1 --convsn 1.0 --model ResNet18 --lr 0.0001 --dataset imagenet --unlearn_indices ./class_unlearn/class_indices/imagenet_label_10.csv --source_model_path ./class_unlearn/logs/correct/scratch/imagenet_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method RW --LRsteps 40 --norm_cond unnorm --epochs 10 --remain use --salun_ratio 0.5

python apply_unlearn.py --method orig --mode wBN --seed 1 --convsn 1.0 --model ResNet18 --lr 0.001 --dataset cifar100 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method RW --LRsteps 40 --norm_cond unnorm --epochs 10 --remain use --salun_ratio 0.5

python apply_unlearn.py --method orig --mode wBN --seed 1 --convsn 1.0 --model ResNet18 --lr 0.0001 --dataset mnist --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --source_model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method GA --LRsteps 40 --norm_cond unnorm --epochs 3 --remain use --salun_ratio 0.5

python train_vanilla.py --method orig --mode wBN --seed 1 --convsn 1.0 --arch ResNet18 --lr 0.1 --dataset imagenet

python apply_unlearn.py --method orig --mode wBN --seed 1 --convsn 1.0 --model ResNet18 --lr 0.1 --dataset imagenet --unlearn_indices ./class_unlearn/class_indices/imagenet_label_10.csv --source_model_path ./class_unlearn/logs/correct/scratch/imagenet_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method GA --LRsteps 40 --norm_cond unnorm --epochs 20 --remain use --salun_ratio 0.5
python apply_unlearn.py --method orig --mode wBN --seed 1 --convsn 1.0 --model ResNet18 --lr 0.1 --dataset imagenet --unlearn_indices ./class_unlearn/class_indices/imagenet_label_10.csv --source_model_path ./class_unlearn/logs/correct/scratch/imagenet_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method salun --LRsteps 40 --norm_cond unnorm --epochs 20 --remain use --salun_ratio 0.5

4. Running the unlearning methods and baselines with different hyper-parameters:

python hyperparam_tune.py

5. Ulira

python batch_job_submit.py --job_type ulira --method orig --mode wBN --seed -1 --dataset cifar10 --lr 0.0001 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW 
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.001 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --source_model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_layers/ResNet18_vanilla_orig_wBN_1 --unlearn_method RW 
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.001 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --source_model_path ./class_unlearn/logs/RW/scratch/cifar10_unnorm_original/ResNet18_vanilla_orig_wBN_1 --unlearn_method RW_FT 

python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.001 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method RW 
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.001 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_96.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method RW 

python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.1 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method FT
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.1 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method RL
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.01 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method salun

python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.01 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method l1
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.1 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method BS
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.01 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method salun
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.1 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method FT
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.001 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method GA
python apply_ulira.py --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.1 --epoch 15 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --source_model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1 --unlearn_method RL