Skip to content

Ultraman6/CFLF

Repository files navigation

CFLF

Federated Learning Experimentation and Visualization System

GitHub Language

📜 项目简介

本项目致力于复现联邦学习领域内的重要算法,并进行对比实验。通过高度模块化和可扩展的代码结构,实现对不同联邦学习算法的快速迭代和测试。 进一步,本项目还旨在建立一个联邦学习可视化系统,以增强算法理解和分析效率。

✨ 项目特性

  • 🔄 算法复现:复现了诸如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

主要路径

🚀 快速开始

  1. Clone the repository locally:
git clone https://github.com/your_github/FL-Experiment.git
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the main program:
python constant.py --args

📓 复现记录

Paper: FedFAIM: a model performance-based fair incentive mechanism for federated learning

梯度聚合

  • 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:

运行结果 img.png 虽然算法部分已经和原文对齐,但实验结果与原文对比,有以下待解决问题:

  1. FedFAIM算法到最后的表现远不如其他的算法,需要搞清楚是不是梯度定制的问题
  2. 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:

FAIR全配置在niid场景下:客户数30;样本量[100,1000];报价[1,3];预算20 img_1.png

License

该项目基于Apache-2.0 License许可证开源
This project is released under the Apache-2.0 License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages