Git Product home page Git Product logo

harishgovardhandamodar / adversarial-unlearning-of-backdoors-via-implicit-hypergradient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yizeng623/i-bau

0.0 0.0 0.0 12.24 MB

Official Implementation of ICLR 2022 paper, ``Adversarial Unlearning of Backdoors via Implicit Hypergradient''

Home Page: https://openreview.net/forum?id=MeeQkFYVbzW

License: MIT License

Python 45.22% Jupyter Notebook 54.78%

adversarial-unlearning-of-backdoors-via-implicit-hypergradient's Introduction

I-BAU: Adversarial-Unlearning-of-Backdoors-via-Implicit-Hypergradient

Python 3.6 Pytorch 1.8.1 CUDA 10.1

Official Implementation of ICLR 2022 paper, Adversarial Unlearning of Backdoors via Implicit Hypergradient [openreview][video] .

We propose a novel minimax formulation for removing backdoors from a given poisoned model based on a small set of clean data:

To solve the minimax problem, we propose the Implicit Backdoor Adversarial Unlearning (I-BAU) algorithm, which utilizes the implicit hypergradient to account for the interdependence between inner and outer optimization. I-BAU requires less computation to take effect; particularly, it is more than 13 X faster than the most efficient baseline in the single-target attack setting. It can still remain effective in the extreme case where the defender can some only access 100 clean samples โ€” a setting where all the baselines fail to produce acceptable results . Picture1

Requirements

This code has been tested with Python 3.6, PyTorch 1.8.1 and cuda 10.1.

Usage & HOW-TO

  • Install required packages.
  • Get poisoned models prepared in the directory ./checkpoint/.
  • We provide two examples on poisoned models trained on GTSRB and CIFAR10 datasets, check clean_solution_batch_op..._cifar.ipynb and clean_solution_batch_op..._gtsrb.ipynb for more details.
  • For a more flexible usage, run python defense.py. An example is as follow:
python defense.py --dataset cifar10 --poi_path './checkpoint/badnets_8_02_ckpt.pth'  --optim Adam --lr 0.001 --n_rounds 3 --K 5

Clean data used for backdoor unlearning can be specified with argument --unl_set; if it is not specified, then a subset of data from testset will be used for unlearning.

  • For more information regarding training options, please check the help message:
    python defense.py --help.

Poster

Citation

If you find our work useful please cite:

@inproceedings{zeng2021adversarial,
  title={Adversarial Unlearning of Backdoors via Implicit Hypergradient},
  author={Zeng, Yi and Chen, Si and Park, Won and Mao, Zhuoqing and Jin, Ming and Jia, Ruoxi},
  booktitle={International Conference on Learning Representations},
  year={2021}
}

Special thanks to...

Stargazers repo roster for @YiZeng623/I-BAU Forkers repo roster for @YiZeng623/I-BAU

adversarial-unlearning-of-backdoors-via-implicit-hypergradient's People

Contributors

harishgovardhandamodar avatar scccc21 avatar yizeng623 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.