Skip to content

Instantly share code, notes, and snippets.

@rasswanth-s
Last active August 23, 2021 09:27
Show Gist options
  • Save rasswanth-s/8ad17165611009da32960153cfb97423 to your computer and use it in GitHub Desktop.
Save rasswanth-s/8ad17165611009da32960153cfb97423 to your computer and use it in GitHub Desktop.
GSoC 2021 - Falcon

GSoC 2021

Google Summer of Code 2021 Final Work Report

Abstract

The project aims to implement Falcon ,a private deep learning framework based on Multi-Party Computation in SyMPC.The underlying protocols build on ReplicatedSecretSharing,for which a ReplicatedShareTensor type is implemented for performing the operations.Private Deep Learning allows parties to perform training/inference on data held by the parties.The security guarantee is that only the output of the computation is revealed.Falcon is an end-to-end 3 party computation framework ,which provides malicious security for honest majority.

Secure Multi-Party Computation (SMPC)

Secure Multi party Computation is one of the revolutionary concepts in Cryptography, which allows mutually distrusting parties to jointly compute a function which reveals only the function output.Security Models in SMPC are semi-honest , malicious,covert.In semi-honest setting parties follow the protocol specification , but actively parties try to learn inputs of other.In malicious setting, the parties could arbitrarily deviate from the specification of the protocol.In a covert setting , parties are allowed to deviate from the protocol specification, but are detected with a specific probability.Secret Sharing is one the techniques to implement multi party computation.Falcon builds on ReplicatedSecretSharing.In ReplicatedSecretSharing, the secret is split into three shares ,which on addition gives the original secret.Each party is given 2 shares in a round robin fashion.

Pull Request in SyMPC

  1. Initialize FALCON Protocol
  2. Added Hook method and property -RSTensor
  3. Fixed Point Encoding - RSTensor
  4. Refactored hook method and property -RSTensor
  5. Added security_type attribute to protocol
  6. Implementation of PRRS(Pseudo-Random Random Share
  7. Implementation of add/sub operations -RSTensor
  8. Modified RSTensor to use parallel execution
  9. Modified allow-list to use absolute paths.
  10. ABY3 Truncation Protocol -semi-honest
  11. Falcon Multiplication(M) , Matrix Multiplication(S,M) , Beaver Triple Generation.(S-Semi-honest,M-Malicious)
  12. Extension of ReplicatedSharedTensor to Binary,Prime order rings.
  13. ABY3 : Bit Injection and local decomposition
  14. Falcon: Select Shares
  15. Falcon: Private compare
  16. Falcon: Wrap
  17. Falcon: ReLU and DReLU
  18. Falcon: Bounding Pow
  19. Falcon: Division
  20. [WIP]Falcon: Batch Normalization

Pull Request in PySyft

  1. Initialize protocol protobuf
  2. Modified RSTensor proto to use TensorProto
  3. Serialization of ring_size in ShareTensor, ReplicatedSharedTensor
  4. Modified deserialization to use share config
  5. Added numpy support to ReplicatedSharedTensor

Overall Status of project.

The ReplicatedSharingTensor has been implemented for performing primitive operations which is required by Falcon protocols.The Batch Normalization is pending in Falcon protocol, remaining Falcon protocols have been implemented.The batch normalization is compute intensive,optimizations are being added to improve it.

Future Work

  • Parallelizing the multiplication operation ,would greatly improve the protocol performance, which are bottleneck currently by race condition on random number generation.
  • All the protocols are implemented in orchestrator setting, moving to P2P setting would improve the protocols.

Final Thoughts and Acknowledgements

The GSoC gave me a great learning experience in terms of writing good code, code reviews,documentation,introducing me to a wonderful community.The tasks were challenging which had several parts in research and developments.I would like to thank Théo Ryffel, George Muraru, Hrishikesh Kamath, Anubhav Raj Singh and SMPC team at OpenMined for the support and guidance throughout the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment