Pytorch codes for Open-set Adversarial Defense with Clean-Adversarial Mutual Learning (pdf) in IJCV 2022.
As extension of Open-set Adversarial Defense (pdf) in ECCV 2020, this paper proposes an Open-Set Defense Network with Clean-Adversarial Mutual Learning (OSDN-CAML) as a solution to the OSAD problem. The proposed network designs an encoder with dual-attentive feature-denoising layers coupled with a classifier to learn a noise-free latent feature representation. A decoder is incorporated to ensure that clean images can be well reconstructed from the obtained latent features. Then, self-supervision is used to ensure that the latent features are informative enough to carry out an auxiliary task. Finally, to exploit more complementary knowledge from clean image classification to facilitate feature denoising and search for a more generalized local minimum for open-set recognition, we further propose clean-adversarial mutual learning, where a peer network (classifying clean images) is further introduced to mutually learn with the classifier (classifying adversarial images).
Network structure of OSDN-CAML consists of five components: encoder, decoder, open-set classifier, transformation classifier and peer learner.
-
Prerequisites: Python3.6, pytorch=1.2, Numpy, libmr
-
The source code folders:
- "models": Contains the network architectures of proposed OSDN-CAML.
- "advertorch": Contains adversarial attacks such as FGSM and PGD. Thanks the codes from: https://github.com/BorealisAI/advertorch
- "OpensetMethods": Contains the open-max function. Thanks the codes from: https://github.com/lwneal/counterfactual-open-set
- "datasets": Contains datasets
- "misc": Contains initialization and some preprocessing functions
To run the train file: python train.py
To run the test file: python test.py
It will generate .txt file that contains the score for close-set accuracy and AUROC.
Please kindly cite this paper in your publications if it helps your research:
@article{shao2022open,
title={Open-set Adversarial Defense with Clean-Adversarial Mutual Learning},
author={Shao, Rui and Perera, Pramuditha and Yuen, Pong C and Patel, Vishal M},
journal={International Journal of Computer Vision},
pages={1--18},
year={2022},
publisher={Springer}
}
@inproceedings{shao2020open,
title={Open-set adversarial defense},
author={Shao, Rui and Perera, Pramuditha and Yuen, Pong C and Patel, Vishal M},
booktitle={European Conference on Computer Vision},
pages={682--698},
year={2020},
organization={Springer}
}
Contact: rshaojimmy@gmail.com