GithubHelp home page GithubHelp logo

hirokiadachi / once-for-all-adversarial-training Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vita-group/once-for-all-adversarial-training

0.0 0.0 0.0 94 KB

[NeurIPS 2020] "Once-for-All Adversarial Training: In-Situ Tradeoff between Robustness and Accuracy for Free" by Haotao Wang*, Tianlong Chen*, Shupeng Gui, Ting-Kuei Hu, Ji Liu, and Zhangyang Wang

License: MIT License

Python 100.00%

once-for-all-adversarial-training's Introduction

Once-for-All Adversarial Training: In-Situ Tradeoff between Robustness and Accuracy for Free

License: MIT

Haotao Wang*, Tianlong Chen*, Shupeng Gui, Ting-Kuei Hu, Ji Liu, Zhangyang Wang

In NeurIPS 2020

Overview

We present a novel once-for-all adverarial training (OAT) framework that addresses a new and important goal: in-situ β€œfree” trade-off between robustness and accuracy at testing time. In particular, we demonstrate the importance of separating standard and adversarial feature statistics, when trying to pack their learning in one model.

We also extend from OAT to OATS, that enables a joint in-situ trade-off among robustness, accuracy, and the computational budget.

Experimental results show that OAT/OATS achieve similar or even superior performance, when compared to traditional dedicatedly trained robust models. Our approaches meanwhile cost only one model and no re-training. In other words, they are free but no worse.

Framework


Training

Our once-for-all adversarial training method (OAT):

python OAT.py --ds <dataset> -b <batch_size> -e <epochs> --lr <learning_rate> --use2BN

Traditional dedicated adversarial training baseline method (PGDAT):

python PGDAT.py --ds <dataset> -b <batch_size> -e <epochs> --lr <learning_rate>

Citation

If you use this code for your research, please cite our paper.

@inproceedings{wang2020onceforall,
  title={Once-for-All Adversarial Training: In-Situ Tradeoff between Robustness and Accuracy for Free},
  author={Wang, Haotao and Chen, Tianlong and Gui, Shupeng and Hu, Ting-Kuei and Liu, Ji and Wang, Zhangyang},
  booktitle={NeurIPS},
  year={2020}
}

once-for-all-adversarial-training's People

Contributors

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