Green Federated Learning

Ashkan Yousefpour, Shen Guo, Ashish Shenoy, Sayan Ghosh, Pierre Stock, Kiwan Maeng, Schalk-Willem Krüger, Michael Rabbat, Carole-Jean Wu, Ilya Mironov

TL;DR

While Federated Learning (FL) protects user privacy by training models directly on edge devices, it shifts massive computational and networking demands onto end-user hardware powered by carbon-intensive local energy grids. Profiling Meta’s production FL system (PAPAYA) across millions of smartphones reveals that client compute and network communication account for 97% of emissions. With proper hyperparameter tuning—especially curbing concurrency—engineers can slash an FL task’s carbon footprint by up to 200× without compromising model quality.

What Problem Does This Paper Address?

Centralized datacenters can locate near clean energy grids and optimize hardware efficiency, but cross-device FL distributes model training to millions of consumer smartphones running on local, carbon-heavy electric grids. While prior studies examined FL efficiency in simulations or under simplified assumptions, none have systematically measured the end-to-end carbon emissions of an industrial-scale, real-world FL platform across clients, networking tiers, and servers. This paper introduces the framework of Green FL to measure and minimize these emissions alongside accuracy and training speed.

Methods

The authors instrumented Meta’s PAPAYA production FL stack to track energy and emissions across three main system components:

  1. Client Devices: Monitored session durations, upload/download times, and connection geography across participating smartphones. Compute power was derived by extracting hardware-level current/voltage specs from power_profile.xml files across 210 representative Android phone models (covering >20% of fleet volume), mapping workloads to high-frequency CPU performance cores using Perfetto traces.
  2. Network Infrastructure: Modeled energy-per-bit transit costs across access points (Wi-Fi), metro/edge aggregators, core Internet routing, and datacenter switches.
  3. Datacenter Servers: Profiled CPU utilization on physical Aggregator and Selector servers running tasks, scaled by local Power Usage Effectiveness (PUE = 1.09) and the carbon intensity of regional grids hosting Meta’s datacenters.

The team evaluated both synchronous FL (FedAvg) and asynchronous buffered FL (FedBuff), using Adam as the server optimizer (FedAdam) across varied concurrency levels, local epochs, and learning rates.

Datasets

  • Reddit FL Benchmark (pushshift.io): A non-IID natural language dataset derived from public Reddit comments (averaging 34 comments per user) partitioned by user ID to reflect realistic mobile typing behavior.
  • Task: Next-word character-aware language modeling using a character CNN, an LSTM sequence encoder, and an MLP decoder evaluated on held-out client perplexity.

Key Insights and Ideas

  • The Edge Dominates Emissions: Server-side compute contributes only 1–2% of the carbon footprint. Client-side CPU computation accounts for 46–50%, while upload and download communication generate 27–29% and 22–24%, respectively (totaling ~97% at the edge/network).
  • The Asynchronous Trade-off: Asynchronous FL (FedBuff) reaches target perplexity in less wall-clock time than synchronous FL by bypassing stragglers. However, its constant stream of client updates substantially increases total client iterations, resulting in higher net carbon emissions.
  • Concurrency Exhibits Diminishing Returns: Concurrency (number of parallel active clients) is the strongest driver of carbon footprint. Increasing concurrency 10× causes an equivalent ~10× jump in resource utilization, but only speeds up convergence by 1.5×–2×.
  • Predictable Linear Scaling: Total emissions fit cleanly ($R^2 > 0.92$) against a single composite metric: $\text{Concurrency} \times \text{Rounds}$ for synchronous FL, and $\text{Concurrency} \times \text{Duration}$ for asynchronous FL.
  • Keep Local Epochs Low: Larger local epoch counts fail to accelerate convergence in non-IID mobile settings but drastically inflate client CPU runtime; keeping local epochs between 1 and 3 is optimal.

Key Results

  • Up to 200× Footprint Reduction: Across the explored hyperparameter space, different configurations achieving similar target perplexity varied in carbon emissions by up to 200×.
  • Sync vs. Async: Under 1,000 concurrency, asynchronous FL reached a target perplexity of 175 in 2.4 hours (100 server updates) emitting ~0.56 kg $\text{CO}_2\text{e}$, whereas synchronous FL took 3.7 hours (32 updates) but emitted only ~0.17 kg $\text{CO}_2\text{e}$—more than a 3× carbon reduction.
  • Overall Scale: A single production-scale mobile language modeling task running for several days emits between 5 and 20 kg $\text{CO}_2\text{e}$ (equivalent to producing 1 kg of poultry). Repeated hyperparameter searches and continual re-training scale this into metric tons of emissions over time.

Limitations and Future Work

  • Hardware Extrapolation: Power modeling relied on direct manufacturer specs for 210 Android device models; missing device profiles had to be imputed based on matching chipsets (SoCs).
  • Compute Modality: Workloads were restricted to mobile CPUs for text modeling. Tasks leveraging on-device NPUs or mobile GPUs (e.g., computer vision) remain unprofiled.
  • Geographic Fairness Risks: While steering client selection toward regions with greener electric grids would reduce emissions, the authors warn this could skew model representations against the Global South.
  • Future Directions: Incorporating model quantization (e.g., int8 to reduce network bandwidth), evaluating differential privacy's energy tax, and studying the emission profiles of split federated learning.

Summary updated

BibTeX
@inproceedings{yousefpour2023green,
  author = {Ashkan Yousefpour and Shen Guo and Ashish Shenoy and Sayan Ghosh and Pierre Stock and Kiwan Maeng and Schalk-Willem Krüger and Michael Rabbat and Carole-Jean Wu and Ilya Mironov},
  title = {{Green Federated Learning}},
  booktitle = {FL @ ICML},
  year = {2023},
  url = {https://openreview.net/forum?id=nlPLgLQxnt},
}
Figure