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
python batch_job_submit.py --job_type train --dataset cifar10 --method orig --model VGG --mode wBN --seed -1

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

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

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

2. Generating the Salun masks to be used when unlearning using Salun:

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path /projects/bcxt/class_unlearn/logs/correct/scratch/cifar_unnorm/vanilla_orig_wBN_1  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 10 --dataset cifar10 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_10  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 100 --dataset cifar10 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_100  --unlearn_method genmask

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 10 --dataset cifar10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/VGG_vanilla_orig_wBN_10  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 100 --dataset cifar10 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/VGG_vanilla_orig_wBN_100  --unlearn_method genmask

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 10 --dataset mnist --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_10  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 100 --dataset mnist --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_100  --unlearn_method genmask

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/vgg_vanilla_orig_wBN_1  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 10 --dataset mnist --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/VGG_vanilla_orig_wBN_10  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 100 --dataset mnist --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/VGG_vanilla_orig_wBN_100  --unlearn_method genmask

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/cifar100_label_4.csv --model_path /projects/bcxt/class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 10 --dataset cifar100 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_10  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 100 --dataset cifar100 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_10.csv --model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_100  --unlearn_method genmask

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --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 genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 10 --dataset cifar100 --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_10  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 100 --dataset cifar100 --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_100  --unlearn_method genmask

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset imagenet --unlearn_indices ./class_unlearn/class_indices/imagenet_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/imagenet_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 10 --dataset imagenet --unlearn_indices ./class_unlearn/class_indices/imagenet_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/imagenet_unnorm/ResNet18_vanilla_orig_wBN_10  --unlearn_method genmask
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 100 --dataset imagenet --unlearn_indices ./class_unlearn/class_indices/imagenet_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/imagenet_unnorm/ResNet18_vanilla_orig_wBN_100  --unlearn_method genmask

if there are multiple models, the above command has to be run for every seed manually. For example, the above command is for only seed=1. if we want to run it for seed=10, we should run:

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar --unlearn_indices ./class_unlearn/class_indices/cifar_label_1.csv --model_path /scratch/bcwm/aebrahimpour/class_unlearn/logs/correct/scratch/cifar_unnorm/vanilla_orig_wBN_10  --unlearn_method genmask


3. Training the retrained models:

## cifar10

# retrain
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar10 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/cifar_label_1.csv --model_path /projects/bcxt/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 /projects/bcxt/class_unlearn/logs/correct/scratch/cifar10_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method retrain 

# FT
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.1 --epoch 11 --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 FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --model VGG --epoch 20 --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 FT

# GA
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.001 --epoch 11 --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 GA
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.001 --epoch 20 --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 GA

# RL
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.1 --epoch 11 --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 RL
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --lr 0.1 --model VGG --epoch 20 --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 RL

# BS
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --epoch 11 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method BS 

# l1
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar10 --epoch 11 --lr 0.0001 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/cifar10_label_1.csv --model_path /projects/bcxt/class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method l1 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --epoch 11 --lr 0.0001 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method l1 

# salun
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar10 --epoch 11 --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method salun 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar10 --epoch 21 --model VGG --unlearn_indices ./class_unlearn/class_indices/cifar10_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar10_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method salun 

#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 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 

## mnist

# retrain 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --lr 0.01 --epoch 2 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/mnist_label_8.csv --model_path /projects/bcxt/class_unlearn/logs/RW/scratch/mnist_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 mnist --lr 0.01 --epoch 30 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method retrain 

# 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/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset mnist --lr 0.01 --epoch 30 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/vgg_vanilla_orig_wBN_1  --unlearn_method FT 

# RL
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/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method RL 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset mnist --lr 0.01 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/vgg_vanilla_orig_wBN_1  --unlearn_method RL 

# GA
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --remain no --dataset mnist --lr 0.01 --epoch 20 --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method GA 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset mnist --lr 0.01 --epoch 20 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/vgg_vanilla_orig_wBN_1  --unlearn_method GA 

# l1
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --lr 0.1 --epoch 20 --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method l1
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset mnist --lr 0.0001 --model VGG --epoch 20 --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/vgg_vanilla_orig_wBN_1  --unlearn_method l1

# BS
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset mnist --lr 0.1 --epoch 10 --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method BS

# salun
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset mnist --epoch 11 --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method salun 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset mnist --epoch 11 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/vgg_vanilla_orig_wBN_1  --unlearn_method salun 

# RW
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset mnist --lr 0.0001 --epoch 20 --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/ResNet18_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.001 --epoch 10 --model VGG --unlearn_indices ./class_unlearn/class_indices/mnist_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/mnist_unnorm/VGG_vanilla_orig_wBN_1  --unlearn_method RW 

## 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 

# FT
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.1 --epoch 11 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/cifar100_label_4.csv --model_path /projects/bcxt/class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method FT 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar100 --lr 0.1 --epoch 51 --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 FT 

# RL
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.1 --epoch 11 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/cifar100_label_4.csv --model_path /projects/bcxt/class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method RL 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar100 --lr 0.1 --epoch 51 --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 RL 

# GA
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --remain no --dataset cifar100 --lr 0.01 --epoch 20 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/cifar100_label_4.csv --model_path /projects/bcxt/class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method GA 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --remain no --dataset cifar100 --lr 0.01 --epoch 20 --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 GA 

# l1
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.1 --epoch 21 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/cifar100_label_4.csv --model_path /projects/bcxt/class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method l1 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.1 --epoch 21 --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 l1 

# salun
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --lr 0.1 --epoch 20 --unlearn_indices /projects/bcxt/class_unlearn/class_indices/cifar100_label_4.csv --model_path /projects/bcxt/class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method salun 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset cifar100 --epoch 20 --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 salun 

# RW
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset cifar100 --model VGG --lr 0.001 --epoch 21 --unlearn_indices ./class_unlearn/class_indices/cifar100_label_1.csv --model_path ./class_unlearn/logs/correct/scratch/cifar100_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/cifar100_label_96.csv --model_path ./class_unlearn/logs/correct/scratch/cifar100_unnorm/ResNet18_vanilla_orig_wBN_1  --unlearn_method RW 

## imagenet
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset imagenet --lr 0.1 --epoch 51 --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 retrain 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset imagenet --lr 0.1 --epoch 51 --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 FT 

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed -1 --dataset imagenet --lr 0.1 --epoch 31 --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 RL 

python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset imagenet --lr 0.001 --epoch 31 --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 GA 

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 
python batch_job_submit.py --job_type unlearn --method orig --mode wBN --seed 1 --dataset imagenet --lr 0.1 --epoch 21 --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 salun 



## test
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.0001 --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 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_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