This repository contains the official code to reproduce the main results from the NeurIPS 2023 paper titled Adversarial Examples Are Not Real Features by Ang Li, [Yifei Wang](https://yifeiwang77.com), Yisen Wang.
In this paper, we generalize the definition of feature usefulness and robustness to multiple paradigms. This repository thus contains the code of four paradigms considered in the paper, CL (Contrastive Learning), DM (Diffusion Model), MIM (Masked Image Modeling), and SL (Supervised Learning), as subfolders.
pip install -r requirements.txt
The whole evaluation pipeline used in our paper is defined in run.sh
After building the environment, running the evaluation
sh run.sh
To use the pre-generated datasets
To generate the robust/non-robust datasets
SL
MIM
CL
DM
Transfer
Robust
pip install torchattacks
pip install -e ./Robust/attack/auto-attack
ArXsiv Version:
@article{li2023adversarial,
title={Adversarial examples are not real features},
author={Li, Ang and Wang, Yifei and Guo, Yiwen and Wang, Yisen},
journal={arXiv preprint arXiv:2310.18936},
year={2023}
}
Conference Version:
@inproceedings{li2023advnotrealfeatures,
title={Adversarial Examples Are Not Real Features},
author={Li, Ang and Wang, Yifei and Guo, Yiwen and Wang, Yisen},
booktitle={NeurIPS},
year={2023}
}
This repo is partially based upon the following repos and we sincerely appreciate their excellent works!