Local SGD Converges Fast and Communicates Little
Sebastian U. Stich
EPFL, Switzerland
Abstract: Mini-batch stochastic gradient descent (SGD) is state of the art in large scale distributed training. The scheme can reach a linear speedup with respect to the number of workers, but this is rarely seen in practice as the scheme often suffers from large network delays and bandwidth limits. To overcome this communication bottleneck recent works propose to reduce the communication frequency. An algorithm of this type is local SGD that runs SGD independently in parallel on different workers and averages the sequences only once in a while. This scheme shows promising results in practice, but eluded thorough theoretical analysis.
We prove concise convergence rates for local SGD on convex problems and show that it converges at the same rate as mini-batch SGD in terms of number of evaluated gradients, that is, the scheme achieves linear speedup in the number of workers and mini-batch size. The number of communication rounds can be reduced up to a factor of T^{1/2} —where T denotes the number of total steps—compared to mini-batch SGD. This also holds for asynchronous implementations.
Local SGD can also be used for large scale training of deep learning models. The results shown here aim serving as a guideline to further explore the theoretical and practical aspects of local SGD in these applications.
Introduction: Stochastic Gradient Descent (SGD) consists of iterations of the form x_{t+1} := x_t - η_t g_t, for iterates (weights) x_t, x_{t+1} ∈ R^d, stepsize (learning rate) η_t > 0, and stochastic gradient g_t ∈ R^d with the property E g_t = ∇f(x_t), for a loss function f: R^d → R. This scheme can easily be parallelized by replacing g_t in (1) by an average of stochastic gradients that are independently computed in parallel on separate workers (parallel SGD). This simple scheme has a major drawback: in each iteration the results of the computations on the workers have to be shared with the other workers to compute the next iterate x_{t+1}. Communication has been reported to be a major bottleneck for many large scale deep learning applications, see e.g. [4, 18, 32, 45]. Mini-batch parallel SGD addresses this issue by increasing the compute to communication ratio. Each worker computes a mini-batch of size b ≥ 1 before communication. This scheme is implemented in state-of-the-art distributed deep learning frameworks [1, 26, 31]. Recent work in [11, 43] explores various limitations of this approach, as in general it is reported that performance degrades for too large mini-batch sizes [14, 19, 42].
In this work we follow an orthogonal approach, stillLocal SGD Converges Fast and Communicates Little
Sebastian U. Stich
EPFL, Switzerland
Abstract: Mini-batch stochastic gradient descent (SGD) is state of the art in large scale distributed training. The scheme can reach a linear speedup with respect to the number of workers, but this is rarely seen in practice as the scheme often suffers from large network delays and bandwidth limits. To overcome this communication bottleneck recent works propose to reduce the communication frequency. An algorithm of this type is local SGD that runs SGD independently in parallel on different workers and averages the sequences only once in a while. This scheme shows promising results in practice, but eluded thorough theoretical analysis.
We prove concise convergence rates for local SGD on convex problems and show that it converges at the same rate as mini-batch SGD in terms of number of evaluated gradients, that is, the scheme achieves linear speedup in the number of workers and mini-batch size. The number of communication rounds can be reduced up to a factor of T^{1/2} —where T denotes the number of total steps—compared to mini-batch SGD. This also holds for asynchronous implementations.
Local SGD can also be used for large scale training of deep learning models. The results shown here aim serving as a guideline to further explore the theoretical and practical aspects of local SGD in these applications.
Introduction: Stochastic Gradient Descent (SGD) consists of iterations of the form x_{t+1} := x_t - η_t g_t, for iterates (weights) x_t, x_{t+1} ∈ R^d, stepsize (learning rate) η_t > 0, and stochastic gradient g_t ∈ R^d with the property E g_t = ∇f(x_t), for a loss function f: R^d → R. This scheme can easily be parallelized by replacing g_t in (1) by an average of stochastic gradients that are independently computed in parallel on separate workers (parallel SGD). This simple scheme has a major drawback: in each iteration the results of the computations on the workers have to be shared with the other workers to compute the next iterate x_{t+1}. Communication has been reported to be a major bottleneck for many large scale deep learning applications, see e.g. [4, 18, 32, 45]. Mini-batch parallel SGD addresses this issue by increasing the compute to communication ratio. Each worker computes a mini-batch of size b ≥ 1 before communication. This scheme is implemented in state-of-the-art distributed deep learning frameworks [1, 26, 31]. Recent work in [11, 43] explores various limitations of this approach, as in general it is reported that performance degrades for too large mini-batch sizes [14, 19, 42].
In this work we follow an orthogonal approach, still