Home

Awesome

Introduction

This is an official release of the paper

Frequency-driven Imperceptible Adversarial Attack on Semantic Similarity, CVPR 2022

[Paper]

Overview

Abstract: Current adversarial attack research reveals the vulnerability of learning-based classifiers against carefully crafted perturbations. However, most existing attack methods have inherent limitations in cross-dataset generalization as they rely on a classification layer with a closed set of categories. Furthermore, the perturbations generated by these methods may appear in regions easily perceptible to the human visual system (HVS). To circumvent the former problem, we propose a novel algorithm that attacks semantic similarity on feature representations. In this way, we are able to fool classifiers without limiting attacks to a specific dataset. For imperceptibility, we introduce the low-frequency constraint to limit perturbations within high-frequency components, ensuring perceptual similarity between adversarial examples and originals. Extensive experiments on three datasets (CIFAR-10, CIFAR-100, and ImageNet-1K) and three public online platforms indicate that our attack can yield misleading and transferable adversarial examples across architectures and datasets. Additionally, visualization results and quantitative performance (in terms of four different metrics) show that the proposed algorithm generates more imperceptible perturbations than the state-of-the-art methods. Our code will be publicly available.

Requirements

Required Dataset

  1. The data structure of Cifar10, Cifar100, ImageNet or any other datasets look like below. Please modify the dataloader at SSAH-Adversarial-master/main.py/ accordingly for your dataset structure.
/dataset/
├── cifar10
│   │   ├── cifar-10-python.tar.gz
├── cifar-100-python
│   │   ├── cifar-100-python.tar.gz
├── ILSVRC2012
│   ├── val
│   │   ├── n02328150

Experiments

We provide six perceptural metrics to measure imperceptibility, including l_2, l_inf, FID, SSIM, CIEDE2000, and LF.

Your can add more metrics in

/utils/
├── eval_metric_utils.py

We trained a resnet20 model with 92.6% accuracy with CIFAR1010 and a resnet20 model with 69.63% accuracy with CIFAR100. If you want to have a test, you can download our pre-trained models with the Google Drivers. If you want to use our algorithm to attack your own trained model, you can always replace our models in the file checkpoints. If your want to calculate FID, you need to download pt_inception-2015-12-05-6726825d.pth in this Google Drive and put it in the file checkpoints.

(1)Attack the Models Trained on Cifar10

CUDA_VISIBLE_DEVICES=0,1 bash scripts/cifar/cifar10-r20.sh

(2)Attack the Models Trained on Cifar100

CUDA_VISIBLE_DEVICES=0,1 bash scripts/cifar/cifar100-r20.sh

(2)Attack the Models Trained on Imagenet_val

CUDA_VISIBLE_DEVICES=0,1 bash scripts/cifar/Imagenet_val-r50.sh

Examples

example

Here we offer some experiment results. You can get more results in our paper.

Results on CIFAR10

NameKnowledgeASR(%)L2LinfFIDSSIMLFPaper
BIMWhite Box100.00.850.0314.850.850.25ICLR2017
PGDWhite Box100.01.280.0327.860.790.34arxiv link
MIMWhite Box100.01.900.0326.00-0.48CVPR2018
AutoAttackWhite Box100.01.910.0334.93-0.61ICML2020
AdvDropWhite Box99.920.900.0716.34-0.34ICCV2021
C&WWhite Box100.00.390.068.230.980.11IEEE SSP2017
PerC-ALWhite Box98.290.860.189.580.970.15CVPR2020
SSAWhite Box99.960.290.025.730.990.07CVPR2022
SSAHWhite Box99.940.260.025.030.990.03CVPR2022

Results on CIFAR100

NameKnowledgeASR(%)L2LinfFIDSSIMLFPaper
BIMWhite Box99.990.850.0315.260.830.32ICLR2017
PGDWhite Box99.991.290.0327.740.770.42arxiv link
MIMWhite Box99.991.870.0326.04-0.65CVPR2018
AutoAttackWhite Box1001.910.0333.86-0.61ICML2020
AdvDropWhite Box99.930.800.0715.59-0.31ICCV2021
C&WWhite Box1000.520.0711.040.980.19IEEE SSP2017
PerC-ALWhite Box99.611.410.2112.830.960.37CVPR2020
SSAWhite Box99.900.480.039.680.990.17CVPR2022
SSAHWhite Box99.800.450.039.200.990.13CVPR2022

Results on ImageNet

NameKnowledgeASR(%)L2LinfFIDSSIMLFPaper
BIMWhite Box99.9826.850.0351.920.7311.18ICLR2017
PGDWhite Box99.9854.970.0345.510.7717.41arxiv link
MIMWhite Box99.9891.780.03101.88-39.42CVPR2018
AutoAttackWhite Box96.9771.620.0377.49-30.45ICML2020
AdvDropWhite Box99.7614.950.0611.28-5.67ICCV2021
C&WWhite Box99.271.510.0412.140.990.67IEEE SSP2017
PerC-ALWhite Box98.784.350.1211.560.991.59CVPR2020
SSAWhite Box98.562.340.014.631.001.05CVPR2022
SSAHWhite Box98.011.810.013.901.000.06CVPR2022

Citation

if the code or method help you in the research, please cite the following paper:

@inproceedings{luo2022frequency,
  title={Frequency-driven Imperceptible Adversarial Attack on Semantic Similarity},
  author={Luo, Cheng and Lin, Qinliang and Xie, Weicheng and Wu, Bizhu and Xie, Jinheng and Shen, Linlin},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={15315--15324},
  year={2022}
}