Kanra team (Zihao Wang, Zhengwei Fang)
Top1 winner of the AAAI2022 Security AI Challenger VIII.
Current machine learning competitions mostly seek for a high-performance model given a fixed dataset, while recent Data-Centric AI Competition (https://https-deeplearning-ai.github.io/data-centric-comp/) changes the traditional format and aims to improve a dataset given a fixed model. Similarly, in the aspect of robust learning, many defensive methods have been proposed of deep learning models for mitigating the potential threat of adversarial examples, but most of them strive for a high-performance model in fixed constraints and datasets. Thus how to construct a dataset that is universal and effective for the training of robust models has not been extensively explored.
-
Create conda virtual environment.
conda create -n stage2 python=3.7 -y conda activate stage2
-
Install PyTorch and torchvision.
conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cudatoolkit=10.2 -c pytorch
-
Install imagecorruptions.
pip install imagecorruptions
-
Install auto-attack.
pip install git+https://github.com/fra31/auto-attack
-
Install robustbench.
pip install git+https://github.com/RobustBench/[email protected]
python gen_cor.py
-
Download the teacher model:
python download_ckpt.py
-
Generate AEs against the teacher model:
python gen_adv.py
There are several parameters that need to be modified before running the code, which is included in the "PARAMETER" section of the script.
python merge.py