FedScale: Benchmarking Model and System Performance of Federated Learning at Scale

Fan Lai, Yinwei Dai, Sanjay Sri Vallabh Singapuram, Jiachen Liu, Xiangfeng Zhu, Harsha V. Madhyastha, Mosharaf Chowdhury

TL;DR

FedScale is a comprehensive benchmarking suite for Federated Learning (FL) that provides 20 realistic, large-scale datasets and a high-performance runtime. By incorporating real-world system traces—like varying device speeds and intermittent connectivity—it allows researchers to evaluate FL algorithms under the messy, heterogeneous conditions of actual mobile deployments.

What Problem Does This Paper Address?

Federated Learning (FL) promises to train machine learning models across millions of user devices without ever moving raw data to a central server. However, most FL research today happens in a "clean room" environment. Researchers often use synthetic data partitions and ignore the harsh realities of the physical world: mobile devices have wildly different processing speeds, flaky internet connections, and users who only plug in their phones at night.

Existing benchmarks often fail to capture this complexity, leading to overly optimistic results that don't hold up in production. For instance, a new algorithm might look great when tested on 10 simulated clients with perfect connections, but fail miserably when scaled to 1,000 clients where half drop out mid-training. FedScale addresses this gap by providing the tools to benchmark both the statistical efficiency (how well the model learns) and system efficiency (how fast and reliably it runs) of FL at a realistic scale.

Methods

The authors introduce FedScale Runtime, an automated and extensible evaluation platform designed to simplify FL benchmarking. It features:

  • Simulation Mode: To enable cost-effective research, the runtime can emulate thousands of clients on just a few GPUs. Crucially, it uses real-world "system traces" to determine the latency and availability of each simulated client.
  • Mobile Backend: For ground-truth validation, FedScale can deploy training directly onto Android devices using an unmodified Python script, allowing researchers to measure actual power consumption and on-device execution time.
  • Flexible APIs: It provides high-level abstractions for implementing new FL algorithms, making it easy to plug in custom client selection strategies or model compression techniques.

The standard FL protocol it emulates involves a cycle of client check-in, model distribution, on-device training, and server-side aggregation.

The standard Federated Learning protocol emulated by FedScale, showing the cycle of selection, execution, and aggregation.

Datasets

FedScale includes a collection of 20 realistic FL datasets covering tasks like image classification (OpenImage), object detection, word prediction (Reddit), and speech recognition (Google Speech).

Unlike traditional datasets, these are partitioned based on real-world user identities (e.g., images grouped by the Flickr user who uploaded them). This captures the natural "Non-IID" (not identically and independently distributed) nature of user data, where different people have very different habits and data volumes. Furthermore, FedScale associates each client with a system behavior trace derived from world-wide measurements of over 100,000 mobile devices, capturing compute capacity, network bandwidth, and availability.

Key Insights and Ideas

  • System Traces are Critical: Ignoring realistic client behavior (like training failures and dropouts) leads to overly optimistic accuracy curves. When system traces are applied, model convergence often slows down significantly.
  • Scale Changes Everything: Algorithms that perform well with 20 clients per round may behave differently when scaled to 100 or more. For example, privacy-preserving techniques like Differential Privacy (DP-SGD) are much more viable at larger scales because the "noise" added for privacy is better diluted across more participants.
  • The "Straggler" Bottleneck: In FL, a round is only as fast as its slowest participant. FedScale reveals that simply optimizing communication isn't enough; if a device is computationally weak, it will remain a bottleneck regardless of how fast the network is.
  • Dynamic Availability Matters: Client availability follows a cyclic, diurnal pattern. Overlooking this can lead to "distribution drift" if the model only learns from users in certain time zones or with certain charging habits.

Key Results

  • Scalability: FedScale Runtime is significantly more efficient than existing frameworks. It can simulate 10,000 clients per round on 10 GPUs in about 11 minutes, whereas other frameworks often fail to complete or take orders of magnitude longer at that scale.
  • Misleading Benchmarks: The authors demonstrate that without realistic traces, existing benchmarks can under-report the benefits of certain optimizations or produce misleading privacy evaluations.
  • Performance Impact: Including system traces and increasing the number of clients per round fundamentally changes the observed accuracy over time, proving that "clean" simulations are often inaccurate.
Impact of system traces and participant scale on model accuracy. Realistic constraints generally lead to lower observed performance.

Limitations and Future Work

While FedScale is a major step forward, the authors acknowledge several areas for future exploration:

  • Power and Thermal Constraints: Intensive on-device training can drain batteries or cause thermal throttling. Future work should focus on "power-aware" FL algorithms.
  • Joint Optimization: There is a massive opportunity to co-optimize statistical and system efficiency—for example, by having faster workers do more work to mitigate stragglers without biasing the model.
  • Broader FL Applications: The authors invite the community to extend FedScale to new areas like multi-party computation and federated neural architecture search (NAS).

Summary updated

Abstract

We present FedScale, a federated learning (FL) benchmarking suite with realistic datasets and a scalable runtime to enable reproducible FL research. FedScale datasets encompass a wide range of crit...
BibTeX
@inproceedings{lai2021fedscale,
  author = {Fan Lai and Yinwei Dai and Sanjay Sri Vallabh Singapuram and Jiachen Liu and Xiangfeng Zhu and Harsha V. Madhyastha and Mosharaf Chowdhury},
  title = {{FedScale: Benchmarking Model and System Performance of Federated Learning at Scale}},
  booktitle = {ResilientFL},
  year = {2021},
  doi = {10.1145/3477114.3488760},
}
Figure