Skip to main content
QUICK REVIEW

[论文解读] FedML Parrot: A Scalable Federated Learning System via Heterogeneity-aware Scheduling on Sequential and Hierarchical Training

Zhenheng Tang, Xiaowen Chu|arXiv (Cornell University)|Mar 3, 2023
Privacy-Preserving Technologies in DataComputer Science被引用 3
一句话总结

FedML Parrot 是一个可扩展的联邦学习系统,通过采用异构感知调度、顺序客户端训练和分布式状态管理,实现了对异构设备的大规模联邦学习高效仿真。其训练速度比 FedScale 快 1.2–4 倍,内存使用量相比 FedML 减少 10–100 倍,同时支持无代码迁移,可将仿真代码无缝迁移到生产环境,适用于有状态和无状态客户端。

ABSTRACT

Federated Learning (FL) enables collaborations among clients for train machine learning models while protecting their data privacy. Existing FL simulation platforms that are designed from the perspectives of traditional distributed training, suffer from laborious code migration between simulation and production, low efficiency, low GPU utility, low scalability with high hardware requirements and difficulty of simulating stateful clients. In this work, we firstly demystify the challenges and bottlenecks of simulating FL, and design a new FL system named as FedML exttt{Parrot}. It improves the training efficiency, remarkably relaxes the requirements on the hardware, and supports efficient large-scale FL experiments with stateful clients by: (1) sequential training clients on devices; (2) decomposing original aggregation into local and global aggregation on devices and server respectively; (3) scheduling tasks to mitigate straggler problems and enhance computing utility; (4) distributed client state manager to support various FL algorithms. Besides, built upon our generic APIs and communication interfaces, users can seamlessly transform the simulation into the real-world deployment without modifying codes. We evaluate exttt{Parrot} through extensive experiments for training diverse models on various FL datasets to demonstrate that exttt{Parrot} can achieve simulating over 1000 clients (stateful or stateless) with flexible GPU devices setting ($4 \sim 32$) and high GPU utility, 1.2 $\sim$ 4 times faster than FedScale, and 10 $\sim$ 100 times memory saving than FedML. And we verify that exttt{Parrot} works well with homogeneous and heterogeneous devices in three different clusters. Two FL algorithms with stateful clients and four algorithms with stateless clients are simulated to verify the wide adaptability of exttt{Parrot} to different algorithms.

研究动机与目标

  • 解决现有联邦学习仿真平台在支持大规模客户端仿真时,对硬件资源需求高、缺乏生产就绪能力的问题。
  • 克服现有联邦学习仿真器的瓶颈,包括高内存占用、GPU 利用率低、延迟客户端(straggler)效应严重,以及对有状态客户端支持不足。
  • 通过通用 API 和通信接口,实现仿真到真实部署的无缝迁移,无需修改代码。
  • 在同构与异构设备环境下,支持多样化的联邦学习算法,特别是需要有状态客户端的算法。

提出的方法

  • 在可用设备上按顺序调度训练客户端,以提高 GPU 利用率并减少空闲时间。
  • 将全局模型聚合分解为本地(设备级)和全局(服务器级)聚合,以降低通信开销。
  • 实现一种动态的、异构感知的调度系统,通过估计任务运行时间并在设备间均衡工作负载,缓解延迟客户端效应。
  • 引入一种分布式客户端状态管理器,持久化并管理客户端状态(如控制变量、梯度、掩码),以支持有状态联邦学习算法。
  • 设计一种通用 API 栈,抽象通信与计算逻辑,使仿真代码可直接部署到生产环境,无需任何修改。
  • 采用基于时间窗口的工作负载估计模型,实时适应设备性能的动态变化,提升调度准确性。

实验结果

研究问题

  • RQ1在 GPU 资源有限的情况下,如何实现大规模客户端联邦学习仿真的可扩展性与高效性,特别是当客户端数量庞大时?
  • RQ2哪些机制能有效降低联邦学习仿真中的通信开销和 GPU 利用率不足问题?
  • RQ3在大规模联邦学习仿真中,如何有效缓解由数据异构性引起的延迟客户端效应?
  • RQ4如何高效地仿真和部署需要持久客户端状态的有状态联邦学习算法?
  • RQ5统一的仿真框架能否在不同联邦学习算法和硬件配置下,实现从仿真到真实世界部署的无代码迁移?

主要发现

  • 在所有评估的集群和数据集上,Parrot 的训练速度比 FedScale 快 1.2–4 倍,显著提升了性能加速效果。
  • 与 FedML 相比,Parrot 将 GPU 内存使用量减少了 10–100 倍,尤其在大规模仿真场景(如 ImageNet 上 1000 个客户端)中至关重要。
  • 该系统成功仿真了 1000 个客户端,支持灵活的 GPU 配置(4–32 块 GPU),在可扩展性和效率方面优于 FedScale 和 FedML。
  • 采用时间窗口工作负载估计的调度机制,在动态环境中将训练时间最多减少 50%,优于基于静态历史数据的模型。
  • Parrot 支持有状态和无状态联邦学习算法,包括 SCAFFOLD、FedDyn、FedNova 和 Mime,其收敛性能与基线仿真相当或更优。
  • 该框架实现了从仿真到生产的无代码迁移,通过无需修改代码的无缝部署验证了所实现算法的可移植性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。