hybrid-approach-to-ppfl
hybrid-approach-to-ppfl copied to clipboard
This is an implementation for paper "A Hybrid Approach to Privacy Preserving Federated Learning" (https://arxiv.org/pdf/1812.03224.pdf)
PoC Hybrid Approach
Project structure
-
main.py
-- script for MNIST experiment (either Linear or CNN model). Defines dataset and dataloaders for trainer -
rnn_main.py
-- script for RNN experiment -
trainer.py
-- Trainer class that rules training and encryption stuff -
distro.py
-- Party and Server classes that knows about model and about encryption and do it -
distro_paillier/
-- sources of Threshold Paillier Homomorphic Encryption. this library is used. I've done minor changes todecrypt
function for it to work correctly with float numbers. -
config.py
-- containes singleton config object used by all modules.
How to run
- Install system dependencies for crypto stuff:
sudo apt install libgmp-dev libmpfr-dev libmpc-dev
. - Install python dependencies:
pip install -r requirements.txt
. - Run MNIST experiment
python main.py
. - Run RNN experiment
python rnn_main.py
.