Federated Hyperparameter Tuning: Challenges, Baselines, and Connections to Weight-Sharing

Mikhail Khodak, Renbo Tu, Tian Li, Liam Li, Nina Balcan, Virginia Smith, Ameet Talwalkar

Hyperparameter optimization (HPO) is often considered the "dark art" of machine learning. In standard centralized training, it is already a massive resource hog. However, in Federated Learning (FL)—where data remains decentralized across thousands of heterogeneous devices—HPO transforms from a logistical headache into a formidable bottleneck.

A paper from researchers at Carnegie Mellon University and Hewlett Packard Enterprise, titled "Federated Hyperparameter Tuning: Challenges, Baselines, and Connections to Weight-Sharing," tackles this challenge head-on. The authors introduce FedEx, a novel method that borrows clever tricks from Neural Architecture Search (NAS) to tune models on-the-fly without breaking the computational bank.

The "Boss-Level" Challenges of Federated HPO

In a typical FL setup, a central server coordinates training across a massive network of edge devices, such as smartphones. Performing HPO in this environment introduces three unique hurdles:

  1. Federated Validation Data: Unlike centralized training, you cannot simply evaluate configurations on a static, global validation set. The server only sees a tiny, noisy slice of data from whichever devices happen to be online during a specific communication round.
  2. Extreme Resource Constraints: Edge devices have limited battery life, compute power, and bandwidth. Running hundreds of separate "trials" to find the optimal learning rate or dropout configuration is practically impossible.
  3. Evaluating Personalization: Many FL systems aim to "personalize" models for individual users. Measuring how well a model personalizes requires extra local training steps, adding further computational expense to the evaluation phase.

While HPO is a well-studied field for centralized data, the authors noted a distinct lack of dedicated frameworks designed to navigate these specific federated constraints.

The Methods: Baselines and FedEx

To address the gap, the researchers propose two main contributions: adapting robust baselines and introducing a novel, highly efficient tuning algorithm.

1. Robust Federated Baselines

First, the authors adapt standard HPO algorithms like Random Search (RS) and Successive Halving (SHA) to the federated setting. For instance, their federated SHA works by starting with many hyperparameter configurations and systematically "killing off" the worst-performing ones at set intervals, saving resources over time.

2. FedEx (Federated Exponentiated Gradient)

The core innovation of the paper is FedEx. The authors realized that tuning local hyperparameters is mathematically analogous to Weight-Sharing in Neural Architecture Search (NAS).

Instead of running entirely separate trials for each configuration, FedEx maintains a distribution over hyperparameter configurations.

FedEx vs FedAvg: FedEx updates a hyperparameter distribution using local evaluation signals, running parallel to standard model parameter updates.

In each communication round, the process works as follows:

  • The server sends the current model and the hyperparameter distribution to a batch of sampled devices.
  • Each device samples a specific configuration, trains locally, and reports back the validation loss.
  • The server updates the model weights (using standard aggregation like FedAvg) and then uses the validation results to update the hyperparameter distribution using an exponentiated gradient update.

To keep the shared weights from becoming unstable, the authors employ a Local Perturbation strategy, ensuring that the sampled configurations remain "close" to each other.

Key Insights and Results

The authors evaluated their methods on three standard FL benchmarks: Shakespeare (language modeling), FEMNIST (image classification partitioned by writer), and CIFAR-10 (image classification with i.i.d. and non-i.i.d. splits).

  • The NAS Connection Works: Treating hyperparameters as architectural choices is a breakthrough. By using weight-sharing, the model learns to perform well across a range of settings, and the system naturally gravitates toward the optimal configuration.
  • Superior Accuracy and Speed: FedEx consistently outperformed the SHA and RS baselines. On the Shakespeare dataset, it improved test accuracy by 2-3% compared to the best baseline, using the exact same training budget. It also frequently reached higher accuracy levels much earlier in the training process.
  • Built-In Personalization: Because FedEx updates its distribution based on local validation after local training, it naturally optimizes for a model that is easy to personalize, elegantly solving the personalization evaluation challenge.
  • Robust to Noise: Even though validation signals from a handful of devices are inherently noisy, the exponentiated gradient update is mathematically robust enough to filter out this noise over multiple rounds.

Limitations and Future Directions

While highly effective, FedEx is not without limitations. The algorithm itself introduces a few "meta-hyperparameters" (like the step-size for the distribution update) that require sensible defaults. Furthermore, FedEx is designed to tune local (on-device) parameters; it cannot currently tune server-side parameters (like the global server learning rate) because those are not sampled by individual devices. Finally, it is limited to FL algorithms that can be neatly decomposed into local training and global aggregation.

Future work may involve extending FedEx to handle a wider array of hyperparameter types or integrating it with privacy-preserving techniques like Differential Privacy, paving the way for even smarter, more efficient federated learning systems.

Summary updated

BibTeX
@inproceedings{khodak2021federated,
  author = {Mikhail Khodak and Renbo Tu and Tian Li and Liam Li and Nina Balcan and Virginia Smith and Ameet Talwalkar},
  title = {{Federated Hyperparameter Tuning: Challenges, Baselines, and Connections to Weight-Sharing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=p99rWde9fVJ},
}
Figure