PyTorch code for our submission: "Logit Margin Matters: Improving Transferable Targeted Adversarial Attack by Logit Calibration"
The code is implemented based on the Code of the paper "On Success and Simplicity: A Second Look at Transferable Targeted Attacks".
Zhengyu Zhao, Zhuoran Liu, Martha Larson. NeurIPS 2021.
torch>=1.7.0; torchvision>=0.8.1; tqdm>=4.31.1; pillow>=7.0.0; matplotlib>=3.2.2; numpy>=1.18.1;
The 1000 images from the NIPS 2017 ImageNet-Compatible dataset are provided in the folder dataset/images
, along with their metadata in dataset/images.csv
. More details about this dataset can be found in its official repository.
Following the setting in Zhao et al. NeurIPS 2021, all attacks are integrated with TI, MI, and DI, and run with 300 iterations to ensure convergence, and L∞=16.