https://github.com/kitsuyaazuma/dsflplus
The implementation of DS-FL+ (Energy-based Knowledge Distillation for Communication-Efficient Federated Learning, IEICE 2024 student poster session).
https://github.com/kitsuyaazuma/dsflplus
federated-learning fedlab knowledge-distillation ood-detection pytorch
Last synced: 4 months ago
JSON representation
The implementation of DS-FL+ (Energy-based Knowledge Distillation for Communication-Efficient Federated Learning, IEICE 2024 student poster session).
- Host: GitHub
- URL: https://github.com/kitsuyaazuma/dsflplus
- Owner: kitsuyaazuma
- Created: 2024-01-12T05:42:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-14T01:32:04.000Z (over 1 year ago)
- Last Synced: 2026-01-20T06:44:32.210Z (4 months ago)
- Topics: federated-learning, fedlab, knowledge-distillation, ood-detection, pytorch
- Language: Python
- Homepage: https://kitsuyaazuma.github.io/DSFLplus/
- Size: 5.42 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://pycqa.github.io/isort/) [](https://github.com/psf/black) [](http://mypy-lang.org/)
# DS-FL+
> [!NOTE]
> The implementation of **DS-FL+** (Energy-based Knowledge Distillation for Communication-Efficient Federated Learning, IEICE 2024 student poster session) is available [here](https://github.com/Kitsuya0828/DSFLplus/tree/v1.0.0).
This is the implementation of **DS-FL+** (Energy-based Thresholding and Knowledge Distillation for Communication-Efficient Federated Learning on Non-IID Data).
## Requirements
* Python version: `3.10.13`
* CUDA version: `11.6`
## Setup
```bash
git clone https://github.com/Kitsuya0828/DSFLplus.git
cd DSFLplus
conda env create -f env.yaml
conda activate dsflplus
# or
# https://pytorch.org/get-started/previous-versions/
conda create -n dsflplus python=3.10.13
conda activate dsflplus
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116
pip install black fedlab gdown isort matplotlib mypy pandas plotly tensorboard
```
## Run
```bash
cd src
python main.py --help
# or
python main.py \
--algorithm=dsflplus \
--task=cifar10 \
--partition=shards \
--num_shards_per_client=2 \
--seed=42 \
--public_private_split=even_class \
--private_size=40000 \
--public_size=10000 \
--public_size_per_round=1000 \
--sample_ratio=1.0 \
--com_round=1000 \
--temperature=0.1 \
--total_clients=100 \
--batch_size=100 \
--epochs=5 \
--lr=0.1 \
--kd_epochs=5 \
--kd_batch_size=100 \
--kd_lr=0.1 \
--ood_detection_score=energy \
--ood_detection_threshold_delta=0.0025 \
--test_batch_size=500 \
--comment=shards_energy_delta00025
```