Momentum Benefits Non-iid Federated Learning Simply and Provably

Ziheng Cheng, Xinmeng Huang, Pengfei Wu, Kun Yuan

TL;DR

This paper demonstrates that simply adding momentum to local updates in Federated Learning (FL) provides a powerful, provable fix for "client drift" caused by heterogeneous data. The authors show that momentum-enhanced versions of FedAvg and SCAFFOLD achieve state-of-the-art convergence rates—and, crucially, they do so without requiring the common but unrealistic assumption that data heterogeneity must be "bounded."

What Problem Does This Paper Address?

Federated Learning allows multiple clients (like mobile phones or hospitals) to collaboratively train a model without sharing their private data. The standard approach, FedAvg, has clients perform several local updates before syncing with a central server to save on communication costs.

However, FL faces a major hurdle: Data Heterogeneity (Non-IID data). Because every client has different data, their local models tend to "drift" toward their own local optima and away from the global solution. To make the math work, most existing theoretical proofs rely on a "bounded data heterogeneity" assumption—essentially assuming that clients aren't too different from each other. In the real world, this assumption is often false. Furthermore, existing fixes often require impractical tweaks, like massive batch sizes or extremely high-precision local solving, which don't fit the resource-constrained nature of FL.

Methods

The authors propose a straightforward solution: incorporating momentum into the local stochastic gradient descent (SGD) steps. They introduce two primary algorithms and their variance-reduced extensions:

  1. FedAvg-M: Adds a momentum term to the local updates of FedAvg. The momentum acts as a "global memory," helping local updates stay aligned with the overall training direction.
  2. SCAFFOLD-M: Integrates momentum into SCAFFOLD, an algorithm that already uses "control variables" to reduce drift.
  3. Variance-Reduced Extensions (FedAvg-M-VR & SCAFFOLD-M-VR): These combine momentum with techniques like STORM or SARAH to further mitigate the noise inherent in stochastic gradients.

The beauty of these methods lies in their simplicity; they require no extra communication overhead and maintain the standard FL workflow.

Datasets

The researchers evaluated their algorithms using:

  • CIFAR-10: Used to train a three-layer Multi-Layer Perceptron (MLP) and a ResNet-18 model.
  • MNIST: Used for experiments involving a larger number of clients ($N=100$) to test scalability.
  • Dirichlet Distribution: Used to partition the data. By adjusting the Dirichlet parameter ($\alpha$), the authors could simulate "mild" vs. "severe" data heterogeneity among clients.

Key Insights and Ideas

  • The "Anchoring" Effect: The most intuitive insight is that momentum provides an "anchoring" effect. By maintaining a running average of gradients, the local update is less likely to be hijacked by a single outlier minibatch or the specific quirks of a client's local dataset.
  • Breaking the "Bounded" Crutch: This is the first paper to show that FedAvg-type methods can converge under unbounded data heterogeneity while still using a constant local learning rate. Previously, theorists thought you needed diminishing learning rates to handle high heterogeneity.
Theoretical comparison of convergence rates and assumptions.
  • Unconditional Superiority: For the partial participation setting (where only some clients check in per round), the authors proved that SCAFFOLD-M is unconditionally faster than the original SCAFFOLD, meaning it performs better regardless of how messy the data distribution is.

Key Results

  • Faster Convergence: In experiments, FedAvg-M and SCAFFOLD-M consistently reached higher test accuracy in fewer communication rounds compared to their "momentum-less" counterparts.
  • Resilience to Heterogeneity: The advantage of momentum became even more pronounced as data heterogeneity increased. On ResNet-18 with severe heterogeneity, the gap between the proposed methods and standard FedAvg was substantial.
  • Theoretical Optimality: The convergence rate for FedAvg-M matches the known theoretical lower bounds for non-convex optimization, proving that this simple addition makes the algorithm as efficient as mathematically possible.
  • State-of-the-Art (SOTA) Rates: The variance-reduced versions (FedAvg-M-VR) achieved SOTA convergence rates, outperforming existing complex methods like STEM or CE-LSGD while using much smaller, more practical batch sizes.
Experimental results showing acceleration by momentum, comparison of VR methods, and partial participation.

Limitations and Future Work

While the paper provides a robust theoretical framework, there are a few areas for further exploration:

  • Hyperparameter Tuning: Adding momentum introduces a new hyperparameter ($\beta$). While the authors provide a grid search strategy, finding the optimal momentum value in a real-world, "blind" FL deployment remains a challenge.
  • Communication Compression: The current work focuses on reducing the number of rounds. Future research could combine these momentum benefits with communication compression techniques (like quantization or sparsification) to reduce the size of each message sent.
  • Beyond Polyak Momentum: The paper primarily utilizes Polyak's heavy-ball momentum. Exploring whether Nesterov Accelerated Gradient (NAG) or adaptive momentum (like Adam) provides similar theoretical "unbounded" benefits in FL would be a logical next step.

Summary updated

BibTeX
@inproceedings{cheng2024momentum,
  author = {Ziheng Cheng and Xinmeng Huang and Pengfei Wu and Kun Yuan},
  title = {{Momentum Benefits Non-iid Federated Learning Simply and Provably}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=TdhkAcXkRi},
}
Figure