All Projects → ysharma1126 → EAD_Attack

ysharma1126 / EAD_Attack

Licence: other
EAD: Elastic-Net Attacks to Deep Neural Networks via Adversarial Examples

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to EAD Attack

FeatureScatter
Feature Scattering Adversarial Training
Stars: ✭ 64 (+88.24%)
Mutual labels:  defense, adversarial-machine-learning
jpeg-defense
SHIELD: Fast, Practical Defense and Vaccination for Deep Learning using JPEG Compression
Stars: ✭ 82 (+141.18%)
Mutual labels:  defense, adversarial-machine-learning
adapt
Awesome Domain Adaptation Python Toolbox
Stars: ✭ 46 (+35.29%)
Mutual labels:  adversarial-networks
Electra
中文 预训练 ELECTRA 模型: 基于对抗学习 pretrain Chinese Model
Stars: ✭ 132 (+288.24%)
Mutual labels:  adversarial-networks
Robust Adv Malware Detection
Code repository for the paper "Adversarial Deep Learning for Robust Detection of Binary Encoded Malware"
Stars: ✭ 63 (+85.29%)
Mutual labels:  adversarial-networks
Attentiongan
AttentionGAN for Unpaired Image-to-Image Translation & Multi-Domain Image-to-Image Translation
Stars: ✭ 341 (+902.94%)
Mutual labels:  adversarial-networks
Inverse rl
Adversarial Imitation Via Variational Inverse Reinforcement Learning
Stars: ✭ 79 (+132.35%)
Mutual labels:  adversarial-networks
PerceptualGAN
Pytorch implementation of Image Manipulation with Perceptual Discriminators paper
Stars: ✭ 119 (+250%)
Mutual labels:  adversarial-networks
Adversarial Autoencoders
Tensorflow implementation of Adversarial Autoencoders
Stars: ✭ 215 (+532.35%)
Mutual labels:  adversarial-networks
Delving Deep Into Gans
Generative Adversarial Networks (GANs) resources sorted by citations
Stars: ✭ 834 (+2352.94%)
Mutual labels:  adversarial-networks
Chromagan
Official Implementation of ChromaGAN: An Adversarial Approach for Picture Colorization
Stars: ✭ 117 (+244.12%)
Mutual labels:  adversarial-networks
Adversarialnetspapers
Awesome paper list with code about generative adversarial nets
Stars: ✭ 6,219 (+18191.18%)
Mutual labels:  adversarial-networks
Adversarial Frcnn
A-Fast-RCNN (CVPR 2017)
Stars: ✭ 461 (+1255.88%)
Mutual labels:  adversarial-networks
Torchadver
A PyTorch Toolbox for creating adversarial examples that fool neural networks.
Stars: ✭ 88 (+158.82%)
Mutual labels:  adversarial-networks
Adversarial Examples Pytorch
Implementation of Papers on Adversarial Examples
Stars: ✭ 293 (+761.76%)
Mutual labels:  adversarial-networks
Show Adapt And Tell
Code for "Show, Adapt and Tell: Adversarial Training of Cross-domain Image Captioner" in ICCV 2017
Stars: ✭ 146 (+329.41%)
Mutual labels:  adversarial-networks
Satellite-Image-Forgery-Detection-and-Localization
No description or website provided.
Stars: ✭ 17 (-50%)
Mutual labels:  adversarial-networks
Adversarial video generation
A TensorFlow Implementation of "Deep Multi-Scale Video Prediction Beyond Mean Square Error" by Mathieu, Couprie & LeCun.
Stars: ✭ 662 (+1847.06%)
Mutual labels:  adversarial-networks
Man
Multinomial Adversarial Networks for Multi-Domain Text Classification (NAACL 2018)
Stars: ✭ 72 (+111.76%)
Mutual labels:  adversarial-networks
alldaydevops-aism
All Day DevOps - Automated Infrastructure Security Monitoring and Defence (ELK + AWS Lambda)
Stars: ✭ 21 (-38.24%)
Mutual labels:  defense

As requested by IBM, this repository is moved to https://github.com/IBM/EAD-Attack, but we aim to keep both repositories synced up. The code is released under Apache License v2.

EAD: Elastic-Net Attacks to Deep Neural Networks

