Giter VIP home page Giter VIP logo

s2m-tea's Introduction

S2M-TEA

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.

Environment

Pytorch 2.0.1, torchvision 0.15.2, kornia, skopt (scikit-optimize).

Preparation

Please download model weights and the SAMPLE synthetic-measured data pairs, and arrange them to './models/' and './dataset/' respectively.

Synthetic-to-Measured Transfer (S2M) evaluation

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

Perform a local Transferability Estimation Attack (TEA)

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

Citation

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}}

Acknowledgements

This repository benefits a lot from the works listed below:

Harry24k/adversarial-attacks-pytorch
ZhengyuZhao/TransferAttackEval
benjaminlewis-afrl/SAMPLE_dataset_public
YonghaoXu/UAE-RS

s2m-tea's People

Contributors

scenarri avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.