SID
The code of our AAAI 2021 paper "Detecting Adversarial Examples from Sensitivity Inconsistency of Spatial-transform Domain"
Install / Use
/learn @JinyuTian/SIDREADME
Detecting Adversarial Examples from Sensitivity Inconsistency of Spatial-Transform Domain (Paper ID: 2700)
Preliminaries
- Pytorch
- pywt (pip install PyWavelets)
0. Train Dual model:
TrainDualModel.py
Pretrained primal and dual models for testing have been placed in the folder ''pre_trained''.
python TrainDualModel.py --dataset=cifar10 --net_type=resnet --lr=1e-6 --wd=0.005
1. Prepare correctly classified imags, the correspodning adversarial examples and natural noise examples:
ADV_Samples.py
The produced examples for testing have been placed in the Google drive https://drive.google.com/file/d/1AbYkSKaOb7RozZ2TJlD4bvkxrSus12JJ/view?usp=sharing.
python ADV_Samples.py --dataset=cifar10 --net_type=resnet --adv_type=BIM --adv_parameter=0.006
2. Train SID over datasource generated by ADV_Samples
KnownAttack.py
Four pretrained SID's have been placed in `./ExperimentRecord/KnownAttack/`.
python KnownAttack.py
3. Validate generalizability of SID's basded on detectors obtained by running KnownAttack.py
TransferAttack.py
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
