Coder Social home page Coder Social logo

trellixvulnteam / model-stealing-defenses_ep6f Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mmazeika/model-stealing-defenses

0.0 0.0 0.0 212.13 MB

Official repository for the paper "How to Steer Your Adversary: Targeted and Efficient Model Stealing Defenses with Gradient Redirection"

License: MIT License

Shell 0.09% Python 0.63% Jupyter Notebook 99.27%

model-stealing-defenses_ep6f's Introduction

Model Stealing Defenses with Gradient Redirection

This is the official repository for "How to Steer Your Adversary: Targeted and Efficient Model Stealing Defenses with Gradient Redirection" (ICML 2022)

How To Use

First, clone the repository, then clone the Outlier Exposure repository into the model-stealing-defenses folder. This is used to provide a strong anomaly detector for the Adaptive Misinformation baseline on CIFAR experiments. Next, follow the instructions in batch_training/condor_scripts/data/README.md to setup the distribution-aware datasets. Optionally download and untar the outputs and condor_outputs folders from here, replacing the empty folders by the same name with the respective untarred folders. These contain perturbed posteriors and trained models, which can be used to replicate results from the paper, but this requires around 60GB of space.

The GRAD2 method from the paper can be run using the models currently in the outputs folder. The functions for running GRAD2 are in defenses.py, and example usage from the experiments in the paper is in get_queries.py and makebatches.sh.

To regenerate results from the paper, rerun the experiments in makebatches.sh in the specified order. The experiments were run on an HTCondor system, so the script would need to be adjusted for slurm. Results and figures can be generated in batch_training/condor_scripts/parse_results.ipynb using either the regenerated results or the results in outputs.tar (see download link above).

Citation

If you find this useful in your research, please consider citing:

@article{mazeika2022defense,
  title={How to Steer Your Adversary: Targeted and Efficient Model Stealing Defenses with Gradient Redirection},
  author={Mazeika, Mantas and Li, Bo and Forsyth, David},
  journal={Proceedings of the International Conference on Machine Learning},
  year={2022}
}

model-stealing-defenses_ep6f's People

Contributors

mmazeika avatar trellixvulnteam 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.