Home

Awesome

Backdoor Attacks on Vision Transformers

Official Repository of <a href="https://arxiv.org/abs/2206.08477"> ''Backdoor Attacks on Vision Transformers''</a>.

transformer_teaser

Requirements

Dataset creation

We follow the same steps as <a href="https://github.com/UMBCvision/Hidden-Trigger-Backdoor-Attacks"> ''Hidden Trigger Backdoor Attacks''</a> for dataset preparations. We repeat the instructions here for convenience.

python create_imagenet_filelist.py cfg/dataset.cfg

Configuration file

Poison generation

python generate_poison_transformer.py cfg/singlesource_singletarget_1000class_finetune_deit_base/experiment_0001_base.cfg

Finetune

python finetune_transformer.py cfg/singlesource_singletarget_1000class_finetune_deit_base/experiment_0001_base.cfg

Test-time defense

python test_time_defense.py cfg/singlesource_singletarget_1000class_finetune_deit_base/experiment_0001_base.cfg

Data

License

This project is under the MIT license.

Citation

Please cite us using:

@article{subramanya2022backdoor,
  title={Backdoor Attacks on Vision Transformers},
  author={Subramanya, Akshayvarun and Saha, Aniruddha and Koohpayegani, Soroush Abbasi and Tejankar, Ajinkya and Pirsiavash, Hamed},
  journal={arXiv preprint arXiv:2206.08477},
  year={2022}
}