Giter Club home page Giter Club logo

atpaper's Introduction

Description of codes on CIFAR-10

To ensure that our experiments perform fair comparison with previous work, we mainly adopt the public codes from TRADES, and make some modifications on them to run the trials.

Adversarial Training

  • Train PGD-AT
python train_adv_cifar10.py --loss=pgd

Adversarial Training with HE

Here we activate the HE operation and set the scale s and margin m.

  • Train PGD-AT + HE:
python train_adv_cifar10.py --loss=pgd_he --s=10.0 --m=0.2 --wd 5e-4
  • Train TRADES + HE:
python train_adv_cifar10.py --loss=trades_he --beta=6.0 --s=15.0 --m=0.2
  • Train ALP + HE:
python train_adv_cifar10.py --loss=alp_he --beta=0.5 --s=20.0 --m=0.3

Our pre-trained models for CIFAR-10 WideResNets (in width factor 20 and 10) are available, including PGD+HE-wide20 and PGD+HE-wide10. We find that our HE mechanism is more suitable for the PGD-AT framework, since its principled formula is more aligned with our analysis.

Robustness Evaluation

Under the PGD attacks

To evaluate the performance of the trained models under the PGD attacks (default PGD-20), the running command is

  $ python pgd_attack_cifar10.py

Under AutoAttack

We also evaluate a reliable attack, named AutoAttack, the running command is

  $ python test_autoattack.py --model-path=$CHECKPOINT_PATH$ --use_FNandWN --widen_factor=20

On the CIFAR-10-C dataset

To evaluate the performance of the general robustness, we also test on the CIFAR-10-C datasets by Hendrycks & Dietterich (ICLR 2019). The running command is

  $ python general_attack_cifar10.py

atpaper's People

Contributors

metainsight7 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.