FedHyper: A Universal and Robust Learning Rate Scheduler for Federated Learning with Hypergradient Descent

Ziyao Wang, Jianyu Wang, Ang Li

Introduction

FedHyper is a novel, plug-and-play learning rate scheduler for Federated Learning (FL) that uses "hypergradients" to automatically tune both global and local learning rates during training. It eliminates the need for expensive manual hyperparameter tuning, speeds up convergence by up to 3x, and can boost final model accuracy by as much as 15% when starting from suboptimal initial settings.

The Challenge of Learning Rates in FL

In Federated Learning, a central server coordinates training across thousands of edge devices (clients) without ever seeing their private data. This setup introduces a massive headache: hyperparameter optimization.

Specifically, FL involves two distinct types of learning rates (LR):

  1. Global LR: Used by the server to update the master model.
  2. Local LR: Used by clients to update their local models on their own data.

Finding the optimal zone for these rates is incredibly difficult because data is often heterogeneous (non-IID) across devices, and communication is expensive. If the LR is too small, training takes forever; if it's too large, the model fails to converge. Currently, researchers spend significant time and compute power on grid searches to find these values—a luxury often unavailable in real-world deployments.

FedHyper: Hypergradient Descent for FL

To address this, the authors introduce FedHyper, leveraging Hypergradient Descent. The core idea is intuitive: if the gradients from two consecutive training steps point in the same direction (a positive inner product), the optimization is on the right track, and the learning rate should increase to move faster.

Hypergradient descent: increasing learning rate when gradients align.

Conversely, if they point in opposite directions, the model is likely overshooting or oscillating, signaling that the learning rate should be decreased to ensure stable convergence.

Hypergradient descent: decreasing learning rate when gradients oppose.

FedHyper operationalizes this concept through three modular components:

  • FedHyper-G (Global): The server treats the aggregated client updates as a "pseudo-gradient" to adjust the global learning rate.
  • FedHyper-SL (Server-side Local): The server adjusts the local learning rate for all clients based on global progress.
  • FedHyper-CL (Client-side Local): The most granular version, where individual clients adjust their own LR based on local batches. Crucially, this version includes a "global regulation" term—it uses the previous round's global update to ensure local tuning doesn't cause the client to drift too far from the global objective.

The algorithm also includes clipping bounds to prevent the learning rates from exploding or vanishing into uselessly small numbers.

Experimental Setup & Key Insights

The researchers evaluated FedHyper across three diverse benchmarks: Fashion-MNIST (clothing image classification), CIFAR-10 (standard image classification using ResNet-18), and Shakespeare (a language modeling task for next-word prediction using a bidirectional LSTM, inherently non-IID as it is partitioned by speaking roles).

Several key insights emerged from the evaluation:

  • Pseudo-Gradients are Enough: In FL, the server usually doesn't see raw gradients for privacy reasons, only model updates. FedHyper proves that these updates can serve as effective proxies for calculating hypergradients.
  • Robustness to "Bad" Starts: Even if training begins with a terrible initial learning rate, FedHyper's self-correction mechanism can rescue the process and guide it toward an optimal value.
  • Global-Local Synergy: The best performance comes from combining global and local scheduling. By incorporating global updates into local client tuning (FedHyper-CL), the authors successfully mitigated the "client drift" problem common in heterogeneous data environments.
  • Negligible Overhead: The extra math required for hypergradients is minimal. The computational overhead is less than 5%, a small price to pay for massive convergence speedups.

Results & Performance

FedHyper consistently demonstrated superior performance compared to baselines:

  • Faster Convergence: FedHyper converged 1.1x to 3x faster than the standard FedAvg algorithm and other popular optimizers like FedAdam and FedAdagrad.
  • Accuracy Boost: On the Shakespeare dataset, FedHyper achieved a 15% higher accuracy than FedAvg when both were started with suboptimal initial learning rates.
  • Stability: While competing methods like FedExp showed fluctuating learning rate curves, FedHyper-G produced a smooth, "mountain-shaped" curve—increasing LR during early exploration and decaying it during late-stage refinement.
  • Non-IID Performance: FedHyper showed its strongest gains in highly heterogeneous (non-IID) settings, where manual tuning is traditionally the most difficult.

Limitations and Future Work

While FedHyper significantly reduces the need to tune learning rates, it introduces new "clipping" hyperparameters. Although the authors found these to be very stable across different tasks, they still represent a configuration choice. Additionally, FedHyper-SL requires sending an extra scalar (the updated local LR) to clients. While tiny, every bit counts in extremely bandwidth-constrained environments. Finally, while it handles Dirichlet-distributed data well, future work could explore how FedHyper performs in "cross-silo" FL with massive differences in data volume between clients.

Summary updated

BibTeX
@inproceedings{wang2024fedhyper,
  author = {Ziyao Wang and Jianyu Wang and Ang Li},
  title = {{FedHyper: A Universal and Robust Learning Rate Scheduler for Federated Learning with Hypergradient Descent}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=Kl9CqKf7h6},
}
Figure