Code Monkey home page Code Monkey logo

gdp's Introduction

Generating Potent Poisons and Backdoors from Scratch with Guided Diffusion

This code is the official PyTroch implementation of the Generating Potent Poisons and Backdoors from Scratch with Guided Diffusion. Our implementation is based on Industrial Scale Data Poisoning via Gradient Matching, PyTorch pretrained Diffusion Models and this awesome repo.

Overview

Dependencies

USAGE

The wrapper for the GDP can be found in brew_poison.py. To craft poisons on CIFAR-10 and ResNet18 with the default values, you can use the following command:

python brew_poison.py --diffusion_base_poisons --filter_max_matching --num_poisons 50

There are a bunch of optional arguments in the forest/options.py. Here are some of them:

  • --eps, and --budget : Determine the power of backdoor attack.
  • --net : which model to attack on.
  • --num_poisons : Number of filtered poisons.
  • --base_optim_guidance_3_wt : Guidance strength.
  • --base_num_steps : Recurrent steps for base poisons.
  • --base_poison_loss_w : Classifer guidance weight.

Citation

Please cite our paper:

@misc{souri2024generating,
      title={Generating Potent Poisons and Backdoors from Scratch with Guided Diffusion}, 
      author={Hossein Souri and Arpit Bansal and Hamid Kazemi and Liam Fowl and Aniruddha Saha and Jonas Geiping and Andrew Gordon Wilson and Rama Chellappa and Tom Goldstein and Micah Goldblum},
      year={2024},
      eprint={2403.16365},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

gdp's People

Contributors

hsouri avatar

Stargazers

Mahmoud Zaky  avatar  avatar Yuguang Yao 姚禹光 avatar Arpit Bansal avatar Shoaib Ahmed Siddiqui avatar John S. Dvorak avatar Avi Schwarzschild avatar Jonas Geiping  avatar happycoder 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.