Implicit Model Specialization through DAG-based Decentralized Federated Learning

Overview

Federated Learning DAG Experiments

This repository contains software artifacts to reproduce the experiments presented in the Middleware '21 paper "Implicit Model Specialization through DAG-based Decentralized Federated Learning"

General Usage

Since we are still using TensorFlow 1, Python <=3.7 is required.

Depending on your setup, you can obtain the old python version using a version manager such as pyenv or using a Docker container:

cd federated-learning-dag
docker run -d --name federated-learning-dag \
  -v $PWD:/workspace \
  --workdir /workspace \
  --init --shm-size 8g \
  mcr.microsoft.com/vscode/devcontainers/python:3.7-bullseye \
    tail -f /dev/null
docker exec -it federated-learning-dag bash
# Run pipenv commands in this shell

# Clean up
docker rm -f federated-learning-dag 

Then, use pipenv to set up your environment. VS Code users can use the provided devcontainer template as a base environment. Run pipenv install to download the dependencies and run the code within a pipenv shell.

There are two execution variants: A default, single-threaded one, and an extended version using the 'ray' parallelism library.

Basic usage: python -m tangle.lab --help (or python -m tangle.ray --help).

By default, all experiments_figure_[*].py use ray for parallelism. This requires lots of main memory and a shared memory option for use within Docker. VS Code devcontainer users have to add "--shm-size", "8gb" (depending on the available memory) to the runArgs in .devcontainer/devcontainer.json.

To view a DAG (sometimes called a tangle) in a web browser, run python -m http.server in the repository root and open http://localhost:8000/viewer/. Enter the name of your experiment run and adjust the round slider to see something.

Obtaining the datasets

The contents of the ./data directory can be obtained from https://data.osmhpi.de/ipfs/QmQMe1Bd8X7tqQHWqcuS17AQZUqcfRQmNRgrenJD2o8xsS/.

Reproduction of the evaluation in the paper

The experiements in the paper can be reproduced by running python scripts in the root folder of this repository. They are organized by the figures in which the respective evaluation is presented and named experiments_figure_[*].py

The results of the federated averaging runs presented in Figure 9 as baseline can be reproduced by running run_fed_avg_[fmnist,poets,cifar].py The results presented in Table 2 are generated by the scripts for DAG-IS of Figure 9 as well.

You might also like...
A Peer-to-peer Platform for Secure, Privacy-preserving, Decentralized Data Science
A Peer-to-peer Platform for Secure, Privacy-preserving, Decentralized Data Science

PyGrid is a peer-to-peer network of data owners and data scientists who can collectively train AI models using PySyft. PyGrid is also the central serv

Vertical Federated Principal Component Analysis and Its Kernel Extension on Feature-wise Distributed Data based on Pytorch Framework
Vertical Federated Principal Component Analysis and Its Kernel Extension on Feature-wise Distributed Data based on Pytorch Framework

VFedPCA+VFedAKPCA This is the official source code for the Paper: Vertical Federated Principal Component Analysis and Its Kernel Extension on Feature-

A python-image-classification web application project, written in Python and served through the Flask Microframework. This Project implements the VGG16 covolutional neural network, through Keras and Tensorflow wrappers, to make predictions on uploaded images.
FedJAX is a library for developing custom Federated Learning (FL) algorithms in JAX.

FedJAX: Federated learning with JAX What is FedJAX? FedJAX is a library for developing custom Federated Learning (FL) algorithms in JAX. FedJAX priori

An open framework for Federated Learning.
An open framework for Federated Learning.

Welcome to Intel® Open Federated Learning Federated learning is a distributed machine learning approach that enables organizations to collaborate on m

Official code implementation for
Official code implementation for "Personalized Federated Learning using Hypernetworks"

