Table of Contents
Fetching ...

Distributed Gradient Descent with Many Local Steps in Overparameterized Models

Heng Zhu, Harsh Vardhan, Arya Mazumdar

TL;DR

This study shows that in overparameterized settings, distributed Local-GD with many local steps can converge to the centralized model in key senses. For linear regression, the aggregated global model exactly converges to the centralized solution as communication rounds increase, despite data heterogeneity. For linear classification, the global model converges in direction to the same global feasible set as the centralized max-margin solution, and a Modified Local-GD can guarantee convergence to the centralized model in direction. Empirical results on linear tasks and neural-network fine-tuning corroborate the theory, offering a principled explanation for the practical success of FedAvg-like methods in heterogeneous distributed training.

Abstract

In distributed training of machine learning models, gradient descent with local iterative steps is a very popular method, variants of which are commonly known as Local-SGD or the Federated Averaging (FedAvg). In this method, gradient steps based on local datasets are taken independently in distributed compute nodes to update the local models, which are then aggregated intermittently. Although the existing convergence analysis suggests that with heterogeneous data, FedAvg encounters quick performance degradation as the number of local steps increases, it is shown to work quite well in practice, especially in the distributed training of large language models. In this work we try to explain this good performance from a viewpoint of implicit bias in Local Gradient Descent (Local-GD) with a large number of local steps. In overparameterized regime, the gradient descent at each compute node would lead the model to a specific direction locally. We characterize the dynamics of the aggregated global model and compare it to the centralized model trained with all of the data in one place. In particular, we analyze the implicit bias of gradient descent on linear models, for both regression and classification tasks. Our analysis shows that the aggregated global model converges exactly to the centralized model for regression tasks, and converges (in direction) to the same feasible set as centralized model for classification tasks. We further propose a Modified Local-GD with a refined aggregation and theoretically show it converges to the centralized model in direction for linear classification. We empirically verified our theoretical findings in linear models and also conducted experiments on distributed fine-tuning of pretrained neural networks to further apply our theory.

Distributed Gradient Descent with Many Local Steps in Overparameterized Models

TL;DR

This study shows that in overparameterized settings, distributed Local-GD with many local steps can converge to the centralized model in key senses. For linear regression, the aggregated global model exactly converges to the centralized solution as communication rounds increase, despite data heterogeneity. For linear classification, the global model converges in direction to the same global feasible set as the centralized max-margin solution, and a Modified Local-GD can guarantee convergence to the centralized model in direction. Empirical results on linear tasks and neural-network fine-tuning corroborate the theory, offering a principled explanation for the practical success of FedAvg-like methods in heterogeneous distributed training.

Abstract

In distributed training of machine learning models, gradient descent with local iterative steps is a very popular method, variants of which are commonly known as Local-SGD or the Federated Averaging (FedAvg). In this method, gradient steps based on local datasets are taken independently in distributed compute nodes to update the local models, which are then aggregated intermittently. Although the existing convergence analysis suggests that with heterogeneous data, FedAvg encounters quick performance degradation as the number of local steps increases, it is shown to work quite well in practice, especially in the distributed training of large language models. In this work we try to explain this good performance from a viewpoint of implicit bias in Local Gradient Descent (Local-GD) with a large number of local steps. In overparameterized regime, the gradient descent at each compute node would lead the model to a specific direction locally. We characterize the dynamics of the aggregated global model and compare it to the centralized model trained with all of the data in one place. In particular, we analyze the implicit bias of gradient descent on linear models, for both regression and classification tasks. Our analysis shows that the aggregated global model converges exactly to the centralized model for regression tasks, and converges (in direction) to the same feasible set as centralized model for classification tasks. We further propose a Modified Local-GD with a refined aggregation and theoretically show it converges to the centralized model in direction for linear classification. We empirically verified our theoretical findings in linear models and also conducted experiments on distributed fine-tuning of pretrained neural networks to further apply our theory.

Paper Structure

This paper contains 25 sections, 9 theorems, 66 equations, 2 figures, 3 algorithms.

Key Result

Lemma 1

When the local overparameterized linear regression problems are exactly solved by gradient descent, then after $K$ rounds of communication, the global model $w_0^K$ obtained from Local-GD is where $\bar{P} = \frac{1}{M} \sum_{i=1}^M P_i, \bar{Q} = \frac{1}{M} \sum_{i=1}^M P_i w_i^*, \bar{Z} = \frac{1}{M} \sum_{i=1}^M X_i^{\dag} z_i$.

Figures (2)

  • Figure 1: From left to right, from up to bottom (LR: Linear Regression, LC: Linear Classification, NN: Neural Network): (a) Difference between models with communication rounds in LR. (b) Difference between models with dimension in LR. (c) Generalization error with dimension in LR. (d) Difference between global model and centralized model with $R$ in LC. (e) Difference between global model and centralized model with $d$ in LC. (f) Difference from SVM model with $d$ in LC. (g) Test Accuracy in LC. (h) Difference between global model and centralized model with communication rounds in NN. (i) Test accuracy with communication rounds in NN.
  • Figure 2: Local-GD on linear classification with Dirichlet distribution.

Theorems & Definitions (11)

  • Lemma 1
  • Theorem 1
  • Lemma 2
  • Lemma 3: Theorem 1 and Proposition 8, combettes1994inconsistent
  • Theorem 2
  • Lemma 4: Theorem 5.3, combettes1996convex
  • Theorem 3
  • Lemma 5
  • proof
  • Lemma 6
  • ...and 1 more