CEFL: Carbon-Efficient Federated Learning

Talha Mehboob, Noman Bashir, Jesús Omana Iglesias, Michael Zink, David E. IrwinarXiv 2023 · OpenReview

Abstract

Federated Learning (FL) distributes machine learning (ML) training across many edge devices to reduce data transfer overhead and protect data privacy. Since FL model training may span millions of devices and is thus resource-intensive, prior work has focused on improving its resource efficiency to optimize time-to-accuracy. However, prior work generally treats all resources the same, while, in practice, they may incur widely different costs, which instead motivates optimizing cost-to-accuracy. To address the problem, we design CEFL, which uses adaptive cost-aware client selection policies to optimize an arbitrary cost metric when training FL models. Our policies extend and combine prior work on utility-based client selection and critical learning periods by making them cost-aware. We demonstrate CEFL by designing carbon-efficient FL, where energy's carbon-intensity is the cost, and show that it i) reduces carbon emissions by 93% and reduces training time by 50% compared to random client selection and ii) reduces carbon emissions by 80%, while only increasing training time by 38%, compared to a state-of-the-art approach that optimizes training time.

Introduction

Federated Learning (FL) is often hailed as the privacy-preserving future of AI, but it faces a significant environmental challenge: its carbon footprint. By distributing training across thousands of edge devices, FL can be incredibly energy-intensive. Furthermore, because these devices are geographically dispersed, some are powered by "clean" grids (wind, solar) while others rely on "dirty" ones (coal, gas).

Standard FL research focuses almost exclusively on time-to-accuracy, aiming to reach target performance quickly to save on communication and compute. However, this approach assumes all energy is created equal. In reality, the carbon intensity of electricity can vary by up to 60× depending on location and time of day. Prior "utility-based" selection methods prioritize data quality regardless of carbon cost, while "carbon-only" methods select clean devices but often fail to produce accurate models by ignoring data utility. CEFL (implemented via the EcoLearn framework) navigates this three-way tradeoff between carbon, accuracy, and time.

Methodology

CEFL optimizes the cost-to-accuracy ratio using three core adaptive modules:

  1. CScale (Time-varying Client Scaling): Deep learning models have a "Critical Learning Period" (CLP)—an early phase where they learn the most important features. CEFL monitors the accuracy curve's derivative to detect the end of this period. It utilizes many clients during the CLP to bootstrap the model and then aggressively scales down participation to save carbon during the "long tail" of convergence.
  2. CProv (Straggler-Aware Provisioning): To mitigate slow devices (stragglers), most systems over-provision clients. CEFL makes this dynamic: it only over-provisions heavily when carbon intensity is low, effectively "buying" insurance against delays only when it is environmentally inexpensive.
  3. CSelect (Carbon-Aware Client Selection): This module ranks clients using a Utility-per-Carbon metric. It prioritizes clients that offer high-value statistical data at a low carbon cost.
EcoLearn's selection logic compared to utility-aware and carbon-aware baselines across training rounds.

Evaluation and Results

CEFL was evaluated across three domains: image recognition (EMNIST), next-character prediction (Shakespeare), and keyword spotting (Google Speech Commands). To simulate real-world conditions, the researchers used non-i.i.d. data distributions and real-time carbon intensity data.

Massive Carbon Savings

Compared to random client selection, CEFL reduced carbon emissions by 93%. When compared to the state-of-the-art utility-based approach (Oort), it achieved an 80% reduction in carbon emissions. These savings are achieved by treating carbon as a first-class citizen in the selection process, prioritizing the "Golden Hour" of training where marginal gains are highest.

Accuracy Preservation

Despite the massive carbon reductions, the final model accuracy remained within ~1% of carbon-agnostic baselines. As shown in the training curves, the strategy of using more clients in early rounds allows the model to reach target accuracy levels comparable to using all clients in all rounds, but with a significantly lower total carbon cost.

Impact of client participation strategies on model accuracy over training rounds, validating the efficiency of the early-round scaling strategy.

Conclusion

CEFL demonstrates that sustainability does not have to be a penalty on performance. By intelligently timing training and selecting clients based on local grid intensity, FL can become significantly more eco-friendly. Future work may involve more granular modeling of device-specific power consumption and extending these adaptive policies to other cost metrics, such as monetary costs in cloud markets.

Summary updated

BibTeX
@misc{mehboob2023cefl,
  author = {Talha Mehboob and Noman Bashir and Jesús Omana Iglesias and Michael Zink and David E. Irwin},
  title = {{CEFL: Carbon-Efficient Federated Learning}},
  year = {2023},
  eprint = {2310.17972},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.17972},
}
Figure