Coder Social home page Coder Social logo

ipc-lab / private-ml-for-health Goto Github PK

View Code? Open in Web Editor NEW
64.0 8.0 17.0 68.3 MB

Dopamine: Differentially Private Federated Learning on Medical Data (AAAI - PPAI)

Home Page: https://arxiv.org/abs/2101.11693

License: MIT License

Python 69.28% Jupyter Notebook 26.59% CSS 0.26% HTML 3.07% Shell 0.79%
federated-learning differential-privacy secure-multi-party-computation deep-learning deep-neural-network medical-image-processing medical-application privacy machine-learning opacus

private-ml-for-health's Introduction

Dopamine: Differentially Private Federated Learning on Medical Data

Abstract

While rich medical datasets are hosted in hospitals distributed across the world, concerns on patients' privacy is a barrier against using such data to train deep neural networks (DNNs) for medical diagnostics. We propose Dopamine, a system to train DNNs on distributed datasets, which employs federated learning (FL) with differentially-private stochastic gradient descent (DPSGD), and, in combination with secure aggregation, can establish a better trade-off between differential privacy (DP) guarantee and DNN's accuracy than other approaches. Results on a diabetic retinopathy~(DR) task show that Dopamine provides a DP guarantee close to the centralized training counterpart, while achieving a better classification accuracy than FL with parallel DP where DPSGD is applied without coordination.

Folders:

  1. report: includes the final report. For 1.Design document showing the reasons for the choice of privacy-preserving technique and the network architectural components.
  2. private_training: includes the source code and a JupyterNotebook tutorial for training the privacy-preserving model explained in the report. For 2.Source code for the implementation of the privacy-preserving design across various architectural components.
  3. private_inference: includes the source code and demo for running inference on the privately trained model. For 3.Tested code and Test Report for all implementations- Implementations of Privacy-Preserving AI Technique, Trained Data Model, UI on smartphone.
  4. video_demo: include some video demos showing how to run training and inference. For 4. A Video of the demonstration of Proof-of-Concept.

Tutorial

We provided a Jupyter Notebook for training on Google Colab. Please see the file JNotebook_running_FSCDP_on_Colab.ipynb in the private_training folder.

Live Demo:

Please use this link to get an inference on a Diabetic Retinopathy medical image:

https://imperial-diagnostics.herokuapp.com/

(Note: implementing the pure private inference is still in progress...)

Citation

If you find the provided code or the proposed algorithms useful, please cite this work as:

@article{malekzadeh2021dopamine,
  title={Dopamine: Differentially Private Federated Learning on Medical Data},
  author={Malekzadeh, Mohammad and Hasircioglu, Burak and  Mital, Nitish and  Katarya, Kunal and Ozfatura,  Mehmet Emre and Gündüz, Deniz}, 
  journal= {The Second AAAI Workshop on Privacy-Preserving Artificial Intelligence (PPAI-21)},
  year={2021},
  url = {https://github.com/ipc-lab/private-ml-for-health}
}

Collaboration/Contribution

We kindly welcome collaboration and/or contribution to this work. Please feel free to drop a line to us via email or by opening an issue.

private-ml-for-health's People

Contributors

kunjzk avatar mmalekzadeh avatar nitishmital avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

private-ml-for-health's Issues

how the global privacy budget is calculated?

Hi authors,

Thanks for releasing the code, which is very helpful. I have a question about the global privacy budget:
Each local optimizer is attached to a separate PrivacyEngine, so we can track the privacy budget for each local client independently during the local SGD.


The global optimizer is attached to another global PrivacyEngine. However, the global optimizer is not used because the server does not actually train the model and it only performs the aggregation. Given that the global optimizer is not used in practise, how the function "global_privacy_engine.get_privacy_spent(args.delta) " calculate an epsilon?
epsilons, _ = global_privacy_engine.get_privacy_spent(args.delta)

Thanks!

AttributeError: The following layers do not have gradients

Thanks for providing the code. But when I'm running
python src/federated_main_s2.py --epochs=1 --num_users=1 --frac=1. --local_ep=100 --local_bs=50 --virtual_batch_size=50 --optimizer='sgd' --lr=0.001 --momentum=0.9 --dataset='dr' --dr_from_np=1 --withDP=1 --max_grad_norm=2. --noise_multiplier=1. --delta=1e-4
An error occurred:
1683532359036
Can someone tell me how to solve it? Thanks.

By the way, I would be very grateful if you could tell me in which article FL with Parallel DP (FPDP) was proposed.

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.