This is the Pytorch implementation for "Towards Assessing the Synthetic-to-Measured Adversarial Vulnerability of SAR ATR", accepted by ISPRS Journal of Photogrammetry and Remote Sensing.
Pytorch 2.0.1, torchvision 0.15.2, kornia, skopt (scikit-optimize).
Please download model weights and the SAMPLE synthetic-measured data pairs, and arrange them to './models/' and './dataset/' respectively.
The released code supports PGD, MI, NI, VT, DI, TI, SVA, Mixup-Attack, and ResNet18, ResNet34, ConvNeXt. The results will differ slightly from those reported in the paper due to seed setting. The command below generates adversarial perturbations based on the PGD attack and ResNet18 (trained over the synthetic data), and it reports the attack success rates (ASRs) against the measured data-trained victim models.
python transfer_eval.py --surrogate RN18/RN34/CNX --attack PGD --batch_size 128
To reproduce the results in our paper, please use our finetuned models and trigger --AS using architecture hyper-parameters in the paper:
python transfer_eval.py --surrogate RN18_FT --AS
or input customized paras. with --beta and --decay if interested.
You can also load a surrogate by triggering --local and appointing the file name (in './FT_result/') with --surrogate, like
python transfer_eval.py --surrogate RN18_seed_12345.pth --local
This prints the architecture hyper-parameters and saves the finetuned weights at './FT_result/', and these two surrogates (FT and FT+AS) will be evaluated with --test being triggered:
python TEA.py --surrogate RN18 --sigmaFT 0.2 --sigmaAS 0.3 --lambda_ 1. --samples 5 --test
Here '--samples' is the number of Gaussian neighbors being sampled during loss calculation. A larger one leads to better stability and a smaller one favors lower memory usage.
Run architecture selection for a given surrogate (in './FT_result/'):
python TEA.py --name RN18_seed_12345.pth --test
If you find our paper and this repository useful, please consider citing our work.
@ARTICLE{pengs2mtea,
author={Bowen Peng and Bo Peng and Jingyuan Xia and Tianpeng Liu and Yongxiang Liu and Li Liu},
journal={ISPRS Journal of Photogrammetry and Remote Sensing},
title={Towards assessing the synthetic-to-measured adversarial vulnerability of SAR ATR},
volume = {214},
pages = {119-134},
year = {2024},
doi={https://doi.org/10.1016/j.isprsjprs.2024.06.004}}
This repository benefits a lot from the works listed below:
Harry24k/adversarial-attacks-pytorch
ZhengyuZhao/TransferAttackEval
benjaminlewis-afrl/SAMPLE_dataset_public
YonghaoXu/UAE-RS