Syft
Homomorphically Encrypted Deep Learning Library
The goal of this library is to give the user the ability to efficiently train Deep Learning models in a homomorphically encrypted state without needing to be an expert in either. Furthermore, by understanding the characteristics of both Deep Learning and Homomorphic Encryption, we hope to find very performant combinations of the two. See notebooks folder for tutorials on how to use the library.
Setup
Prerequisites
- PySyft is based on Python 3.X.
- Install base libraries first - https://github.com/OpenMined/PySonar/blob/master/README.md#base-libraries
- You need to install this library locally before running any of the notebooks this repository or the main demonstration:
# Get dependencies ready
pip install -r requirements.txt
# install the lib locally
python setup.py install
Installation
The recommended method is using Docker (works on all major operating systems).
For Docker Users
Install Docker from its website.
For macOS users with Homebrew installed, use brew cask install docker
.
For Anaconda Users
bash install_for_anaconda_users.sh
Windows
conda install -c conda-forge gmpy2
pip install -r requirements.txt
python setup.py install
Usage
Start
Then, run:
git clone https://github.com/OpenMined/PySyft.git
cd PySyft
make run
Tests
cd PySyft
make test
For Contributors
If you are interested in contributing to Syft, first check out our Contributor Quickstart Guide and then sign into our Slack Team channel #team_pysyft to let us know which projects sound interesting to you! (or propose your own!).
Relevant Literature
As both Homomorphic Encryption and Deep Learning are still somewhat sparsely known, below is a curated list of relevant reading materials to bring you up to speed with the major concepts and themes of these exciting fields.
Encrypted Deep Learning - Recommended Reading:
- How to build a fully encrypted AI model (trained on unencrypted data)
- Simple secure protocol for federated machine learning (using a python-paillier library)
- Prototype for using encrypted AI to preserve user privacy (in python)
- Manual for Using Homomorphic Encryption for Bioinformatics (paper)
Homomorphic Encryption - Recommended Reading:
- A Comparison of the Homomorphic Encryption Schemes
- Homomorphic Encryption API Software Library
- Faster Homomorphic Function Evaluation using Non-Integral Base Encoding
Relevant Papers:
- Encrypted accelerated least squares regression
- PSML 2017 - Abstracts
- Encrypted statistical machine learning: new privacy preserving methods
- A review of homomorphic encryption and software tools for encrypted statistical machine learning
- Privacy-Preserving Distributed Linear Regression on High-Dimensional Data
- Secure Computation With Fixed-Point Numbers
- Scalable and secure logistic regression via homomorphic encryption
- ML Confidential: Machine Learning on Encrypted Data
- CryptoNets: Applying Neural Networks to Encrypted Data with High Throughput and Accuracy
- Privacy-Preserving Visual Learning Using Doubly Permuted Homomorphic Encryption
Related Libraries:
- HomomorphicEncryption - An R package for fully homomorphic encryption
- A Secure Multiparty Computation (MPC) protocol for computing linear regression on vertically distributed datasets
- Dask Tutorial
- Charm-crypto
Related Blogs:
- Private Deep Learning with MPC - A Simple Tutorial from Scratch
- Secret Sharing, Part 1 - Distributing Trust and Work
- Secret Sharing, Part 2 - Efficient Sharing with the Fast Fourier Transform
- Distributed machine learning and partially homomorphic encryption (Part 1)
- Distributed machine learning and partially homomorphic encryption (Part 2)
- Tutorial: How to verify crowdsourced training data using a Known Answer Review Policy
License
Apache-2.0 by OpenMined contributors