This notebook was developed for my Master's project "MSAI/21/017 - IMPLEMENTING A GENERAL FRAMEWORK FOR PARTICIPANT’S CONTRIBUTION CALCULATION IN FEDERATED LEARNING". The aim of the project is to develop a system that will test the effectiveness of profit allocation using Shapley Value in Horizontal Federated Learning systems. We recommend running this notebook in Google Colab.
To run this program, open the fed-sv-playground.ipynb
in any Jupyter notebook-enabled environment (We recommend Google Colab). Be advised that the program will delete .pt models from previous runs.
The system has the following customizable functions:
- Dataset
- MNIST
- EMNIST
- Neural Network Model Size
- Small MLP
- Medium MLP
- Large MLP
- Contribution Metrics / Reward Function
- Loss
- Accuracy
- F1
- Individual Client Behaviour
- Normal
- Free-rider (No training done)
- Adversarial (Randomize weights + bias)
- Client Dataset Distribution (IID)
- IID
- Non-IID 1 (Overlapping sample sets)
- Non-IID 2 (Unequal data distribution)
- Non-IID 1+2
Once the program completes, it will output the following data:
- Performance measures: Loss, Acc, F1, Evaluation timing
- SV rewards per round
- Client-server training timings
- User-defined folders with the trained client and server models