Giter Site home page Giter Site logo

perturbation-diversity's Introduction

PERTURBATION DIVERSITY CERTIFICATES ROBUST GENERALIZATION

Introduction

This is the implementation of the ["PERTURBATION DIVERSITY CERTIFICATES ROBUST GENERALIZATION"].

The codes are implemented based on the released codes from "Feature-Scattering Adversarial Training" [Code] [Paper]

Tested under Python 3.7.9 and PyTorch 1.8.0.

Train

Enter the folder named by the dataset you want to train. Specify the path for saving the trained models in fs_train.sh, and then run

sh ./fs_train_cfiar10.sh  # for CIFAR-10 dataset
sh ./fs_train_svhn.sh     # for SVHN dataset
sh ./fs_train_cfiar100.sh # for CIFAR-100 dataset

Evaluate

Specify the path to the trained models to be evaluated in fs_eval.sh and then run, using CIFAR-10 as a example. param: --init_model_pass: The load number of checkpoint, Possible values: `latest` for the last checkpoint, `199` for checkpoint-199 param: --attack_method_list: The attack list for evaluation, Possible values: `natural` for natural data, `fgsm`, `pgd`, `cw`

sh ./fs_eval_cifar10.sh

Reference Model

A reference AT+PD model trained on CIFAR-10, CIFAR-100, SVHN.

A reference FS+PD model trained on CIFAR-10, CIFAR-100, SVHN.

Reference

Haichao Zhang and JianyuWang. Defense against adversarial attacks using feature scattering-based adversarial training. In Advances in Neural Information Processing Systems, pp. 1829โ€“1839, 2019.

perturbation-diversity's People

Contributors

litterq avatar

Watchers

 avatar

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.