本项目致力于复现联邦学习领域内的重要算法,并进行对比实验。通过高度模块化和可扩展的代码结构,实现对不同联邦学习算法的快速迭代和测试。 进一步,本项目还旨在建立一个联邦学习可视化系统,以增强算法理解和分析效率。
- 🔄 算法复现:复现了诸如FedAvg, FedFAIM等联邦学习核心算法。
- 📊 性能对比:提供了标准化的性能对比工具,可直观比较不同算法。
- 📈 可视化系统:开发了可视化工具,以图形方式显示训练进度和结果。
- 🛠 模块化设计:代码结构清晰,模块化设计便于扩展和维护。
- 📝 扩展升级:框架设计考虑了联邦学习的潜在算法与应用的扩展。
CFLF/
├── algo/
│ ├── base/
│ │ ├── client.py
│ │ └── server.py
│ ├── integrity/
│ │ ├── your integrities/
│ │ └── ...
│ └── method/
│ │ ├── your methods/
│ │ └── ...
├── data/
│ ├── dataset/
│ │ ├── your datasets.py
│ │ └── ...
│ ├── utils/
│ │ ├── distribution.py
│ │ ├── parition.py
│ │ └── visualization.py
│ └── get_data.py
├── datasets/
│ ├── your dataset folders/
│ └── ...
├── model/
│ ├── base/
│ ├── your models/
│ ├── ...
│ └── initialization.py
├── experiment/
│ ├── your experiments/
│ ├── ...
│ └── option.py
├── utils/
│ ├── drawing.py
│ ├── generator.py
│ ├── logging.py
│ ├── running.py
│ └── task.py
├── result/
│ ├── your results/
│ └── ...
├── Visual Interactive SubSystem/
│ └── comming soon...
│── README.py
└── requirements.txt
- Clone the repository locally:
git clone https://github.com/your_github/FL-Experiment.git
- Install dependencies:
pip install -r requirements.txt
- Run the main program:
python constant.py --args
- FedAvg:
- Approach: Built client and server models based on the original paper description.
- Challenges: Encountered issues with inconsistent weights during model aggregation.
- Outcome: Successfully addressed the issue and replicated performance similar to the original paper.
- FedFAIM:
- Approach: add gradient aggreation, contribution assessment, reaward allocation on fedavg.
- Challenges: Encountered issues with inconsistent weights during model aggregation.
- Outcome: Successfully addressed the issue and replicated performance similar to the original paper.
- FairAvg:
- Approach:
- Challenges:
- Outcome:
- FedQD:
- Approach:
- Challenges:
- Outcome:
运行结果
虽然算法部分已经和原文对齐,但实验结果与原文对比,有以下待解决问题:
- FedFAIM算法到最后的表现远不如其他的算法,需要搞清楚是不是梯度定制的问题
- niid场景下所有算法的精度过于高,需要检验
- CI:
- Approach:
- Challenges:
- Outcome:
- TMC-Shapley:
- Approach:
- Challenges:
- Outcome:
- GTB:
- Approach:
- Challenges:
- Outcome:
- COS-SIM:
- Approach:
- Challenges:
- Outcome:
- CFFL:
- Approach:
- Challenges:
- Outcome:
- RFFL:
- Approach:
- Challenges:
- Outcome:
Paper: Improving_Federated_Learning_With_Quality-Aware_User_Incentive_and_Auto-Weighted_Model_Aggregation
- 模型:
- Approach:
- Challenges:
- Outcome:
- 数据集:
- Approach:
- Challenges:
- Outcome:
- FedQD:
- Approach:
- Challenges:
- Outcome:
- FedQD:
- Approach:
- Challenges:
- Outcome:
- FedQD:
- Approach:
- Challenges:
- Outcome:
该项目基于Apache-2.0 License许可证开源
This project is released under the Apache-2.0 License.