PySonar
PySonar copied to clipboard
Federated Learning Demos
User Story: As a user of PySonar, I want the ability to run the Decentralized Learning Demo (https://github.com/OpenMined/PySonar/blob/master/notebooks/Sonar%20-%20Decentralized%20Learning%20Demo.ipynb) on Machine Learning Models other than those packaged in PySyft. However, I still want the gradients to be encrypted using Paillier Homomorphic Encryption.
[Example of Paillier Homomorphic Encryption:] https://github.com/OpenMined/PySyft/blob/master/notebooks/Syft%20-%20Paillier%20Homomorphic%20Encryption%20Example.ipynb
Acceptance Criteria:
- Rebuilt the demo from the notebook above using a Tensorflow model instead of Syft's Linear Classifier
- Rebuilt the demo from the notebook above using a PyTorch model instead of Syft's Linear Classifier
- Rebuilt the demo from the notebook above using a Keras model instead of Syft's Linear Classifier
- Rebuilt the demo from the notebook above using a DyNet model instead of Syft's Linear Classifier
- In all demos above, encrypt the gradients using Paillier Homomorphic Encryption. By "Gradients" I mean the total change in weights as a result of local training. Basically... during Step 2 of the model above, when the Anonymous Patient downloads a model to improve it. The Anonymous Patient downloads the model (say... a Tensorflow model), trains it on local data, then computes how much the weights changed (gradient = new_weights - old_weights). This gradient should then be converted to an encrypted PaillierTensor and uploaded to the blockchain.
- Step 3 should be decrypt the gradient that was uploaded when evaluating
As a matter of process... when you pick ONE of the frameworks above (Tensorflow, PyTorch, Keras, or DyNet) write a comment below specifying which one you're working on so that no-one else duplicates your work! :)
I am working on the Tensorflow model implementation. :)
I am working on the keras model
I am working on the PyTorch model
@amiteshP @olveirap @robert-wagner very excited about this one! I'd like to feature each of your demos in the next YouTube livestream! https://www.youtube.com/watch?v=g6AOJW7w__E
I would like to work on dynet model!