Skip to content

Federated Learning / Swarm Learning Engine Module and Experiments for medical research.

Notifications You must be signed in to change notification settings

jaysontree/fedv_learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

This repo contains

  • A new blockchain-based swarm learning network for privacy-preserving artificial intelligence in evaluation of tibial plateau fracture(TPF)
  • An Up-to-date FL/SL Learning Engine Module, which supports swarm learning/federated learning on Computer Vision Tasks.

About Swarm Learning Study

Paper:

To be announced.

Background
  • Computer vision technology are developing fast and AI-assisted medical diagnose are promising. Training a reliable model usually requires a large size of dataset. Collecting medical data can be diffcult and violate privacy.
  • Swarm Learning allows multiple parties to collaborate in training model while keeping their data private.

This project proposed a swarm learning solution and verified the effectiveness of swarm-learning model compared with centralized model.

Scripts, Data and Results

please see Experiment


About Engine Module

Background/motivation of FedV

FedV is aimed to provide swarm learning / federated learning abilities with industry-level/cutting-edge cv models in a more flexiable FL framework. This project is inspired by FedVision and Wefe-VisualFL. The basic idea and a small part of code is inherited from these two projects. Although these two projects provide federated learning modules for cv tasks, they are both based on PaddleFL, which seems to be outdated and nolonger mantained. FedV(this project) uses a modified version of parameter-server framework(Flower), targeting to intergrate with privacy computation platform for enhanced security measures, and support a batch of deep learning algorithms.

Architecture

FedV provides services to handle computer-vision swarm learning/federated learning tasks. It works as a plug in module for privacy computation platform. It can be deployed independently and bind with platform node. The privacy computation platform works as a manager and scheduler, which will manage participants, collect configurations, distribute dataset, and coordinate all participants then call FedV to initiate cv tasks for each participates. arch FedV Master servicer handles request and convert request to local task. then submit to task queue. worker servicer is the consumer, execute process to run the task. When Database enabled, it will verify, synchronize task status/progress to the database. The results/metrics are also writen to database. arch

Learning workflow

The core workflow follows the parameter-server architecture. A process is as follows

graph TD
    A(((Member A))) --apply--> A1[1. initiate resource]
    A1 --callback resource--> A
    A1 --> A2[2. start secure aggreagtor/key exchanger]
    A --submit--> A3[3.1 start training client]
    A -..-> B(((Member B)))
    B --submit--> B1[3.2 start training client]
    A2 --> A4{{aggregator}}
    A3 --> A5{{train client}}
    B1 --> B2{{train client}}
    A5 <-.sync.-> A4
    B2 <-.sync.-> A4
Loading

Fedv also provides APIs to converage the whole lifecycle of trained models, such as validation workflow and inference workflow.

At current stage,

  • The Privacy Compuating Platform is not open sourced. Please use Wefe platform as a reference of privacy compuation platform.
  • Features/functions which works with Privacy Computation Platform, such as dynamic aggregator are not released now.
Quick start

Containered Build & Deploy

export DOCKER_BUILDKIT=1
docker build . -t {imagename} -f Deploy/Dockerfile_cpu # CPU Version
# docker build . -t {imagename} -f Deploy/Dockerfile_gpu # GPU Version
docker run -dit --restart=always -v {path to deploy_config.file}:/FedV/deploy_config.yml -v {path to db_config.file}:/FedV/config.properties --network=host --name FedV-Service {imagename}

Please refer to deploy readme

Run Examples TODO

Supported Models
  • Detection
    • YOLOv8 ✔️
    • YOLOv9 🚧
  • Classification
    • Resnet(18,34,50,101) ✔️

New models may be added if required. Anyone can add models by yourself, please refer to Flower

API

Not released at current stage

Reference Repo

This project is inspired by following great project:

About

Federated Learning / Swarm Learning Engine Module and Experiments for medical research.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published