$\texttt{pfl-research}$: simulation framework for accelerating research in Private Federated Learning

Filip Granqvist, Congzheng Song, Áine Cahill, Rogier van Dalen, Martin Pelikan, Yi Sheng Chan, Xiaojun Feng, Natarajan Krishnaswami, Vojta J, Mona ChitnisFederated Learning @ NeurIPS 2024

TL;DR

Researchers in private federated learning (PFL) need efficient simulation tools to test their ideas on realistic datasets. This paper introduces pfl-research, a new Python framework that significantly speeds up PFL simulations (7-72x faster than alternatives), enabling more thorough experimentation and faster iteration cycles.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple parties to collaboratively train a machine learning model without sharing their raw data. Private Federated Learning (PFL) adds a layer of privacy protection to this process. While FL and PFL are promising, evaluating new algorithms and privacy techniques is challenging. Researchers typically rely on simulations, but existing tools are often too slow to handle large, realistic datasets, hindering rapid experimentation and the exploration of complex scenarios. This bottleneck limits the pace of research and the ability to test hypotheses on data that truly reflects real-world conditions.

Methods

The core contribution is pfl-research, a Python framework designed for fast and modular FL/PFL simulations. Key features include:

  • Speed Optimization: pfl-research focuses on simulating the computation rather than the network topology of FL, leading to significant speedups. It also leverages GPU acceleration end-to-end for ML framework tensors, including DP mechanisms.
  • Modularity and Flexibility: The framework supports TensorFlow, PyTorch, and non-neural network models. It offers a clear API for researchers to integrate their own algorithms and privacy mechanisms.
  • Integrated Privacy: It's tightly integrated with state-of-the-art privacy algorithms and accountants, simplifying experimentation with PFL.
  • Distributed Simulation: pfl-research allows seamless scaling of simulations across multiple processes, GPUs, and machines with minimal code changes, using tools like Horovod.
  • Efficient Worker Scheduling: A novel greedy scheduling approach, considering user data size and a small base value, minimizes straggler times and improves overall simulation speed.

Datasets

The paper uses several datasets for benchmarking and evaluation:

  • CIFAR10: Used for comparing framework speed on smaller, common cross-device setups.
  • FLAIR: A larger dataset used to emphasize distributed simulation efficiency.
  • StackOverflow: Used for next-word prediction benchmarks.
  • LLM Benchmarks: Stanford Alpaca, Aya, and OpenAssistant datasets are used for evaluating fine-tuning large language models in a federated setting.

The paper also mentions that pfl-research is designed to be extensible for new datasets and benchmarks.

Key Insights and Ideas

  • Simulation Speed is Paramount for Research Velocity: The paper strongly emphasizes that slow simulators are a major bottleneck for FL/PFL research. The dramatic speedups achieved by pfl-research directly translate to increased researcher productivity and the feasibility of using more realistic datasets.
  • Focusing on Computation Over Topology: By abstracting away the complexities of network topology simulation, pfl-research achieves significant performance gains, demonstrating that for many research questions, a simplified simulation model is sufficient and much more efficient.
  • Integrated Privacy is Crucial for PFL Research: The tight integration of privacy mechanisms within the simulation framework simplifies the complex task of experimenting with PFL, allowing researchers to focus on algorithm design rather than plumbing.
  • Efficient Worker Scheduling Matters: The greedy scheduling approach, which considers user data size and a small base value, effectively balances workload and minimizes straggler times, leading to noticeable speed improvements in distributed simulations.

Key Results

  • Speedup: pfl-research is 7-72x faster than alternative open-source FL frameworks on common cross-device setups.
  • CIFAR10 Benchmark: pfl-research achieved a wall-clock time of 4 minutes and 20 seconds, which was 7x faster than the next best (Flower) and 72x faster than the slowest (FedScale).
  • FLAIR Benchmark: pfl-research also significantly outperformed TFF and Flower on this larger-scale benchmark.
  • DP Overhead: Enabling central DP added only a 9% increase in simulation wall-clock time.
  • Distributed Scaling: The framework scales well with the number of GPUs, showing significant speedups as more GPUs are added.
  • Worker Scheduling: The greedy scheduling method reduced maximum straggler time by over 60% compared to no scheduling.

Limitations and Future Work

  • Simulation Only: pfl-research is designed for simulation and does not support real-device deployments.
  • Cross-Silo Simulation: While cross-silo FL can be simulated, dedicated benchmarks for this scenario are not yet provided.
  • Model Parallelism: Implementing model parallelism for training large models on multiple GPUs within a single user/silo is a future work item.
  • Aggregator Interface: The aggregator interface could be extended to support client-server architectures with dedicated aggregators and coordinators for more complex FL scenarios.
  • Algorithm and Benchmark Expansion: The authors plan to continuously benchmark new algorithms and methods and curate more diverse datasets. They also aim to release TensorFlow versions of their benchmarks.

Summary updated

BibTeX
@inproceedings{granqvist2024texttt,
  author = {Filip Granqvist and Congzheng Song and Áine Cahill and Rogier van Dalen and Martin Pelikan and YI SHENG CHAN and Xiaojun Feng and Natarajan Krishnaswami and Vojta J and Mona Chitnis},
  title = {{$\textbackslash\{\}texttt\{pfl-research\}$: simulation framework for accelerating research in Private Federated Learning}},
  booktitle = {Federated Learning @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=6WNNB9TaVw},
}
Figure