Tensorflow 2.3.0
Tensorflow-Privacy 0.5.2
Tensorflow-Federated 0.17.0
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
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:
Parameters | Default | Comment |
---|---|---|
noise_multiplier | 1.2 | Ratio of the standard deviation to the clipping norm |
batch_size | 30 | Batch size |
epochs | 20 | Number of epochs for local training on each party |
rounds | 10 | Number 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’
Idash: http://www.humangenomeprivacy.org/2021/competition-tasks.html
Tensorflow-federated: https://github.com/tensorflow/federated
Tensorflow-privacy: https://github.com/tensorflow/privacy
@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}
}