FL Explainer

Guardora VFL Demo for PC

for the Demo Version of the Software

Guardora VFL Demo is a free Python project that lets ML engineers run Vertical Federated Learning on their own data without sharing records.

The demo trains linear, logistic, or softmax regression on tabular data, uses

Paillier homomorphic encryption for gradients, and is published on GitHub at github.com/guardora-ai/Guardora-VFL-demo ncludes a training dataset for hands-on exploration — ideal for evaluating VFL before committing to a production deployment.

Guardora VFL Demo is a free Python project that lets ML engineers run Vertical Federated Learning on their own data without sharing records.

The demo trains linear, logistic, or softmax regression on tabular data, uses

Paillier homomorphic encryption for gradients, and is published on GitHub at github.com/guardora-ai/Guardora-VFL-demo ncludes a training dataset for hands-on exploration — ideal for evaluating VFL before committing to a production deployment.

value

Easy start with Python

01

value

Vertical federated learning of a logistic regression model with built-in cryptographic protection

02

value

Includes a training dataset to explore features and capabilities

03

value

The project is ready for application to solve your practical tasks

04

The provided Demo enables Vertical Federated Learning among multiple participants (two or more) without needing to share the actual data for:

The exchange of metadata required for model training is cryptographically secured, ensuring the confidentiality of each participant's data and target labels.

Linear regression model

Linear regression model

Logistic regression model for binary classification

Logistic regression model for binary classification

Softmax regression for multiclass classification

Softmax regression for multiclass classification

Downloading the project and
installing dependencies

1.  Make sure that Python 3 version 3.9 or higher is installed on your computer

2.  Make sure that the standard pip package manager is installed on the computer

3.  Download the project hosted on GitHub from the link: https://github.com/guardora-ai/Guardora-VFL-demo

4.  Go to the project folder

5.  Install requirements

6.  For questions and feedback, please use the #federated-learning channel in Guardora's Discord Community or email iam@guardora.ai

python violet

SSL/TLS Usage
(available only for two participants, in other cases, use the -ns flag)

By default, communication channels between participants are protected using SSL/TLS encryption based on certificates. This feature can be disabled by specifying the appropriate command-line parameter during training initialization. For encryption, certificates are required.

Examples are provided in the folder, suitable for experimental training on localhost. Custom certificates for other participants can also be used by specifying their paths in the command line.

If no ready-made certificates are available, self-signed certificates and keys can be generated using the script, executed with the command:

Here, represents an IP address or domain name. Generated certificate and key file paths must then be provided in the training initialization command.

12345

// Type some code ->

Training Process

Passive Participants 
(No Target Labels)

Each participant without the target label should execute the VFL_server.py script with the following parameters

-i

<Participant ID (e.g., sequential number); default: 1>

-p

<Port number for network connections during training; default: 50055>

-t

<Path to the participant's training dataset (CSV format); default: train file in the 'data' folder>

-v

<Path to the participant's test/validation dataset (CSV format); default: test file in the 'data' folder>

-d 

<Name of the column containing record IDs; default: 'ID'>

-f

<Fraction of randomly selected records from the training and test datasets for model training; default: 0.5>

-ns

<Flag to disable SSL/TLS encryption (optional); by default, SSL/TLS encryption is enabled>

-cp 

<Path to the server certificate for SSL/TLS encryption; default: 'cert/127.0.0.1.crt'>

-kp 

<Path to the server key for SSL/TLS encryption; default: 'cert/127.0.0.1.key'>

Active Participant 
(With Target Labels)

The participant possessing the target labels must configure the training parameters in a configuration file (example provided in the config folder). Steps include:

01

Define Passive Participants:

Specify id, IP address (or domain name), and port for each passive participant. Ensure the port matches the one used when running VFL_server.py for the corresponding participant, and the IP address/domain matches the certificate (if SSL/TLS is enabled).

02

Set Training Parameters:

Specify the learning_rate and number of epochs.

03

Set Binary Classification Threshold:

Define the threshold values for
inference.

04

Set Encryption Key Length:

Specify the key length (in bits) for the Paillier cryptosystem.

05

Run Training Script:

Execute the VFL_client.py script with the following parameters:

-c

<Path to the configuration file; default: 'config/config.conf'>

-m

<Type of model: 'linear', 'logistic', or 'softmax'; default: 'softmax'>

-t

<Path to the training dataset (CSV format); default: train file in 'data' folder>

-v

