Skip to content

2.5.0: Latest release with features and bug fixes

Compare
Choose a tag to compare
@IsaacYangSLA IsaacYangSLA released this 09 Sep 21:13
· 137 commits to main since this release
bff1d69

What's new

https://nvflare.readthedocs.io/en/main/whats_new.html
https://nvidia.github.io/NVFlare/

  • User Experience Improvements
    NVFlare 2.5.0 offers several new sets of APIs that allows for end-to-end ease of use that can greatly improve researcher and data scientists’ experience working with FLARE. The new API covers client, server and job construction with end-to-end pythonic user experience.

  • Model Controller API
    The new ModelController API greatly simplifies the experience of developing new federated learning workflows. Users can simply subclass the ModelController to develop new workflows. The new API doesn’t require users to know the details of NVFlare constructs except for FLModel class, where it is simply a data structure that contains model weights, optimization parameters and metadata.

You can easily construct a new workflow with basic python code, and when ready, the send_and_wait() communication function is all you need for communication between clients and server.

Using this in-process client API, we build a ScriptExecutor, which is directly used in the new Job API.

Compared with SubProcessLauncherClientAPI, the in-process client API offers better efficiency and is easier to configure. All the operations will be carried out within the memory space of the executor.

SubProcessLauncherClientAPI can be used for cases where a separate training process is required.

  • Job API
    The new Job API, or FedJob API, combined with Client API and Model Controller API, will give users an end-to-end pythonic user experience. The Job configuration, required prior to the current release, can now be directly generated automatically, so the user doesn’t need to edit the configuration files manually.

We provide many examples to demonstrate the power of the new Job APIs making it very easy to experiment with new federated learning algorithms or create new applications.

  • Flower Integration
    Integration between NVFlare and the Flower framework aims to provide researchers the ability to leverage the strengths of both frameworks by enabling Flower projects to seamlessly run on top of NVFlare. Through the seamless integration of Flower and FLARE, applications crafted within the Flower framework can effortlessly operate within the FLARE runtime environment without necessitating any modifications. This initial integration streamlines the process, eliminating complexities and ensuring smooth interoperability between the two platforms, thus enhancing the overall efficiency and accessibility of FL applications. Please find details here. A hello-world example is available here.

  • Secure XGBoost
    The latest features from XGBoost introduced the support for secure federated learning via homomorphic encryption. For vertical federated XGBoost learning, the gradients of each sample are protected by encryption such that the label information will not be leaked to unintended parties; while for horizontal federated XGBoost learning, the local gradient histograms will not be learnt by the central aggregation server.

With our encryption plugins working with XGBoost, NVFlare now supports all secure federated schemes for XGBoost model training, with both CPU and GPU.

Please check federated xgboost with nvflare user guide https://nvflare.readthedocs.io/en/main/user_guide/federated_xgboost.html and the example

  • Tensorflow support

With community contributions, we add FedOpt, FedProx and Scaffold algorithms using Tensorflow. You can check the code here and the example

  • FOBS Auto Registration
    FOBS, the secure mechanism NVFlare uses for message serialization and deserialization, is enhanced with new auto registration features. These changes will reduce the number of decomposers that users have to register. The changes are:

Auto registering of decomposers on deserialization. The decomposer class is stored in the serialized data and the decomposers are registered automatically when deserializing. If a component only receives serialized data but it doesn’t perform serialization, decomposer registering is not needed anymore.

Data Class decomposer auto registering on serialization. If a decomposer is not found for a class, FOBS will try to treat the class as a Data Class and register DataClassDecomposer for it. This works in most cases but not all.

How to perform Kaplan-Meier survival analysis in a federated setting without and with secure features via time-binning and Homomorphic Encryption (HE).

How to use the Flare ModelController API to contract a workflow to facilitate HE under simulator mode.

BioNemo example for Drug Discovery
BioNeMo is NVIDIA’s generative AI platform for drug discovery. We included several examples of running BioNeMo in a federated learning environment using NVFlare:

The task fitting example includes a notebook that shows how to obtain protein-learned representations in the form of embeddings using the ESM-1nv pre-trained model.

The downstream example shows three different downstream tasks for fine-tuning a BioNeMo ESM-style model.

Federated Logistic Regression with NR optimization
The Federated Logistic Regression with Second-Order Newton-Raphson optimization example shows how to implement a federated binary classification via logistic regression with second-order Newton-Raphson optimization.

Hierarchical Federated Statistics
Hierarchical Federated Statistics is helpful when there are multiple organizations involved. For example, in the medical device applications, the medical devices usage statistics can be viewed from both device, device-hosting site, and hospital or manufacturers’ point of views. Manufacturers would like to see the usage stats of their product (device) in different sites and hospitals. Hospitals may like to see overall stats of devices including different products from different manufacturers. In such a case, the hierarchical federated stats will be very helpful.

FedAvg Early Stopping Example
The FedAvg Early Stopping example tries to demonstrate that with the new server-side model controller API, it is very easy to change the control conditions and adjust workflows with a few lines of python code.

Tensorflow Algorithms & Examples
FedOpt, FedProx, Scaffold implementation for Tensorflow.

FedBN: Federated Learning on Non-IID Features via Local Batch Normalization
The FedBN example showcases a federated learning algorithm designed to address the feature shift problem when aggregating models across different data distributions.

In this work, we propose an effective method that uses local batch normalization to alleviate the feature shift before averaging models. The resulting scheme, called FedBN, outperforms both classical FedAvg and FedProx on our extensive experiments. These empirical results are supported by a convergence analysis that shows in a simplified setting that FedBN has a faster convergence rate than FedAvg.

End-to-end Federated XGBoost examples
In this example, we try to show that end-to-end process of feature engineering, pre-processing and training in federated settings. You can use FLARE to perform federated ETL and then training.

Developer Tutorial Page
To let users quickly learn Federated Learning with FLARE, we developed a tutorial web page with both code and video to interactively learn how to convert and run FL in a few minutes. We also created a tutorial catalog to help you easily search and find the examples you are interested in.

What's Changed

New Contributors

Full Changelog: 2.4.0...2.5.0