Skip to content

shilab/FedDP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FL-project

Dependencies:

Tensorflow 2.3.0
Tensorflow-Privacy 0.5.2
Tensorflow-Federated 0.17.0

Introduction

The model is based on tensorflow_federated and tensorflow_privacy frameworks. There are two parties and a central server in this program. There are two parts of codes: train.py and predict.py for training and predicting process respectively. There are two dataset files (party_1.csv, party_2.csv) in the “Dataset” directory that contain the training data for two parties. The structure of the network is shown

Model

Tutorials

Please make sure the checkpoint_manager.py is on the same directory with train.py and predict.py. For training process, you can use Command-Line Interface like following command:

python train.py --rounds=30 --epochs=20 --batch_size=30 --noise_multiplier=1.0 --model_dir='M_NAME'

Once the training process is finished, the trained model would be saved on the path of M_NAME.

The parameters you can set are:

ParametersDefaultComment
noise_multiplier1.2Ratio of the standard deviation to the clipping norm
batch_size30Batch size
epochs20Number of epochs for local training on each party
rounds10Number of rounds for global deferated training
model_dir Cell:1'...'Path of saved model

Then you can predict the results on the given dataset by the following command:

python predict.py --model_dir='M_NAME' –test_dir=’T_NAME’

References

Idash: http://www.humangenomeprivacy.org/2021/competition-tasks.html

Tensorflow-federated: https://github.com/tensorflow/federated

Tensorflow-privacy: https://github.com/tensorflow/privacy

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/training/checkpoint_management.py

https://github.com/tensorflow/privacy/blob/master/tensorflow_privacy/privacy/optimizers/dp_optimizer.py

Citation

@inproceedings{Li2023FedDP,
  title={FedDP: Secure Federated Learning with Differential Privacy for Disease Prediction},
  author={Li, Bin and Gao, Hongchang and Shi, Xinghua},
  booktitle={International Conference on Computational Advances in Bio and Medical Sciences},
  year={2023},
  organization={Springer}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages