Git Product home page Git Product logo

dpfl's Introduction

DPFL

This is the official implementation of our paper A Fine-grained Differentially Private Federated Learning against Leakage from Gradients, accepted by IEEE Internet of Things Journal, 2021. This research project is developed based on Python 3 and Pytorch.

Reference

If our work or this repo is useful for your research, please cite our paper as follows:

@ARTICLE{9627872,
  author={Zhu, Linghui and Liu, Xinyi and Li, Yiming and Yang, Xue and Xia, Shu-Tao and Lu, Rongxing},
  journal={IEEE Internet of Things Journal}, 
  title={A Fine-Grained Differentially Private Federated Learning Against Leakage From Gradients}, 
  year={2022},
  volume={9},
  number={13},
  pages={11500-11512},
  doi={10.1109/JIOT.2021.3131258}}

Pipeline

Pipeline

Requirements

To install requirements:

pip install -r requirements.txt

Make sure the directory follows:

stealingverification
├── data
│   ├── cifar10
│   └── ...
├── ckpt 
│   
├── pogz
│   
├── model
|

PoGZ

Load a pretrained local model and calculate the PoGZ of each layer with the local valid dataset. The PoGZ

python get_pogz.py --dataset=dataset_name --resume_path=./ckpt/path_to_pretrained_model.pt --local_val_dataset_path=./path_to_local_val_dataset/

The result will be saved in ./pogz/ .

Add noise on client model

Load a updated client model and add noised.

python add_noise.py --resume_path=./ckpt/path_to_updated_local_model.pt --dataset=dataset_name 

Defense against DLG

The defense against DLG with a euclidean distance as the loss function. The noise is injected into all the layers of the shared gradients with DPFL. The adversary tries to recover local data from the gradients and the leakage can not be preformed. Result

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.