Generalist: Decoupling Natural and Robust Generalization
Official implementation for CVPR'23 paper "Generalist: Decoupling Natural and Robust Generalization"
Prerequisites
- Python (>=3.7)
- Pytorch (>=1.5)
- Torchvision
- CUDA
- Numpy
- AutoAttack
Training and Testing
- Train ResNet-18 on CIFAR10:
$ CUDA_VISIBLE_DEVICES={your GPU number} python3 main.py
- Train WRN-32-10 on CIFAR10
$ CUDA_VISIBLE_DEVICES={your GPU number} python3 main.py --arch 'WRN32'
Then, it will automatically run all the robustness evaluation in our paper, including NAT, PGD20/100, MIM, CW, APGDce, APGDdlr, APGDt, FABt, Square and AutoAttack.
Citation
If you are interested in our work, please consider citing the related paper:
@inproceedings{wang2023simple,
title={Generalist: Decoupling Natural and Robust Generalization},
author={Hongjun Wang and Yisen Wang},
booktitle={CVPR},
year={2023}
}
@inproceedings{wang2022selfensemble,
title={Self-ensemble Adversarial Training for Improved Robustness},
author={Hongjun Wang and Yisen Wang},
booktitle={ICLR},
year={2022}
}