Cost-Effective Federated Learning Design

Bing Luo, Xiang Li, Shiqiang Wang, Jianwei Huang, Leandros Tassiulas

TL;DR

This paper introduces a framework for optimizing Federated Learning (FL) by jointly tuning two critical "knobs": the number of participating clients ($K$) and the number of local iterations ($E$). By analytically linking these variables to both system costs (time and energy) and convergence bounds, the authors provide a sampling-based algorithm that achieves near-optimal training efficiency across diverse hardware and data settings.

What Problem Does This Paper Address?

Federated Learning allows devices to train models locally without sharing raw data, but this process is resource-intensive. Most existing research focuses on a single optimization goal (like minimizing communication rounds) or tunes only one variable (like the communication interval).

However, in the real world, "cost" is multifaceted. A solar-powered sensor cares about energy, while a search-and-rescue drone cares about time. Furthermore, the two main control variables—how many devices participate ($K$) and how much work they do locally ($E$)—are tightly coupled. Increasing $K$ might speed up convergence but will certainly spike energy consumption. The authors address the lack of a multivariate control strategy that balances these competing costs while guaranteeing the model actually converges to a desired precision.

Methods

The authors formulate the problem as a cost-minimization task subject to a convergence constraint.

  1. Cost Modeling: They define a total cost function $C_{tot}$ that weights learning time ($t_{tot}$) and energy consumption ($e_{tot}$) using a preference parameter $\gamma$.
  2. Time is modeled based on the "straggler effect," where the round speed is dictated by the slowest participating device.
  3. Energy is modeled as the sum of consumption across all participating devices.
  4. Convergence Analysis: They utilize a theoretical upper bound for the convergence of the Federated Averaging (FedAvg) algorithm. This bound includes unknown constants ($A_0, B_0$) that represent the statistical heterogeneity (non-i.i.d.-ness) of the data.
  5. The Algorithm:
    • Parameter Estimation: Since $A_0$ and $B_0$ are unknown, they propose a low-overhead sampling method. They run a few initial rounds with different $(K, E)$ pairs to "probe" the data and estimate these constants.
  6. Biconvex Optimization: They prove the optimization problem is "strictly biconvex." This allows them to use an iterative solver (Alternate Convex Search) to quickly find the optimal $K^*$ and $E^*$ in closed-form expressions.

Datasets

The researchers evaluated their design using:

  • MNIST: The classic handwritten digit dataset, distributed in a non-i.i.d. fashion (each device only sees two types of digits).
  • Synthetic Data: A generated dataset specifically designed to test "statistical heterogeneity" (how different the data distributions are across devices), following a $(\alpha, \beta)$ distribution model.

Key Insights and Ideas

  • The $K$ Trade-off: To minimize time, you generally want more clients ($K=N$) because more data per round usually means fewer rounds. To minimize energy, you want the absolute minimum number of clients ($K=1$) to reduce the total joules spent per round.
  • The $E$ "Goldilocks" Zone: For any given number of clients, there is an optimal number of local iterations. If $E$ is too small, you waste time/energy on too many communication rounds. If $E$ is too large, the local models drift too far apart, slowing down global convergence.
  • Coupled Variables: As you shift preference toward saving energy (increasing $\gamma$), both the optimal number of clients ($K$) and local iterations ($E$) should decrease.
  • Diminishing Returns of Participation: While theory suggests full participation is fastest, the experiments show that in large networks, sampling just a small fraction of devices (e.g., 20 out of 100) often yields nearly the same convergence speed as using everyone, but at a fraction of the energy cost.

Key Results

  • Near-Optimality: The proposed algorithm achieved costs within 2.61% to 8.49% of the "true" optimum found via exhaustive search.
  • Hardware Validation: Unlike many FL papers that stay in simulation, this was tested on a physical 20-node Raspberry Pi 4 cluster communicating over Wi-Fi.
  • Robustness: Although the theory was derived for convex models (Logistic Regression), the authors demonstrated that the optimization principles held up well for non-convex models like CNNs (LeNet-5).
  • Efficiency: The overhead for estimating the unknown data parameters was shown to be marginal compared to the total training time.

Limitations and Future Work

  • Strong Convexity Assumption: The theoretical convergence guarantees rely on the objective function being strongly convex, which isn't strictly true for deep neural networks (though it worked well empirically).
  • Static Settings: The current model assumes system parameters (like network bandwidth or CPU speed) are relatively stable during training. In highly dynamic mobile environments, these parameters might fluctuate, requiring a more "online" adaptive approach.
  • Energy Measurement: The authors noted that measuring precise energy consumption on hardware like Raspberry Pis is difficult without specialized external sensors, leading them to rely more on simulated energy models for the hardware phase.

Summary updated

BibTeX
@inproceedings{luo2021cost,
  author = {Bing Luo and Xiang Li and Shiqiang Wang and Jianwei Huang and Leandros Tassiulas},
  title = {{Cost-Effective Federated Learning Design}},
  booktitle = {INFOCOM},
  year = {2021},
  doi = {10.1109/infocom42981.2021.9488679},
}
Figure