Google Summer of Code 2021 Final Work Report
- Name: Rasswanth S
- Organization: OpenMined
- Project: Implement Falcon :Private Deep Learning Framework in SyMPC
- Mentors: Théo Ryffel, George Muraru
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
- Initialize FALCON Protocol
- Added Hook method and property -RSTensor
- Fixed Point Encoding - RSTensor
- Refactored hook method and property -RSTensor
- Added security_type attribute to protocol
- Implementation of PRRS(Pseudo-Random Random Share
- Implementation of add/sub operations -RSTensor
- Modified RSTensor to use parallel execution
- Modified allow-list to use absolute paths.
- ABY3 Truncation Protocol -semi-honest
- Falcon Multiplication(M) , Matrix Multiplication(S,M) , Beaver Triple Generation.(S-Semi-honest,M-Malicious)
- Extension of ReplicatedSharedTensor to Binary,Prime order rings.
- ABY3 : Bit Injection and local decomposition
- Falcon: Select Shares
- Falcon: Private compare
- Falcon: Wrap
- Falcon: ReLU and DReLU
- Falcon: Bounding Pow
- Falcon: Division
- [WIP]Falcon: Batch Normalization
Pull Request in PySyft
- Initialize protocol protobuf
- Modified RSTensor proto to use TensorProto
- Serialization of ring_size in ShareTensor, ReplicatedSharedTensor
- Modified deserialization to use share config
- 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.
- 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.