Local SGD Optimizes Overparameterized Neural Networks in Polynomial Time

Yuyang Deng, Mohammad Mahdi Kamani, Mehrdad Mahdavi

Abstract: In this paper we prove that Local (S)GD (or FedAvg) can optimize deep neural networks with Rectified Linear Unit (ReLU) activation function in polynomial time. Despite the established convergence theory of Local SGD on optimizing general smooth functions in communication-efficient distributed optimization, its convergence on non-smooth ReLU networks still eludes full theoretical understanding. The key property used in many Local SGD analysis on smooth function is gradient Lipschitzness, so that the gradient on local models will not drift far away from that on averaged model. However, this decent property does not hold in networks with non-smooth ReLU activation function. We show that, even though ReLU network does not admit gradient Lipschitzness property, the difference between gradients on local models and average model will not change too much, under the dynamics of Local SGD. We validate our theoretical results via extensive experiments. This work is the first to show the convergence of Local SGD on non-smooth functions, and will shed lights on the optimization theory of federated training of deep neural networks.

Introduction

In Federated Learning, the Local SGD algorithm (also known as FedAvg) is the gold standard. Instead of communicating with a central server at every single step, clients perform several local updates on their own data before averaging their models. This drastically reduces communication bottlenecks.

However, there has been a massive gap between practice and theory. Most existing proofs for Local SGD assume the objective function is "smooth" (meaning its gradients don't change too abruptly). But modern deep learning relies on the ReLU activation function, which is notoriously non-smooth. Without smoothness, it is mathematically difficult to bound "client drift"—the tendency for local models to wander too far from each other between synchronization steps. This paper provides the first theoretical guarantee that Local SGD can successfully optimize deep, non-smooth ReLU neural networks to global minima in polynomial time.

Theoretical Framework

The authors analyze Local SGD within the overparameterized regime, where the neural network is significantly wider (has more neurons) than the number of training samples. This setting is a common characteristic of successful deep learning models.

Key Innovations:

  • Semi-gradient Lipschitzness: Since ReLU networks aren't globally smooth, the authors discovered that in a small region around initialization, the gradients behave almost like they are smooth. This allows them to bound the difference between local gradients and the global average gradient.
  • Inductive Analysis: They use an inductive proof to show that as long as the network is wide enough, the training process stays within a "benign" region where the loss strictly decreases and the models don't drift too far apart.
  • Heterogeneous Data Support: The proof accounts for "non-IID" data, meaning every client might have a completely different dataset, which is a primary challenge in real-world federated learning.

Key Insights: Width and Drift

A critical finding of this work is that the "drift" between a local model and the global average is actually bounded by the current loss value. As the loss goes to zero, the drift also effectively vanishes. To guarantee convergence in polynomial time, the network must be sufficiently wide. Specifically, the required number of neurons scales with the number of samples ($n$) and the number of layers ($L$).

Impact of network width ($m$) on convergence for homogeneous and heterogeneous data.

As shown in the experiments above, wider models (larger $m$) converge faster and are more robust to data heterogeneity. Interestingly, as you make a federated model deeper ($L$), you must also increase the width ($m$) of each layer polynomially to maintain the same convergence guarantees.

Empirical Results

The authors validated their findings using the MNIST handwritten digit dataset, simulating 50 clients in both homogeneous (IID) and heterogeneous (non-IID) settings.

  • Linear Convergence: For deterministic local updates, the error drops at a rate of $O(e^{-R})$, where $R$ is the number of communication rounds.
  • Stochastic Convergence: For stochastic updates, they established a convergence rate of $O(e^{-R/R_0})$.
  • Synchronization Gap: Experiments confirmed that while increasing the synchronization gap ($ au$) saves communication, it slows down the overall convergence speed, especially when data is non-IID.
Effect of synchronization gap ($\tau$) on validation accuracy over local iterations.

Limitations and Future Work

While this work marks a significant theoretical milestone, some gaps remain. The theoretical width required ($n^{18}$) is astronomically larger than what is used in practice. This is common in "Neural Tangent Kernel" (NTK) style proofs, but closing this gap is a key challenge for future research. Additionally, the study focuses on standard feed-forward ReLU networks; extending these proofs to more complex architectures like CNNs, ResNets, or Transformers remains an open area of investigation.

Summary updated

BibTeX
@inproceedings{deng2022local,
  author = {Yuyang Deng and Mohammad Mahdi Kamani and Mehrdad Mahdavi},
  title = {{Local SGD Optimizes Overparameterized Neural Networks in Polynomial Time}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2022},
  url = {https://openreview.net/forum?id=MhBMSlqWAi},
}
Figure