PySonar icon indicating copy to clipboard operation
PySonar copied to clipboard

Federated Learning Demos

Open iamtrask opened this issue 7 years ago • 6 comments

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

iamtrask avatar Oct 04 '17 11:10 iamtrask

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! :)

iamtrask avatar Oct 04 '17 11:10 iamtrask

I am working on the Tensorflow model implementation. :)

amiteshP avatar Oct 04 '17 11:10 amiteshP

I am working on the keras model

robert-wagner avatar Oct 04 '17 13:10 robert-wagner

I am working on the PyTorch model

olveirap avatar Oct 04 '17 21:10 olveirap

@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

iamtrask avatar Oct 05 '17 11:10 iamtrask

I would like to work on dynet model!

aeroaks avatar Oct 24 '17 15:10 aeroaks