This is the official implementation of our paper Semi-supervised Robust Training with Generalized Perturbed Neighborhood, accepted by Pattern Recognition. This project is developed based on Python 3.6, created by Yiming Li and Yan Feng.
All code for this part are included in "pixel_exps" subfolder. Please change to that folder before running the code.
pip install -r requirements.txt
- Train WideResNet-34-10 model on CIFAR-10 dataset
bash cifar_train.sh
- Train SmallCNN model on MNIST dataset
bash mnist_train.sh
- Evaluate robust WideResNet-34-10 model on CIFAR-10 by PGD attack
python cifar_eval.py
- Evaluate robust SmallCNN model on MNIST by PGD attack
python mnist_eval.py
Download the folder "checkpoints" [download link] and put it within the "pixel_exps" folder, then you can conduct the robustness evaluation without training.
pip install -r requirements.txt
- Train ResNet model on CIFAR-10 dataset
bash CIFAR_train.sh
- Train SmallCNN model on MNIST dataset
bash MNIST_train.sh
- Evaluate robust ResNet model on CIFAR-10 by GridAdv attack
bash CIFAR_eval.sh
- Evaluate robust SmallCNN model on MNIST by GridAdv attack
bash MNIST_eval.sh
Download the "checkpoints" [download link] and put it within the "spatial_exps" folder, then you can conduct the robustness evaluation without training.
If our work or this repo is useful for your research, please cite our paper as follows:
@article{li2022semi,
title={Semi-supervised robust training with generalized perturbed neighborhood},
author={Li, Yiming and Wu, Baoyuan and Feng, Yan and Fan, Yanbo and Jiang, Yong and Li, Zhifeng and Xia, Shu-Tao},
journal={Pattern Recognition},
volume={124},
pages={108472},
year={2022},
publisher={Elsevier}
}