HyperAIHyperAI

Command Palette

Search for a command to run...

4 months ago

Adversarial Training for Free!

Ali Shafahi; Mahyar Najibi; Amin Ghiasi; Zheng Xu; John Dickerson; Christoph Studer; Larry S. Davis; Gavin Taylor; Tom Goldstein

Adversarial Training for Free!

Abstract

Adversarial training, in which a network is trained on adversarial examples, is one of the few defenses against adversarial attacks that withstands strong attacks. Unfortunately, the high cost of generating strong adversarial examples makes standard adversarial training impractical on large-scale problems like ImageNet. We present an algorithm that eliminates the overhead cost of generating adversarial examples by recycling the gradient information computed when updating model parameters. Our "free" adversarial training algorithm achieves comparable robustness to PGD adversarial training on the CIFAR-10 and CIFAR-100 datasets at negligible additional cost compared to natural training, and can be 7 to 30 times faster than other strong adversarial training methods. Using a single workstation with 4 P100 GPUs and 2 days of runtime, we can train a robust model for the large-scale ImageNet classification task that maintains 40% accuracy against PGD attacks. The code is available at https://github.com/ashafahi/free_adv_train.

Code Repositories

mahyarnajibi/FreeAdversarialTraining
Official
pytorch
Mentioned in GitHub
ashafahi/free_adv_train
Official
tf
Mentioned in GitHub
simon0987/Fast_FGSM
pytorch
Mentioned in GitHub
locuslab/fast_adversarial
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
adversarial-defense-on-imagenet-non-targetedResNet-152 free-m=4
Accuracy: 36.0%
adversarial-defense-on-imagenet-non-targetedResNet-101 free-m=4
Accuracy: 34.3%
adversarial-defense-on-imagenet-non-targetedResNet-50 free-m=4
Accuracy: 31.8%
domain-generalization-on-vizwizResNet-50 (adv-train-free)
Accuracy - All Images: 26.7
Accuracy - Clean Images: 30.9
Accuracy - Corrupted Images: 20.5

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp