Skip to content

Repository files navigation

Center-Based Relaxed Learning Against Membership Inference Attacks

LICENSE Python PyTorch SciKit-Learn

The official Implementation of Data-Free Distillation For Membership Privacy.

Tips

  1. 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

Running Experiments

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 crl \
  --loss-conf crl_resnet_c100_1 \
  --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 SVHN.

When testing, you can write your own evaluation codes or use summary_acc_parameter.py

Acknowledge

Some portion of codes are derived from:

Other References

citation

@inproceedings{
fang2024crl,
title={Center-Based Relaxed Learning Against Membership Inference Attacks},
author={Xingli Fang and Jung-Eun Kim},
booktitle={The 40th Conference on Uncertainty in Artificial Intelligence},
year={2024},
url={https://openreview.net/forum?id=unlWrunFjg}
}

About

This is an official implementation of Center-Based Relaxed Learning by Pytorch. The algorithm was proposed in 《Center-Based Relaxed Learning Against Membership Inference Attacks》 (UAI 2024).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages