FLGo: A Fully Customizable Federated Learning Platform

Zheng Wang, Xiaoliang Fan, Zhaopeng Peng, Xueheng Li, Ziqi Yang, Mingkuan Feng, Zhicheng Yang, Xiao Liu, Cheng WangarXiv 2023 · DOI

TL;DR

Federated Learning (FL) is powerful but hard to customize for real-world scenarios. FLGo is a new, lightweight platform that makes it easy to build and share custom FL simulations with over 40 benchmarks and 20 algorithms, significantly improving reproducibility and accessibility for researchers.

What Problem Does This Paper Address?

Federated Learning (FL) is gaining traction for its privacy-preserving nature, enabling collaborative model training without centralizing sensitive data. However, evaluating FL algorithms in realistic settings is challenging. Existing FL frameworks often make it difficult to customize simulations to reflect diverse application needs, data distributions (heterogeneity), and varying network conditions or device capabilities (system heterogeneity). This complexity acts as a barrier for researchers, especially those from traditional ML backgrounds, and hinders the sharing and reproducibility of FL experiments. The paper aims to bridge this gap by providing a flexible and user-friendly platform for FL research.

Methods

FLGo tackles the customization and shareability problem by adopting a plugin-based architecture. Key components like benchmarks, algorithms, and simulators are implemented as independent plugins. This modular design allows users to easily download, use, and even contribute their own customized plugins.

  • Plugin Library: A central repository for sharing and discovering benchmarks, algorithms, and simulators.
  • User-Friendly APIs: FLGo provides simple APIs for developers to create new plugins, enabling them to integrate their specific settings with minimal effort.
  • Cross-Application & Cross-Architecture Support: The platform is designed to support a wide range of FL scenarios, including horizontal, vertical, and decentralized FL, across various data types (images, text, graphs, etc.).
  • Experimental Tools: To further streamline research, FLGo includes tools for:
  • Parallel Acceleration: Supports both runner-level (multiple experiments) and participant-level (multiple virtual clients) parallelism to speed up simulations.
  • Experiment Tracker and Analyzer: Logs experimental variables and provides tools for analysis and visualization.
  • Parameters Auto-Tuning: Automates hyperparameter optimization.

Datasets

FLGo comes with over 40 pre-built benchmarks. For evaluation, the paper uses standard datasets commonly found in FL research, including:

  • CIFAR10: For image classification.
  • Cora: For graph node classification.
  • Shakespeare: For next-character prediction.
  • FashionMNIST: For image classification.
  • SVHN: For image classification.
  • Reddit: For next-word prediction.

The paper also highlights FLGo's ability to support various data heterogeneity settings (e.g., IID, Imbalance, Dirichlet, Louvain, Diversity) through its customizable partitioner module.

Key Insights and Ideas

  • Modularity is Key: The plugin-based architecture is the core innovation, directly addressing the complexity and shareability issues in FL research. This makes FL more accessible.
  • Realistic Simulation is Crucial: The paper emphasizes that evaluating FL algorithms under realistic data and system heterogeneity is essential, as performance can vary drastically compared to idealized settings.
  • Time-Based Asynchronism: FLGo's approach to asynchronous FL, based on a global virtual clock rather than just round-wise comparisons, allows for fairer evaluation of synchronous and asynchronous methods by considering actual time costs.
  • No One-Size-Fits-All Algorithm: Experiments demonstrate that different FL algorithms perform best under different data distributions and heterogeneity settings, underscoring the need for flexible evaluation platforms like FLGo.

Key Results

The paper demonstrates FLGo's effectiveness through extensive experiments:

  • Data Heterogeneity: Results show that algorithm performance varies significantly across datasets and non-IID settings. For instance, Scaffold performed best on IID CIFAR10 but worst on Shakespeare. This highlights the need for robust evaluation across diverse conditions.
  • System Heterogeneity: Experiments reveal that client availability, completeness, connectivity, and responsiveness all negatively impact FL performance, especially when combined with data heterogeneity. FedNova, while designed to be robust, sometimes underperformed FedAvg and FedProx in specific scenarios.
  • Asynchronism: Asynchronous strategies (like FedAsync) can significantly reduce training time costs, particularly in complex heterogeneous environments. However, their model performance can sometimes lag behind synchronous methods, suggesting room for improvement in aggregation strategies.
  • Parallel Acceleration: Figure 4 shows significant speedups from both runner-level and participant-level parallelism, demonstrating FLGo's ability to handle large-scale simulations efficiently.

Limitations and Future Work

  • Current Plugin Ecosystem: While FLGo provides a framework for plugins, the breadth and depth of available community-contributed plugins are not explicitly detailed as a limitation but represent an area for future growth.
  • Algorithm Performance: The paper notes that asynchronous strategies' effectiveness can be further improved, suggesting future work in developing better aggregation mechanisms for such scenarios.
  • Future Directions: The authors implicitly suggest that FLGo's flexible architecture can be extended to support even more complex FL paradigms and real-world deployment scenarios. The platform's maintenance at flgo-xmu.github.io indicates ongoing development.

Summary updated

BibTeX
@misc{wang2023flgo,
  author = {Zheng Wang and Xiaoliang Fan and Zhaopeng Peng and Xueheng Li and Ziqi Yang and Mingkuan Feng and Zhicheng Yang and Xiao Liu and Cheng Wang},
  title = {{FLGo: A Fully Customizable Federated Learning Platform}},
  year = {2023},
  eprint = {2306.12079},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.12079},
}
Figure