All Projects → OpenMined → PyVertical

OpenMined / PyVertical

Licence: Apache-2.0 license
Privacy Preserving Vertical Federated Learning

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to PyVertical

awesome-secure-computation
Awesome list for cryptographic secure computation paper. This repo includes *Lattice*, *DifferentialPrivacy*, *MPC* and also a comprehensive summary for top conferences.
Stars: ✭ 125 (-6.02%)
Mutual labels:  psi, private-set-intersection
FedNLP
FedNLP: An Industry and Research Integrated Platform for Federated Learning in Natural Language Processing, Backed by FedML, Inc. The Previous Research Version is Accepted to NAACL 2022
Stars: ✭ 215 (+61.65%)
Mutual labels:  federated-learning
NIID-Bench
Federated Learning on Non-IID Data Silos: An Experimental Study (ICDE 2022)
Stars: ✭ 304 (+128.57%)
Mutual labels:  federated-learning
FEDL
FEDL-Federated Learning algorithm using TensorFlow (Transaction on Networking 2021)
Stars: ✭ 41 (-69.17%)
Mutual labels:  federated-learning
FedScale
FedScale is a scalable and extensible open-source federated learning (FL) platform.
Stars: ✭ 274 (+106.02%)
Mutual labels:  federated-learning
federated pca
Federated Principal Component Analysis Revisited!
Stars: ✭ 30 (-77.44%)
Mutual labels:  federated-learning
DeML-Golem
Proof Of Concept of DEcentralised Machine Learning on top of the Golem (https://golem.network/) architecture
Stars: ✭ 35 (-73.68%)
Mutual labels:  federated-learning
distributed-learning-contributivity
Simulate collaborative ML scenarios, experiment multi-partner learning approaches and measure respective contributions of different datasets to model performance.
Stars: ✭ 49 (-63.16%)
Mutual labels:  federated-learning
federated-learning
tf implementation of federated learning
Stars: ✭ 36 (-72.93%)
Mutual labels:  federated-learning
Addressing-Class-Imbalance-FL
This is the code for Addressing Class Imbalance in Federated Learning (AAAI-2021).
Stars: ✭ 62 (-53.38%)
Mutual labels:  federated-learning
federated
Bachelor's Thesis in Computer Science: Privacy-Preserving Federated Learning Applied to Decentralized Data
Stars: ✭ 25 (-81.2%)
Mutual labels:  federated-learning
PSI
Private Set Intersection Cardinality protocol based on ECDH and Bloom Filters
Stars: ✭ 87 (-34.59%)
Mutual labels:  private-set-intersection
DBA
DBA: Distributed Backdoor Attacks against Federated Learning (ICLR 2020)
Stars: ✭ 98 (-26.32%)
Mutual labels:  federated-learning
Awesome-Federated-Learning-on-Graph-and-GNN-papers
Federated learning on graph, especially on graph neural networks (GNNs), knowledge graph, and private GNN.
Stars: ✭ 206 (+54.89%)
Mutual labels:  federated-learning
ambianic-edge
The core runtime engine for Ambianic Edge devices.
Stars: ✭ 98 (-26.32%)
Mutual labels:  federated-learning
FedDANE
FedDANE: A Federated Newton-Type Method (Asilomar Conference on Signals, Systems, and Computers ‘19)
Stars: ✭ 25 (-81.2%)
Mutual labels:  federated-learning
baai-federated-learning-helmet-baseline
电力人工智能数据竞赛——安全帽未佩戴行为目标检测赛道基准模型
Stars: ✭ 26 (-80.45%)
Mutual labels:  federated-learning
flPapers
Paper collection of federated learning. Conferences and Journals Collection for Federated Learning from 2019 to 2021, Accepted Papers, Hot topics and good research groups. Paper summary
Stars: ✭ 76 (-42.86%)
Mutual labels:  federated-learning
PyAriesFL
Federated Learning on HyperLedger Aries
Stars: ✭ 19 (-85.71%)
Mutual labels:  federated-learning
CRFL
CRFL: Certifiably Robust Federated Learning against Backdoor Attacks (ICML 2021)
Stars: ✭ 44 (-66.92%)
Mutual labels:  federated-learning

om-logo

Tests License OpenCollective

PyVertical

A project developing privacy-preserving, vertical federated learning, using syft.

  • 🔗 Private entity resolution using Private Set Intersection (PSI)
  • 🔒 Trains a model on vertically partitioned data using SplitNNs, so only data holders can access data

Vertically-partitioned data is data in which fields relating to a single record are distributed across multiple datasets. For example, multiple hospitals may have admissions data on the same patients, or retailers have transaction data on the same shoppers. Vertically-partitioned data could be applied to solve vital problems, but data holders can't combine their datasets by simply comparing notes with other data holders unless they want to break user privacy. PyVertical uses PSI to link datasets in a privacy-preserving way. We train SplitNNs on the partitioned data to ensure the data remains separate throughout the entire process.

See the changelog for information on the current status of PyVertical.

NOTE: PyVertical does not currently work with syft 0.3.0

The Process

PyVertical diagram

PyVertical process:

  1. Create partitioned dataset
    • Simulate real-world partitioned dataset by splitting MNIST into a dataset of images and a dataset of labels
    • Give each data point (image + label) a unique ID
    • Randomly shuffle each dataset
    • Randomly remove some elements from each dataset
  2. Link datasets using PSI
    • Use PSI to link indices in each dataset using unique IDs
    • Reorder datasets using linked indices
  3. Train a split neural network
    • Hold both datasets in a dataloader
    • Send images to first part of split network
    • Send labels to second part of split network
    • Train the network

Requirements

OS

Windows Linux MacOS
✔️ ✔️

The Windows PyTorch version 1.4.0 is experiencing issues. It cannot be updated on a working version, until Syft will be updated, too.

Python

3.6 3.7 3.8 3.9
✔️ ✔️ ✔️

syft and PSI upstream dependencies do not have Python 3.9 packages.

PyTorch Environment

To install the dependencies, we recommend using Conda:

  1. Clone this repository
  2. In the command line, navigate to your local copy of the repository
  3. Run conda env create -f environment.yml
    • This creates an environment pyvertical-dev
    • Comes with most dependencies you will need
  4. Activate the environment with conda activate pyvertical-dev
  5. Run conda install notebook

N.b. Installing the dependencies takes several steps to circumvent versioning incompatibility between syft and jupyter. In the future, all packages will be moved into the environment.yml.

Tensorflow Environment

To install the dependencies, we recommend using Conda:

  1. Clone this repository
  2. In the command line, navigate to your local copy of the repository
  3. Run conda env create -f tf_environment.yml
    • This creates an environment pyvertical-dev-tf
    • Comes with most dependencies you will need
  4. Activate the environment with conda activate pyvertical-dev-tf
  5. Run conda install notebook

Docker

You can instead opt to use Docker.

To run:

  1. Build the image with docker build -t pyvertical:latest .
  2. Launch a container with docker run -it -p 8888:8888 pyvertical:latest
    • Defaults to launching jupyter lab

Synthea

PyVertical is applying fake medical data generated by synthea to demonstrate multi-party, vertical federated learning. Read the synthea docs for requirements to generate the data. With those pre-requisites installed, run the scripts/download_synthea.sh bash script from the root directory of this project, which generates a deterministic dataset and stores it in data/synthea.

Usage

Check out examples/PyVertical Example.ipynb to see PyVertical in action.

Goals

  • MVP
    • Simple example on MNIST dataset
    • One data holder has images, the other has labels
  • Extension demonstration
    • Apply process to electronic health records (EHR) dataset
    • Dual-headed SplitNN: input data is split amongst several data holders
  • Integrate with syft

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Read the OpenMined contributing guidelines and styleguide for more information.

Contributors

TTitcombe Pavlos-P H4ll rsandmann daler3
TTitcombe Pavlos-p H4LL rsandmann daler3

Testing

We use pytest to test the source code. To run the tests manually:

  1. In the command line, navigate to the root of this repository
  2. Run python -m pytest

CI also checks the code is formatting according to contributing guidelines.

Publications

Romanini, D., Hall, A. J., Papadopoulos, P., Titcombe, T., Ismail, A., Cebere, T., Sandmann, R., Roehm, R. & Hoeh, M. A. (2021). PyVertical: A Vertical Federated Learning Framework for Multi-headed SplitNN. arXiv preprint arXiv:2104.00489. (link)

Angelou, N., Benaissa, A., Cebere, B., Clark, W., Hall, A. J., Hoeh, M. A., Liu, D., Papadopoulos, P., Roehm, R., Sandmann, R., Schoppmann, P. & Titcombe, T. (2020). Asymmetric Private Set Intersection with Applications to Contact Tracing and Private Vertical Federated Machine Learning. arXiv preprint arXiv:2011.09350. (link)

You can cite this work using:

@article{romanini2021pyvertical,
    title={PyVertical: A Vertical Federated Learning Framework for Multi-headed SplitNN},
    author={Romanini, Daniele and Hall, Adam James and Papadopoulos, Pavlos and Titcombe, Tom and Ismail, Abbas and Cebere, Tudor and Sandmann, Robert and Roehm, Robin and Hoeh, Michael A},
    journal={arXiv preprint arXiv:2104.00489},
    year={2021}
}

@article{angelou2020asymmetric,
    title={Asymmetric Private Set Intersection with Applications to Contact Tracing and Private Vertical Federated Machine Learning},
    author={Angelou, Nick and Benaissa, Ayoub and Cebere, Bogdan and Clark, William and Hall, Adam James and Hoeh, Michael A and Liu, Daniel and Papadopoulos, Pavlos and Roehm, Robin and Sandmann, Robert and others},
    journal={arXiv preprint arXiv:2011.09350},
    year={2020}
}

License

Apache License 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].