Giter VIP home page Giter VIP logo

sisyphus-ppml's Introduction

Sisyphus: A Cautionary Tale of Using Low-Degree Polynomial Activations in Privacy-Preserving Deep Learning

This repository contains the code for the Sisyphus framework, a set of methods for wholesale ReLU replacement using polynomial activation functions in Private Inference. The repo is structured as followed:

  1. models: PyTorch implementation of various network architectures
  2. data: Instructions for downloading MNIST, CIFAR, and TinyImageNet
  3. experiments
    • baselines: pipeline to train baseline networks with ReLU
    • tayloy_approx: Taylor series approximation of ReLU
    • poly_regression: Polynomial regression fit of ReLU
    • quail: Quadratic Imitation Learning training pipeline
    • approxminmax_quail: ApproxMinMaxNorm implementation
    • test_networks: simply test loss and accuracy evaluation script

Installation

Clone this repo:

git clone https://github.com/sisyphus-project/sisyphus-ppml.git
cd sisyphus-ppml

Install the required Python packages:

pip install -r requirements.txt

Setup two environment variables (for the datasets and models). You may want to add these environment variables to your bashrc file.

export PYTHONPATH="$PYTHONPATH:$(pwd)/models"
export DATASET_DIR=$(pwd)/data

Follow the instructions in the data directory to download the datasets. We use wandb to log our experiments.

Citation

If you find our work useful, kindly cite us with:

@inproceedings{garimella2021sisyphus,
      author={Garimella, Karthik  and Jha, Nandan Kumar and Reagen, Brandon},
      title={Sisyphus: A Cautionary Tale of Using Low-Degree
      Polynomial Activations in Privacy-Preserving Deep Learning}, 
      booktitle	= {ACM CCS Workshop on Private-preserving Machine Learning},
      year={2021},
      doi={10.48550/ARXIV.2107.12342}
}

Example

To run a baseline model, move to the baselines directory and run:

python train_mnist.py --project=sisyphus-baseline --name=mnist-mlp --model=mlp_bn

For more detailed instructions on running experiments, please refer to the READMEs in each subdirectory.

sisyphus-ppml's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cicada-ws

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.