The official Implementation of AIES25 - Representation Magnitude has a Liability to Privacy Vulnerability.
- Check the setting and conf files before using this repo
| Lib | Version |
|---|---|
| PyYAML | 6.0 |
| scikit-learn | 1.2.2 |
| tensorboardX | 2.6 |
| pandas | 2.0.1 |
| matplotlib | 3.7.1 |
You can use the cmd below to train a target model, shadow models and attack model:
python 'main.py' train $arch
--arch-conf $arch_conf \
--dataset $dataset --epoch-file $epoch_file \
--batch-size $batch_size \
--learn-method $learn_method \
--loss-conf $loss_conf \
--attack-method $attack_method --attack-arch $attack_arch --k $k \
--if-restore $if_restore --train-target $train_target --train-shadow $train_shadow \
--save-folder $path
An example is shown below:
python 'main.py' train resnet
--arch-conf resnet18 \
--dataset cifar100 --epoch-file cifar100_resnet \
--batch-size 256 \
--learn-method vanilla \
--loss-conf vanilla \
--attack-method vanilla --attack-arch linear --k 5 \
--if-restore no \
--save-folder "save_checkpoints/$loss_conf/$dataset/$arch_conf/${learn_method}_${attack_method}/$run/"
Datasets include CIFAR-10, CIFAR-100, and Purchase100.
When testing, you can write your own evaluation codes or use summary_acc_parameter.py
Some portion of codes are derived from:
@inproceedings{
}