Momentum Benefits Non-IID Federated Learning Simply and Provably

Ziheng Cheng, Xinmeng Huang, Kun Yuan

Abstract

Federated learning (FL) is a powerful paradigm for large-scale machine learning, but it faces significant challenges due to unreliable network connections, slow communication, and substantial data heterogeneity across clients. FedAvg and SCAFFOLD are two prominent algorithms designed to address these challenges. However, existing analyses often rely on the assumption of bounded data heterogeneity or diminishing learning rates. This paper explores the utilization of momentum to enhance the performance of FedAvg and SCAFFOLD. We demonstrate that incorporating momentum allows FedAvg to converge without relying on the assumption of bounded data heterogeneity, even using a constant local learning rate. In partial client participation settings, momentum enables SCAFFOLD to converge provably faster without imposing additional assumptions. Furthermore, we develop new variance-reduced extensions (FedAvg-M-VR and SCAFFOLD-M-VR) that exhibit state-of-the-art convergence rates. Experimental results on CIFAR-10 and MNIST support these theoretical findings.

Introduction: The Challenge of Client Drift

In Federated Learning, clients collaboratively train a model without sharing raw data. To save communication bandwidth, clients typically perform multiple local updates before synchronizing with a central server. However, when data is non-IID (Independent and Identically Distributed), local models tend to "drift" toward local optima that are far from the global objective. This client drift is a primary bottleneck in FL performance. While algorithms like FedAvg and SCAFFOLD were developed to combat this, their theoretical guarantees often hinge on unrealistic assumptions about data similarity or require complex learning rate schedules that are difficult to tune in practice.

The Momentum Solution

This paper proposes a simple yet effective fix: adding momentum to the local update steps. By maintaining a running average of gradients, momentum acts as an "anchor," keeping local updates aligned with the global goal even when local data is highly heterogeneous.

The authors introduce three main algorithmic variants:

  1. FedAvg-M: Integrates a global momentum term into the local SGD steps of FedAvg.
  2. SCAFFOLD-M: Combines momentum with SCAFFOLD’s control variables to further stabilize training.
  3. Variance-Reduced Extensions (FedAvg-M-VR & SCAFFOLD-M-VR): These combine momentum with techniques like STORM to mitigate stochastic noise, achieving optimal convergence rates for non-convex optimization.

Theoretical Breakthroughs

A major contribution of this work is the removal of the "bounded data heterogeneity" assumption. Traditionally, researchers believed that extreme differences between client datasets required diminishing learning rates to ensure convergence. This paper proves that FedAvg-M can converge under unbounded data heterogeneity even with a constant local learning rate.

Additionally, SCAFFOLD-M is shown to be the first method that provably outperforms the original SCAFFOLD without requiring additional assumptions. In scenarios with partial client participation, SCAFFOLD-M achieves significantly faster convergence rates. For instance, if the number of participating clients $S$ is roughly $N^{2/3}$, the momentum version can be up to $N^{2/9}$ times faster.

Comparison of convergence rates and assumptions.

Empirical Performance

The researchers validated their findings using ResNet-18 and MLP architectures on CIFAR-10 and MNIST datasets. Data was partitioned using a Dirichlet distribution to simulate severe heterogeneity ($\alpha=0.1$).

Empirical performance across training scenarios.

As shown in Figure 1, the momentum-based variants consistently outperform their counterparts. Specifically:

  • Acceleration: FedAvg-M and SCAFFOLD-M reach lower loss values faster than standard FedAvg and SCAFFOLD (Fig 1a).
  • Variance Reduction: FedAvg-M-VR and SCAFFOLD-M-VR achieve the lowest loss among all tested VR methods, including STEM and CE-LSGD (Fig 1b).
  • Robustness: The benefits of momentum are preserved even under partial client participation (Fig 1c).

Conclusion

By simply incorporating momentum, Federated Learning algorithms can overcome the hurdles of data heterogeneity and communication efficiency without complex architectural changes. This work provides both the theoretical foundation and empirical evidence that momentum is a vital component for robust, scalable FL. Future research will look into combining these momentum benefits with communication compression techniques like quantization or sparsification.

Summary updated

BibTeX
@inproceedings{cheng2024momentum,
  author = {Ziheng Cheng and Xinmeng Huang 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