EAD is a elastic-net attack to deep neural networks (DNNs).
We propose formulating the attack process as a elastic-net regularized optimization problem, featuring an attack which produces L1-oriented adversarial examples which includes the state-of-the-art L2 attack (C&W) as a special case.

Experimental results on MNIST, CIFAR-10, and ImageNet show that EAD yields a distinct set of adversarial examples and attains similar attack performance to state-of-the-art methods in different attack scenarios. More importantly, EAD leads to improved attack transferability and complements adversarial training for DNNs, suggesting novel insights on leveraging L1 distortion in generating robust adversarial examples.

For more details, please see our paper:

EAD: Elastic-Net Attacks to Deep Neural Networks via Adversarial Examples by Yash Sharma*, Pin-Yu Chen*, Huan Zhang, Jinfeng Yi, Cho-Jui Hsieh (AAAI 2018)

* Equal contribution

The attack has also been used in the following works (incomplete):

Attacking the Madry Defense Model with L1-based Adversarial Examples by Yash Sharma, Pin-Yu Chen (ICLR 2018 Workshop)

On the Limitation of Local Intrinsic Dimensionality for Characterizing the Subspaces of Adversarial Examples by Pei-Hsuan Lu, Pin-Yu Chen, Chia-Mu Yu (ICLR 2018 Workshop)

Bypassing Feature Squeezing by Increasing Adversary Strength by Yash Sharma, Pin-Yu Chen

On the Limitation of MagNet Defense against L1-based Adversarial Examples by Pei-Hsuan Lu, Pin-Yu Chen, Kang-Cheng Chen, Chia-Mu Yu (IEEE/IFIP DSN 2018 Workshop)

The algorithm has also been repurposed for generating constrastive explanations in:

Explanations based on the Missing: Towards Contrastive Explanations with Pertinent Negatives by Amit Dhurandhar, Pin-Yu Chen, Ronny Luss, Chun-Chen Tu, Paishun Ting, Karthikeyan Shanmugam and Payel Das (NIPS 2018)

The experiment code is based on Carlini and Wagner's L2 attack.
The attack can also be found in the Cleverhans Repository.

Setup and train models

The code is tested with python3 and TensorFlow v1.2 and v1.3. The following packages are required:

sudo apt-get install python3-pip
sudo pip3 install --upgrade pip
sudo pip3 install pillow scipy numpy tensorflow-gpu keras h5py

Prepare the MNIST and CIFAR-10 data and models for attack:

python3 train_models.py

To download the inception model (inception_v3_2016_08_28.tar.gz):

python3 setup_inception.py

To prepare the ImageNet dataset, download and unzip the following archive:

ImageNet Test Set

and put the imgs folder in ../imagesnetdata. This path can be changed in setup_inception.py.

Train defensively distilled models

Train defensively distilled MNIST and CIFAR-10 models with temperature varying from 1 to 100:

python3 train_models.py -dd

Train defensively distilled MNIST and CIFAR-10 models under specified temperatures:

python3 train_models.py -dd -t 1 10 100

Run attacks

A unified attack interface, test_attack.py is provided. Run python3 test_attack.py -h to get a list of arguments and help. Note the default values provided as well.

To generate best-case, average-case, and worst-case statistics, add "-tg 9" to command.

For computational efficiency, maximize the batch size and fix the 'initial_constant' to a large value, setting the number of binary search steps to 1.

The following are some examples of attacks:

Run the L1-oriented attack on the Inception model with 100 ImageNet images

python3 test_attack.py -a L1 -d imagenet -n 100

Run the EN-oriented attack on the defensively distilled (T=100) CIFAR model with 1000 images

python3 test_attack.py -d cifar -tp 100

Save original and adversarial images in the saves directory

python3 test_attack.py -sh

Generate adversarial images on undefended MNIST model with confidence (50), attack defensively distilled (T=100) MNIST model

python3 test_attack.py -cf 50 -tm dd_100

Adversarial Training

Adversarially train MNIST models by augmenting the training set with L2, EAD(L1), EAD(EN), L2+EAD(L1), and L2+EAD(EN)-based examples, respectively. This will use the provided numpy save files in the train directory.

python3 train_models.py -d mnist -a

Generate and save your own training set examples for use in adversarial training (ex - L1-oriented attack)

python3 test_attack.py -a L1 -sn -tr

Now, attack an adversarially trained model (ex - L1-trained network)

python3 test_attack.py -adv l1
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].