Code Monkey home page Code Monkey logo

bci_adv_defense's Introduction

bci_adv_defense

This project evaluated some typical adversarial defense approaches in BCIs.

Evaluated defenses

Following defenses were evaluated:

  • Natural training: NT.py
  • Adversarial training: AT.py
  • TRADES: TRADES.py
  • SCR: SRC.py
  • HYDRA: HYDRA.py
  • Stochastic activation pruning: stochastic_activation_pruning.py
  • Input transformation: input_transform.py
  • Random self ensemble: random_self_ensemble.py
  • Self ensemble adversarial training: self_ensemble_AT.py

Attacks

Two white-box attacks and two black-box attacks with $\ell_{\infty}$ and $\ell_2$ norm were used to evaluate defenses, which can be found in the file attack_lib.py.

Evaluation

The file evaluation.py can be used for evaluation after model trained with defense. For example, the evaluation of EEGNet trained with AT against $\ell_{\infty}$ untargeted attacks in within-subject setup is as follows:
python3 evaluation.py --model EEGNet --defense AT --distance inf --target False

bci_adv_defense's People

Contributors

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