Giter Site home page Giter Site logo

flame's Introduction

FLAME: Differentially Private Federated Learning in the Shuffle Model

This repository contains the code and experiments for the 2021AAAI paper FLAME: Differentially Private Federated Learning in the Shuffle Model

Setup

Dependencies

  • install dependencies and activate the virtural environment
conda env create -f ShuffleFL.yaml
conda activate ShuffleFL
  • set up the jupyter notebook kernel before plotting figures in it
python -m ipykernel install --user --name ShuffleFL --display-name ShuffleFL
  • get the privacy budget for evaluations in Figure 5
python get_budget.py

Dataset

The MNIST is pre-processed with the basic procedure of standardization. We partition 60,000 samples into 6,000 subsets of 10 samples, with one subset corresponding to a user’s device. 6,000 devices are grouped into 6 batches with size 1,000 (m = 1, 000). Run the following command to generate train and test data:

python generate_data.py

The layout the data folder should be:

| data
----| openml
---- ----| api
---- ----| data
----| train 
---- ----| train.json
----| test
---- ----| test.json
| generate_data.py
| README.md
| ...

Run

  • NP-FL: non-private baseline
python main.py  --optimizer='npsgd'
  • DP-FL: differentially private baseline (without local privacy)
python main.py  --optimizer='dpsgd'\
                --epsilon=0.237926\
                --delta=5e-6\
                --norm=0.886\
                --mechanism='gaussian'
  • LDP-FL: locally differentially private baseline
python main.py  --optimizer='ldpsgd'\
                --epsilon=0.237926\
                --delta=5e-6\
                --norm=0.01\
                --mechanism='gaussian'
  • SS-Simple
python main.py  --optimizer='v1sgd'\
                --epsilon=0.01\
                --norm=0.01\
                --mp_rate=3\
                --mechanism='laplace'
  • SS-Double
python main.py  --optimizer='v2sgd'\
                --epsilon=0.5\
                --norm=0.01\
                --rate=50\
                --mp_rate=3\
                --mechanism='laplace'
  • SS-Topk
python main.py  --optimizer='v3sgd'\
                --epsilon=0.5\
                --norm=0.01\
                --rate=50\
                --mp_rate=3\
                --mechanism='laplace'
  • DP-FL with comparable central DP level when the amplification of subsampling is not counted in FLAME
python main.py  --optimizer='dpsgd'\
                --epsilon=20.5352544\
                --delta=5e-6\
                --norm=0.886\
                --mechanism='guassian'

References

@article{liu2020flame,
      title={FLAME: Differentially Private Federated Learning in the Shuffle Model}, 
      author={Ruixuan Liu and Yang Cao and Hong Chen and Ruoyang Guo and Masatoshi Yoshikawa},
      journal={arXiv preprint arXiv:2009.08063},
      year={2020}
}

We refer to this repo contributed by the following paper for the numerical evaluation:

@inproceedings{balle_privacy_2019,
  title={The privacy blanket of the shuffle model},
  author={Balle, Borja and Bell, James and Gasc{\'o}n, Adri{\`a} and Nissim, Kobbi},
  booktitle={Annual International Cryptology Conference},
  pages={638--667},
  year={2019},
  organization={Springer}
}

flame's People

Contributors

rachelxuan11 avatar

Watchers

James Cloos 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.