Personalized Federated Learning using Hypernetworks This is an official implementation of Personalized Federated Learning using Hypernetworks paper. [

[ICLR'21] FedBN: Federated Learning on Non-IID Features via Local Batch Normalization
[ICLR'21] FedBN: Federated Learning on Non-IID Features via Local Batch Normalization

FedBN: Federated Learning on Non-IID Features via Local Batch Normalization This is the PyTorch implemention of our paper FedBN: Federated Learning on

[CVPR'21] FedDG: Federated Domain Generalization on Medical Image Segmentation via Episodic Learning in Continuous Frequency Space
[CVPR'21] FedDG: Federated Domain Generalization on Medical Image Segmentation via Episodic Learning in Continuous Frequency Space

FedDG: Federated Domain Generalization on Medical Image Segmentation via Episodic Learning in Continuous Frequency Space by Quande Liu, Cheng Chen, Ji

Personalized Federated Learning using Pytorch (pFedMe)
Personalized Federated Learning using Pytorch (pFedMe)

Personalized Federated Learning with Moreau Envelopes (NeurIPS 2020) This repository implements all experiments in the paper Personalized Federated Le

Owner
Operating Systems and Middleware Group
Operating Systems and Middleware Group
PyTorch implementation of Federated Learning with Non-IID Data, and federated learning algorithms, including FedAvg, FedProx.

Federated Learning with Non-IID Data This is an implementation of the following paper: Yue Zhao, Meng Li, Liangzhen Lai, Naveen Suda, Damon Civin, Vik

Youngjoon Lee 48 Dec 29, 2022
TianyuQi 10 Dec 11, 2022
The official implementation of the research paper "DAG Amendment for Inverse Control of Parametric Shapes"

DAG Amendment for Inverse Control of Parametric Shapes This repository is the official Blender implementation of the paper "DAG Amendment for Inverse

Elie Michel 157 Dec 26, 2022
source code for 'Finding Valid Adjustments under Non-ignorability with Minimal DAG Knowledge' by A. Shah, K. Shanmugam, K. Ahuja

Source code for "Finding Valid Adjustments under Non-ignorability with Minimal DAG Knowledge" Reference: Abhin Shah, Karthikeyan Shanmugam, Kartik Ahu

Abhin Shah 1 Jun 3, 2022
JAX code for the paper "Control-Oriented Model-Based Reinforcement Learning with Implicit Differentiation"

Optimal Model Design for Reinforcement Learning This repository contains JAX code for the paper Control-Oriented Model-Based Reinforcement Learning wi

Evgenii Nikishin 43 Sep 28, 2022
Implicit MLE: Backpropagating Through Discrete Exponential Family Distributions

torch-imle Concise and self-contained PyTorch library implementing the I-MLE gradient estimator proposed in our NeurIPS 2021 paper Implicit MLE: Backp

UCL Natural Language Processing 249 Jan 3, 2023
FedScale: Benchmarking Model and System Performance of Federated Learning

FedScale: Benchmarking Model and System Performance of Federated Learning (Paper) This repository contains scripts and instructions of building FedSca

null 268 Jan 1, 2023
Decentralized Reinforcment Learning: Global Decision-Making via Local Economic Transactions (ICML 2020)

Decentralized Reinforcement Learning This is the code complementing the paper Decentralized Reinforcment Learning: Global Decision-Making via Local Ec

null 40 Oct 30, 2022
Code to go with the paper "Decentralized Bayesian Learning with Metropolis-Adjusted Hamiltonian Monte Carlo"

dblmahmc Code to go with the paper "Decentralized Bayesian Learning with Metropolis-Adjusted Hamiltonian Monte Carlo" Requirements: https://github.com

null 1 Dec 17, 2021
Everything you want about DP-Based Federated Learning, including Papers and Code. (Mechanism: Laplace or Gaussian, Dataset: femnist, shakespeare, mnist, cifar-10 and fashion-mnist. )

Differential Privacy (DP) Based Federated Learning (FL) Everything about DP-based FL you need is here. (所有你需要的DP-based FL的信息都在这里) Code Tip: the code o

wenzhu 83 Dec 24, 2022