GithubHelp home page GithubHelp logo

pod3275 / gp-based-adversarial-detection Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 908 KB

Gaussian process regression-based adversarial image detection

Python 100.00%
adversarial-images adversarial-attack adversarial-detection gaussian-process-regression

gp-based-adversarial-detection's Introduction

GP-based-Adversarial-Detection

Official Keras implementation of paper:

Adversarial Detection with Gaussian Process Regression-based Detector (TIIS).


Description


  • Adversarial example detection with Gaussian Process Regression-based detector.

  • Existing deep learning-based adversarial detection methods require numerous adversarial images for their training.

  • The proposed method overcomes this problem by performing classification based on the statistical features of adversarial images and clean images that are extracted by Gaussian process regression with a small number of images.


Requirements

pip install -r requirements.txt

How to run

1. Git clone

$ git clone https://github.com/pod3275/GP-based-Adversarial-Detection.git
$ cd GP-based-Adversarial-Detection

2. Training target model

$ python train_model.py --dataset MNIST

3. Generate adversarial examples

$ python attack.py --dataset MNIST --attack JSMA

4. Detect with GP-based detector

$ python gp_detector.py --dataset MNIST --attack DeepFool --num_data_in_class 30
  • num_data_in_class : number of adversarial example in one class for training detector

  • For FGSM and BIM, you should add epsilon at the end of the attack name (ex. CIFAR10: "--attack FGSM_e9")

    • Same as the name of directory where the adversarial data saved

Results

- Attack accuracy



- Detection accuracy



- Number of adversarial examples for detector training

  • Better performance with extremely small number of adversarial example.

Utils

1. Check adversarial image & model prediction results

$ python check_label.py --dataset CIFAR10 --attack DeepFool
  • Check clean and adversarial images (included in check_label.py)


  • Check clean and adversarial images' labels


2. Calculate L2 perturbations of adversarial examples

$ python l2_perturb.py --dataset CIFAR10 --attack BIM_e9


Citation

@proceedings{GP-basedAdvDetect,
	title = {Adversarial Detection with Gaussian Process Regression-based Detector},
	author = {Sangheon Lee, Noo-ri Kim, Youngwha Cho, Jae-Young Choi, Suntae Kim, Jeong-Ah Kim, Jee-Hyong Lee},
	booktitle = {KSII Transactions on Internet and Information Systems (TIIS)},
	year = {2019}
}

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.