<Path to the test/validation dataset (CSV format); default: test file in 'data' folder>

-d

<Name of the column containing record IDs; default: 'ID'>

-y

<Name of the column containing the target labels; default: 'y'>

-f

<Fraction of randomly selected records for training/testing; default: 0.5>

-ns

<Flag to disable SSL/TLS encryption (optional); by default, SSL/TLS encryption is enabled>

-cp

<Path to the server certificate for SSL/TLS encryption; default: 'cert/127.0.0.1.crt'>

-kp

<Path to the server key for SSL/TLS encryption; default: 'cert/127.0.0.1.key'>

-rp

<Path to the root certificate for SSL/TLS encryption; default: 'cert/rootCA.crt'>

Inference

After training, each participant retains the parameters of the global model relevant to their data. During inference, each participant loads their respective model parameters and performs inference on their records.

FAQ

What is Guardora VFL Demo?
Guardora VFL Demo is a free, publicly available Python implementation of Vertical Federated Learning. It lets two or more participants jointly train a regression model — linear, logistic (binary classification), or softmax (multiclass classification) — without transferring their raw data between parties. Metadata required for training (gradients, model parameters) is exchanged in cryptographically protected form. The demo includes a sample training dataset for hands-on experimentation. Source code is hosted on GitHub at github.com/guardora-ai/Guardora-VFL-demo.
What models does Guardora VFL Demo support?
The demo supports three model architectures suitable for tabular data: Linear regression (continuous target prediction), Logistic regression (binary classification — for example, default / no-default in credit scoring), and Softmax regression (multiclass classification — for example, Low / Standard / High credit ratings). Model type is selected at training startup via the `-m` command-line flag with values `linear`, `logistic`, or `softmax`. Default is `softmax`.
What are the system requirements to run Guardora VFL Demo?
Minimum requirements: Python 3.9 or higher, pip (standard Python package manager), and Git to clone the repository. The demo runs on Linux, macOS, and Windows. No GPU is required — training is CPU-based for the demo scale. For multi-participant training, each party needs network access to the others (either local network for testing, or routable IPs/domains for distributed deployments).
How do I install Guardora VFL Demo?
Four steps:
1. verify Python 3.9+ and pip are installed;
2. clone the GitHub repository: `git clone https://github.com/guardora-ai/Guardora-VFL-demo`;
3. change directory into the project folder;
4. install dependencies via pip (the project includes a requirements file). After installation, the demo is ready to run with the provided sample dataset, or you can substitute your own CSV data files.
How do I run training with the demo?
Training requires running two scripts on participating machines. Passive participants (without target labels) run `VFL_server.py` with flags for participant ID (`-i`), port (`-p`), training/test data paths (`-t`, `-v`), record ID column name (`-d`), random sample fraction (`-f`), and SSL/TLS certificate paths (`-cp`, `-kp`). The active participant (with target labels) configures the training parameters in `config/config.conf` (learning rate, epochs, classification threshold, Paillier key length) and runs `VFL_client.py` with flags for config path (`-c`), model type (`-m`), data paths, label column name (`-y`), and certificates.
What is the difference between active and passive participants?
A passive participant holds features but no target labels — typically an analytics vendor or feature partner. A passive participant runs `VFL_server.py` and waits for training requests from the active side. An active participant holds the target labels (the variable being predicted) and orchestrates the training run. The active participant runs `VFL_client.py`, defines training hyperparameters, and aggregates gradients from passive participants. In a credit scoring scenario, the bank is the active participant (holds creditworthiness labels) and the data vendor is passive.
Is the communication between participants encrypted?
Yes — two layers of encryption. SSL/TLS protects the communication channel between participants using certificates (default `cert/127.0.0.1.crt` and `cert/127.0.0.1.key`). The demo includes self-signed certificate examples for localhost testing; custom certificates can be specified via `-cp` and `-kp` flags. Paillier homomorphic encryption protects gradient values exchanged during training — key length is configurable in the config file. SSL/TLS can be disabled with `-ns` flag for testing scenarios with 3+ participants.
Where can I get help with the demo?
Two community channels.
Guardora Discord community — join via https://discord.com/invite/jQxXnUKYdH and ask in the `#federated-learning` channel.
Email Guardora directly at iam@guardora.ai for questions, feedback, or to discuss moving from demo to a commercial Guardora VFL deployment. The Discord channel is monitored by Guardora engineers and is the fastest path for technical questions about the demo implementation.