Zihan Chen#(chenzihan21@nudt.edu.cn), Ziyue Wang#, Jun-Jie Huang* (jjhuang@nudt.edu.cn), Wentao Zhao, Xiao Liu, and Dejian Guan (#equal contribution, *corresponding author)
Pytorch implementation for "Imperceptible Adversarial Attack via Invertible Neural Networks" (AAAI'2023).
Adding perturbations via utilizing auxiliary gradient information or discarding existing details of the benign images are two common approaches for generating adversarial examples. Though visual imperceptibility is the desired property of adversarial examples, conventional adversarial attacks still generate traceable adversarial perturbations. In this paper, we introduce a novel Adversarial Attack via Invertible Neural Networks (AdvINN) method to produce robust and imperceptible adversarial examples. Specifically, AdvINN fully takes advantage of the information preservation property of Invertible Neural Networks and thereby generates adversarial examples by simultaneously adding class-specific semantic information of the target class and dropping discriminant information of the original class. Extensive experiments on CIFAR-10, CIFAR-100, and ImageNet-1K demonstrate that the proposed AdvINN method can produce less imperceptible adversarial images than the state-of-the-art methods and AdvINN yields more robust adversarial examples with high confidence compared to other adversarial attacks.
- PyTorch>=1.0
- Python>=3.7
- NVIDIA GPU + CUDA CuDNN
Download and unzip our dataset which is randomly selected from ImageNet-1K, and then copy their path to args/inputpath
. You are also freely to run AdvINN on your dataset.
You can run train.py
directly.
train.py
: Execute this file to train the modelargs.py
: Image and model parameters settingconfig.py
: Hyperparameters settingmodel/
: Architecture of Invertible Neural Networksmodules/
: Architecture of ACBspretrained/
: Pre-trained model parameters
If you find this code and data useful, please consider citing the original work by authors:
@inproceedings{Chen2023AdvINN,
title={Imperceptible Adversarial Attack via Invertible Neural Networks},
author={Chen, Zihan and Wang, Ziyue and Huang, Jun-jie and Zhao, Wentao and Liu, Xiao and Guan, Dejian},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={37},
number={1},
pages={414--424},
year={2023}
}