PyVertical: A Vertical Federated Learning Framework for Multi-headed SplitNN

Daniele Romanini, Adam James Hall, Pavlos Papadopoulos, Tom Titcombe, Abbas Ismail, Tudor Cebere, Robert Sandmann, Robin Roehm, Michael A. HoeharXiv 2021

Abstract

Vertical Federated Learning (VFL) addresses the challenge of training machine learning models on datasets where features are distributed across multiple organizations. This paper introduces PyVertical, an open-source framework that combines Private Set Intersection (PSI) and Multi-headed Split Neural Networks (SplitNN) to facilitate collaborative training without raw data sharing. We demonstrate the framework's performance on a vertically partitioned MNIST dataset, achieving a validation accuracy of 94%.

Introduction

In traditional machine learning, data is often centralized in a single location for training. However, real-world data is frequently "siloed" and vertically partitioned. For instance, a hospital may hold medical records while a fitness app holds activity data for the same set of individuals. Merging these datasets centrally often violates privacy regulations like GDPR. While horizontal federated learning (where parties have the same features for different people) is well-studied, vertical partitioning presents unique challenges in entity resolution and model architecture. PyVertical addresses these by allowing parties to link records and train non-linear models while keeping raw data local.

Methods

The PyVertical framework, built on the PySyft library, relies on two primary technological pillars to enable VFL.

Private Set Intersection (PSI)

Before training, parties must identify overlapping individuals across their disparate datasets. PyVertical employs a PSI protocol based on Diffie-Hellman key exchange and Bloom filters. This allows a "Data Scientist" to align records using unique identifiers (e.g., email addresses or SSNs) without any party learning about individuals who do not appear in all datasets.

Multi-headed Split Neural Networks (SplitNN)

The neural network architecture is physically divided among participants. Each "Data Owner" maintains a "head"—the initial layers of the network—which processes local features into abstract embeddings. These embeddings are transmitted to the "Data Scientist," who holds the "tail" of the network and the ground-truth labels. During the forward pass, embeddings are concatenated to generate predictions; during the backward pass, gradients are returned to Data Owners to update their local model segments.

The PyVertical framework architecture showing the interaction between the Data Scientist and multiple Data Owners.

Experimental Setup: Vertical MNIST

To validate the framework, we utilized a vertically partitioned version of the MNIST handwritten digit dataset. In this setup, each 28x28 image is split into two halves. Data Owner 1 holds the left half, Data Owner 2 holds the right half, and the Data Scientist holds the labels. This configuration mimics a multi-party scenario where features are distributed and labels are held by a third-party orchestrator.

The standard MNIST dataset with associated labels and unique IDs used for entity resolution.

Results and Discussion

The proof-of-concept experiment demonstrated that splitting model intelligence across three parties does not impede convergence. The dual-headed SplitNN reached a training accuracy of approximately 97% and a validation accuracy of 94% over 30 epochs.

Key Insights

  • Entity Resolution: PSI is a critical pre-processing step for practical VFL, ensuring that data points are correctly aligned across silos without compromising the privacy of non-overlapping records.
  • Privacy through Abstraction: By sharing only hidden layer activations (embeddings) rather than raw data, PyVertical provides a significant layer of security, though future work will integrate Differential Privacy (DP) to mitigate potential information leakage from gradients.
  • Orchestration: The framework enables a Data Scientist to manage the training process and hyperparameters without ever accessing sensitive input features.

Conclusion and Future Work

PyVertical demonstrates the feasibility of training high-performance non-linear models on vertically partitioned data. Future research will focus on moving beyond the "honest-but-curious" security model to account for malicious actors, exploring the impact of asymmetric data splits, and scaling the framework to "massively multi-headed" scenarios involving many more participants.

Summary updated

BibTeX
@misc{romanini2021pyvertical,
  author = {Daniele Romanini and Adam James Hall and Pavlos Papadopoulos and Tom Titcombe and Abbas Ismail and Tudor Cebere and Robert Sandmann and Robin Roehm and Michael A. Hoeh},
  title = {{PyVertical: A Vertical Federated Learning Framework for Multi-headed SplitNN}},
  year = {2021},
  eprint = {2104.00489},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.00489},
}
Figure