Fedlearn-Algo: A flexible open-source privacy-preserving machine learning platform

Bo Liu, Chaowei Tan, Jiazhou Wang, Tao Zeng, Huasong Shan, Houpu Yao, Heng Huang, Peng Dai, Liefeng Bo, Yanqing ChenarXiv 2021 · arXiv

Introduction

In the modern AI landscape, data is often trapped in silos. While medical records or consumer habits could yield transformative insights when combined, privacy concerns and regulatory requirements prevent the sharing of raw data. Federated Learning (FL) has emerged as a solution, but most existing tools are optimized for "Horizontal" scenarios—where many users have the same type of data. Fedlearn-Algo, developed by JD Finance America Corporation, addresses the more complex "Vertical" Federated Learning (VFL) space, where different organizations hold different features for the same set of individuals.

The Challenge of Vertical Federated Learning

In Business-to-Business (B2B) or Business-to-Government (B2G) settings, data is typically partitioned vertically. For instance, a bank may hold a user's credit history while a retailer holds their purchase patterns. Existing VFL frameworks often struggle with efficiency and usability. The heavy computational cost of Homomorphic Encryption (HE) can slow training to a crawl, and the lack of standardized communication interfaces forces researchers to reinvent the wheel for every new algorithm. Fedlearn-Algo aims to bridge this gap by providing a streamlined, high-performance platform for VFL research and deployment.

System Architecture

Fedlearn-Algo employs a modular architecture that strictly separates "Platform Implementation" (the underlying infrastructure) from "User Implementation" (the algorithmic logic). This design allows developers to focus on mathematical modeling without worrying about networking complexities.

System architecture of Fedlearn-Algo showing the separation between platform and user implementations.

The platform utilizes a gRPC-based communication module with uniform RequestMessage and ResponseMessage structures. This standardization enables the seamless transfer of complex data types—such as matrices and vectors—across machines. To manage the multi-stage nature of federated training, the system uses a phase_id pattern, which automatically maps communication rounds to the appropriate local computation functions.

Privacy-Preserving Algorithms

The platform introduces two novel, high-performance VFL implementations:

  1. Vertical Federated Kernel Binary Classification: This algorithm utilizes Random Fourier Features (RFF) to approximate kernel mappings. By projecting data into a high-dimensional randomized space locally, it achieves two goals: it enables efficient linear modeling of non-linear patterns and serves as a privacy layer by obfuscating raw features before any data leaves the local machine.
  2. Vertical Federated Random Forest: To build decision trees across parties, Fedlearn-Algo uses Homomorphic Encryption (HE) specifically for labels. This allows "passive" parties (those without labels) to calculate necessary statistics and contribute to tree construction without ever accessing the ground-truth data.

Key Insights and Results

A core philosophy of Fedlearn-Algo is that approximation can serve as a privacy mechanism. Using RFF for kernel methods is not just a speed optimization; it is a fundamental way to protect data. Furthermore, the platform's batch-based kernel algorithm is designed to be more efficient than traditional stochastic-based VFL methods by significantly reducing the number of communication rounds required for convergence.

The primary contribution of this work is the open-source platform itself, which provides a "pipeline template" for the community. By standardizing the VFL workflow, Fedlearn-Algo lowers the barrier to entry for industrial collaboration where complementary data features are the key to building superior models.

Future Directions

While Fedlearn-Algo provides a robust foundation, the development roadmap includes several critical enhancements. Currently, the system relies on synchronous communication, which can be limited by the slowest participant. Future iterations will introduce asynchronous support and more complex decentralized network topologies.

The broad ecosystem of Fedlearn-Algo, including supported algorithms and foundational modules.

As shown in the framework overview, the team plans to expand the toolkit to include Differential Privacy (DP), Secure Multi-Party Computation (SMPC), and specialized modules for Computer Vision (CV) and Natural Language Processing (NLP), further solidifying Fedlearn-Algo as a comprehensive ecosystem for privacy-preserving machine learning.

Source Code: https://github.com/fedlearnAI/fedlearn-algo

Summary updated

Abstract

In this paper, we present Fedlearn-Algo, an open-source privacy preserving machine learning platform. We use this platform to demonstrate our research and development results on privacy preserving machine learning algorithms. As the first batch of novel FL algorithm examples, we release vertical federated kernel binary classification model and vertical federated random forest model. They have been tested to be more efficient than existing vertical federated learning models in our practice. Besides the novel FL algorithm examples, we also release a machine communication module. The uniform data transfer interface supports transferring widely used data formats between machines. We will maintain this platform by adding more functional modules and algorithm examples. The code is available at https://github.com/fedlearnAI/fedlearn-algo.
BibTeX
@misc{liu2021fedlearn,
  author = {Bo Liu and Chaowei Tan and Jiazhou Wang and Tao Zeng and Huasong Shan and Houpu Yao and Heng Huang and Peng Dai and Liefeng Bo and Yanqing Chen},
  title = {{Fedlearn-Algo: A flexible open-source privacy-preserving machine learning platform}},
  year = {2021},
  eprint = {2107.04129},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.04129},
}
Figure