Skip to main content
QUICK REVIEW

[Paper Review] Parallel SGD: When does averaging help?

Jian Zhang, Christopher De|arXiv (Cornell University)|Jun 23, 2016
Stochastic Gradient Optimization TechniquesComputer Science2 references78 citations
TL;DR

This paper investigates periodic model averaging in parallel stochastic gradient descent (SGD), showing that frequent averaging reduces variance and accelerates convergence in convex problems when gradient variance is high far from the optimum, and prevents poor solutions in non-convex settings by avoiding premature averaging of divergent local minima. It demonstrates that optimal averaging frequency depends on the gradient variance envelope and curvature, with empirical validation on synthetic and real datasets including MNIST and E2006.

ABSTRACT

Consider a number of workers running SGD independently on the same pool of data and averaging the models every once in a while -- a common but not well understood practice. We study model averaging as a variance-reducing mechanism and describe two ways in which the frequency of averaging affects convergence. For convex objectives, we show the benefit of frequent averaging depends on the gradient variance envelope. For non-convex objectives, we illustrate that this benefit depends on the presence of multiple globally optimal points. We complement our findings with multicore experiments on both synthetic and real data.

Motivation & Objective

  • Understand the conditions under which periodic model averaging improves convergence in parallel SGD.
  • Address the lack of theoretical understanding for a widely used practice: averaging models from multiple parallel SGD workers at regular intervals.
  • Investigate whether more frequent averaging always leads to faster convergence, especially in non-convex settings where one-shot averaging may fail.
  • Develop a gradient variance model to explain empirical benefits of periodic averaging, particularly in terms of variance envelope and curvature.
  • Validate theoretical insights through multicore experiments on real and synthetic data, including logistic regression and CNNs on MNIST.

Proposed method

  • Propose a novel gradient variance model defined by the envelope of gradient variance and curvature, parameterized by ρ = β² / σ², where β² captures curvature and σ² is the variance at the optimum.
  • Analyze convex objectives by deriving bounds on worker deviation from the average model, showing that frequent averaging reduces the noise ball size when variance is high away from the optimum.
  • Model non-convex problems by showing that one-shot averaging can combine models from different local minima, leading to worse solutions, while periodic averaging keeps workers in the same basin of attraction.
  • Implement periodic averaging on a multicore system with M workers, where each phase consists of K steps before averaging the models.
  • Use a line search method to estimate β² and σ² from gradient variance measurements along random lines through the optimum, enabling empirical estimation of ρ.
  • Compare one-shot averaging, periodic averaging (every 128 and 1024 steps), and single-worker SGD across multiple datasets and models, including logistic regression and CNNs on MNIST.

Experimental results

Research questions

  • RQ1Under what conditions does periodic averaging improve convergence in convex parallel SGD compared to one-shot averaging?
  • RQ2How does the gradient variance envelope influence the effectiveness of periodic averaging in convex optimization?
  • RQ3Why does one-shot averaging often fail in non-convex settings, and how does periodic averaging mitigate this issue?
  • RQ4To what extent does the curvature of the objective function (captured by β²) affect the benefit of frequent averaging?
  • RQ5Can the theoretical model based on ρ = β² / σ² predict the empirical performance gain of periodic averaging across different datasets and models?

Key findings

  • For convex problems, periodic averaging leads to faster convergence when the gradient variance is higher far from the optimum, as measured by a larger ρ = β² / σ².
  • In logistic regression on sparse E2006 datasets, periodic averaging (every 128 steps) outperforms one-shot averaging, with a measurable speedup correlated to higher ρ values.
  • On dense YearPrediction data, where ρ is smaller, the performance gap between periodic and one-shot averaging is minimal, confirming the model’s prediction.
  • In non-convex settings, one-shot averaging degrades performance compared to single-worker results, often producing worse training loss and test error than even the worst individual worker.
  • Periodic averaging (every 128 steps) on a CNN for MNIST improves convergence and generalization, outperforming both one-shot averaging and the best single worker.
  • The empirical results validate the theoretical model: the speedup from periodic averaging correlates strongly with the measured ρ value across different datasets and models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.