Vertical Federated Learning Using Multi-Server Secret Sharing
FedMod is a lightweight, scalable, and privacy-preserving framework for Vertical Federated Learning (VFL) based on n-out-of-n additive secret sharing. Unlike traditional VFL approaches that rely on heavy cryptographic operations or trusted third parties, FedMod ensures data privacy through a multi-server secret sharing architecture—offering a practical solution that combines strong privacy with low computational and communication overhead.
In vertical federated learning, multiple organizations holding different features of the same users collaborate to train machine learning models without sharing their sensitive data. FedMod addresses the privacy and scalability challenges inherent in this setting by:
- Eliminating the need for encryption or secure hardware.
- Using additive secret sharing to protect intermediate computations.
- Enabling secure model training for both regression and classification tasks.
- Achieving accuracy comparable to non-secure baselines while significantly reducing computation time and communication cost.
We evaluated FedMod on several real-world datasets, demonstrating its competitive performance against state-of-the-art approaches such as Homomorphic Encryption (HE), Differential Privacy (DP), and Functional Encryption (FE).
An illustration of FedMod's multi-party, multi-server architecture protecting intermediate computations using additive secret sharing.
FedMod achieves high accuracy with significantly lower computation time compared to other secure VFL methods.
FedMod demonstrates lower communication overhead than existing approaches, particularly on smaller batch sizes.
Learning curves comparison across different datasets and methods: FedMod, No Security, DP, HE, and CZOFO. Lines are plotted using values from every 5 epochs.
This guide explains how to reconstruct the Conda environment and run the code, including how to select datasets and adjust parameters.
-
Create the environment: conda env create -f environment.yml
-
Activate the environment: conda activate
-
Create an empty environment: conda create --name python=
-
Install dependencies: conda install --name --file requirements.txt
-
Activate the environment: conda activate
-
Run the main program: The code can be executed by running the
main.pyfile. Use the following command to run it:python main.py
-
Select the dataset: In the
main.pyfile, you can specify which dataset to use by setting the corresponding dataset flag toTrue. Ensure only the dataset you want to run is set toTrue. -
Modify parameters: Parameters for running the code, such as learning rate or model settings, can be adjusted for each individual dataset in the
main.pyfile.
By default, only the FedMod approach will be executed when the program is initiated. If you want to run additional approaches, such as Homomorphic Encryption (HE), Functional Encryption (FE), Differential Privacy (DP), FedV, or Centralized, you will need to modify the main.py file.
-
Uncomment the desired approaches: In the
main.pyfile, locate the list calledall_results. The code sections corresponding to the approaches you want to run (e.g., HE, FE, DP, FedV, Centralized) should be uncommented. -
Update the
name_list: Similarly, in the list calledname_list, add the names of the approaches you want to run.
- Some parameters, such as the learning rate, batch size, and number of epochs, can be specified individually for each dataset directly within the
main.pyfile. Be sure to configure these parameters based on your dataset before running the code.