EasyFL: A Low-Code Federated Learning Platform for Dummies

Weiming Zhuang, Xin Gan, Yonggang Wen, Shuai Zhang

Federated Learning (FL) is a powerful paradigm for training machine learning models on decentralized data while maintaining privacy. However, for many researchers and engineers, the barrier to entry remains frustratingly high. Existing frameworks often require hundreds of lines of complex boilerplate code, deep expertise in distributed systems, and significant effort to move from a local simulation to a production deployment.

In their paper, "EasyFL: A Low-code Federated Learning Platform For Dummies," Weiming Zhuang and colleagues introduce EasyFL, a platform designed to make FL experimentation and deployment as simple as writing a few lines of code.

TL;DR

EasyFL is the first low-code federated learning platform, reducing the code required for a vanilla FL application by over 10x (down to just three lines). It accelerates the entire FL life cycle—from simulation to production—through granular training flow abstractions, optimized distributed training, and seamless containerized deployment.

What Problem Does This Paper Address?

The authors identify a significant gap in the current FL ecosystem. While platforms like TensorFlow Federated (TFF) or FATE exist, they are often either too research-oriented and complex for beginners or too industrial and heavy for rapid prototyping.

Researchers often find themselves re-implementing standard FL components (like communication protocols or server-client synchronization) just to test a minor algorithmic change. Furthermore, moving a verified experimental algorithm into a real-world production environment usually requires a complete engineering overhaul. EasyFL aims to bridge this gap by providing a unified, user-friendly platform that handles the "heavy lifting" of infrastructure, allowing users to focus on model and algorithm design.

Methods

The core of EasyFL is a two-tier architecture consisting of an Interface Layer for users and a System Layer that manages the complex underlying operations.

EasyFL Architecture: A simple API layer sits atop a modular system layer.

Key methodological innovations include:

  1. Training Flow Abstraction: EasyFL breaks down the FL process into granular, replaceable stages (e.g., Selection, Compression, Aggregation). Users can implement new algorithms by simply inheriting a base class and overriding only the specific stage they wish to change.

    Training Flow Abstraction: The FL process is divided into modular stages for both server and client.
  2. GreedyAda (Distributed Training Optimization): To speed up experiments, EasyFL uses a novel "Greedy Allocation with Adaptive Profiling" strategy. It profiles client training times on the fly and intelligently allocates multiple clients to available GPUs to minimize the overall "round time," effectively handling stragglers caused by system heterogeneity.

  3. Seamless Deployment: The platform integrates remote communication (via gRPC), containerization (Docker), and service discovery (Kubernetes/etcd). This allows a model developed in a local simulation to be deployed to a distributed production environment with minimal configuration changes.

Datasets

The authors evaluated EasyFL using three standard FL benchmarks, providing built-in tools to simulate realistic statistical heterogeneity (non-IID and unbalanced data):

  • FEMNIST: A federated version of EMNIST (handwritten characters/digits).
  • Shakespeare: A language modeling dataset based on the collective works of William Shakespeare.
  • CIFAR-10: A standard image classification dataset, partitioned using Dirichlet processes to simulate varying degrees of data imbalance among clients.

Key Insights and Ideas

  • The FL Life Cycle: The authors formalize the FL process into two distinct phases: the Experimental Phase (simulation and algorithm development) and the Production Phase (real-world data and deployment). EasyFL is designed to support the transition between these phases smoothly.

    The Federated Learning Life Cycle: Moving from experimental simulation to production deployment.
  • Minimalism as a Feature: By analyzing 33 recent FL papers, the authors found that ~87% of new algorithms only modify one or two stages of the standard training flow. This insight justifies their modular "Training Flow Abstraction" approach.

  • Software-Based Heterogeneity Simulation: Instead of requiring diverse hardware, EasyFL simulates system heterogeneity (varied device speeds) in software using real-world mobile device benchmarks, making it easier for researchers to test their algorithms' robustness against "stragglers."

Key Results

  • Massive Code Reduction: A vanilla FL application requires only 3 lines of code in EasyFL, compared to 30–400 lines in other frameworks. For complex applications like FedProx or FedReID, EasyFL reduced the required code by 3.2x to 9.5x.
  • Faster Training: The GreedyAda optimization strategy accelerated distributed training by up to 1.5x compared to random client-to-GPU allocation.
  • Lower Overhead: Despite the abstractions, EasyFL demonstrated lower training overhead and better GPU utilization than established libraries like LEAF and TFF across multiple datasets.
  • Scalability: The platform showed near-optimal training speedups when scaling from 8 to 64 GPUs, provided the data amount per client was sufficient to outweigh communication overhead.

Limitations and Future Work

While EasyFL significantly lowers the barrier to entry, the authors acknowledge areas for growth:

  • Security and Privacy: Future versions aim to include out-of-the-box support for advanced privacy-preserving techniques like Secure Aggregation and Homomorphic Encryption.
  • Realistic Simulations: They plan to develop better mechanisms to capture and replicate complex production environments (like fluctuating network conditions) within the experimental simulation phase.
  • No-Code Interface: The ultimate goal is a completely no-code FL platform to further democratize the technology for non-programmers.

Summary updated

BibTeX
@article{zhuang2022easyfl,
  author = {Weiming Zhuang and Xin Gan and Yonggang Wen and Shuai Zhang},
  title = {{EasyFL: A Low-Code Federated Learning Platform for Dummies}},
  journal = {IEEE Internet of Things Journal},
  year = {2022},
  url = {https://openreview.net/forum?id=_D2i8BXPab5},
}
Figure