Skip to content

Trustworthy-AI-Group/DHF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diversifying the High-level Features

This repository contains code implementing the idea of the paper:

Diversifying the High-level Features for better Adversarial Transferability (BMVC 2023)

Zhiyuan Wang, Zeliang Zhang, Siyuan Liang, Xiaosen Wang

abstract

We also include the torch version code in the framework TransferAttack.

Requirements

  • Python >= 3.7
  • Tensorflow = 1.14.0
  • NumPy >= 1.21.6
  • SciPy >= 1.1.0
  • Pandas >= 1.0.1
  • imageio >= 2.9.0

Qucik Start

Prepare the data and models

Firstly, you should prepare your own benign images and the corresponding labels. The path for the input images and labels are set by --input_dir. You can download the data here.

Next, you should prepare some pretrained models and place them in directory ./models. Some pretrained models can be downloaded here and here.

Runing attack

You could run DHF as follows:

python mi_fgsm.py --input_dir ./dev_data --method dhf --arch res_101

The generated adversarial examples would be stored in directory ./results and the attack success rates will be reported.

Citation

If you find the idea or code useful for your research, please consider citing our paper:

@inproceedings{wang2023diversifying,
     title={{Diversifying the High-level Features for better Adversarial Transferability}},
     author={Zhiyuan Wang and Zeliang Zhang and Siyuan Liang and Xiaosen Wang},
     booktitle={Proceedings of the British Machine Vision Conference},
     year={2023},
}

About

[BMVC 2023] Diversifying the High-level Features for better Adversarial Transferability

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages