This is the official repository of "Adversarial Parameter Attack on Deep Neural Networks" (ICML 2023).
This repository supports training adversarial parameter attacks of pretrained robust networks on CIFAR-10.
A pretrained ResNet-18 using PGD-AT is saved as 'logs/resnet18/pgd.pth'
.
If you want to train a network from scratch using PGD-AT or TRADES, run
python main.py \
--model-name resnet18 \
--log-path logs/resnet18 \
--train [pgd / trades] \
--device cuda
To apply
python main.py \
--pert-mode zero \
--model-name resnet18 \
--log-path logs/resnet18 \
--ckpt-path logs/resnet18/pgd.pth \
--dataset cifar10 \
--device cuda
To apply
python main.py \
--pert-mode inf \
--model-name resnet18 \
--log-path logs/resnet18 \
--ckpt-path logs/resnet18/pgd.pth \
--dataset cifar10 \
--device cuda
To apply attacks with a small training set in CIFAR-10, run:
python main.py \
--pert-mode [inf / zero] \
--dataset cifar10-small