A PyTorch implementation for Adversarial Distributional Training for Robust Deep Learning (NeurIPS 2020)
- Python (3.6.8)
- Pytorch (1.3.0)
- torchvision (0.4.1)
- numpy
We have proposed three different methods for ADT. The command for each training method is specified below.
python adt_exp.py --model-dir adt-exp
python adt_expam.py --model-dir adt-expam
python adt_impam.py --model-dir adt-impam
python evaluate_attacks.py --model-path ${MODEL-PATH} --attack-method PGD (or FGSM/MIM/CW)
First change the --white-box-attack
argument in evaluate_attacks.py
to False
. Then run
python evaluate_attacks.py --source-model-path ${SOURCE-MODEL-PATH} --target-model-path ${TARGET-MODEL-PATH} --attack-method PGD (or FGSM/MIM/CW)
python spsa.py --model-path ${MODEL-PATH}
If you have any problem about this library or want to contribute to it, please send us an Email at:
Please cite our paper if you use this code in your own work:
@article{deng2020adversarial,
title={Adversarial Distributional Training for Robust Deep Learning},
author={Deng, Zhijie and Dong, Yinpeng and Pang, Tianyu and Su, Hang and Zhu, Jun},
journal={arXiv preprint arXiv:2002.05999},
year={2020}
}