Source-linked AI summary

Gradient Sparsification for Communication-Efficient Distributed Optimization

Jianqiao Wangni, Jialei Wang, Ji Liu, Tong Zhang

arXiv:1710.09854v1cs.LGmath.NAstat.ML

TL;DR

Distributed machine learning is communication-intensive because workers exchange stochastic gradients. The paper sparsifies gradients through variance-constrained convex optimization and efficient approximate algorithms, with experiments validating the approach across several tasks.

  • Problem

    Communication overhead limits distributed stochastic optimization, motivating methods that reduce exchanged gradient information.

  • Method

    The paper randomly drops gradient coordinates, amplifies retained coordinates for unbiasedness, and optimizes sampling probabilities under a variance budget.

  • Results

    The approach provides theoretically guaranteed sparsity and is validated on logistic regression, support vector machines, and convolutional neural networks.

  • Takeaways & Limitations

    Gradient sparsification offers a communication-reduction strategy that complements fewer communication rounds and reduced-precision gradient representations.

  • Takeaways & Limitations

    Sparsification increases gradient variance and may slow convergence, while experiments report no obviously different convergence rates across implementations.

Abstract

from arXiv · show

Modern large scale machine learning applications require stochastic optimization algorithms to be implemented on distributed computational architectures. A key bottleneck is the communication overhead for exchanging information such as stochastic gradients among different workers. In this paper, to reduce the communication cost we propose a convex optimization formulation to minimize the coding length of stochastic gradients. To solve the optimal sparsification efficiently, several simple and fast algorithms are proposed for approximate solution, with theoretical guaranteed for sparseness. Experiments on $\ell_2$ regularized logistic regression, support vector machines, and convolutional neural networks validate our sparsification approaches.

1 Introduction

The paper targets communication overhead in distributed stochastic optimization by sparsifying stochastic gradients. It proposes variance-aware coding and validates the approach across several machine-learning tasks.

  • Motivation: Distributed stochastic optimization repeatedly exchanges gradients and updated parameters, making worker communication a major efficiency bottleneck.The bottleneck also appears in shared-memory multicore systems through resource-access conflicts.
  • Contribution: The proposed approach complements communication-round reduction and reduced-precision methods by sparsifying stochastic gradients with only a minor iteration increase.It drops selected coordinates while preserving useful gradient information.
  • Contribution: The method drops gradient coordinates, amplifies those retained to preserve unbiasedness, and uses a convex formulation to trade variance against sparsity.Approximate solutions are obtained with efficient algorithms and sparsity guarantees.
  • Evaluation: Experiments evaluate the approach on ℓ2 regularized logistic regression, support vector machines, and convolutional neural networks using synthetic and real data.The technique is designed to integrate with benchmark stochastic optimization algorithms.

2 Related works

Related work reduces distributed optimization cost through fewer communication rounds, lower gradient precision, parallel stochastic methods, and asynchronous execution. Gradient sparsification is presented as a complementary communication strategy.

  • Communication rounds: Communication-efficient distributed algorithms have reduced the number of communication rounds among workers.Examples include one-shot averaging, DANE, and AIDE, each addressing communication under different assumptions or computational requirements.
  • Parallel stochastic optimization: Parallel and asynchronous stochastic methods address communication while retaining SGD-type optimization, including modified large-minibatch procedures and asynchronous SVRG.The cited approaches rely on settings or assumptions under which convergence or speedup is established.
  • Gradient precision: Reduced-precision methods lower network communication by representing gradients with fewer bits, including the aggressive 1Bit-SGD sign-only heuristic.These methods address communication through numerical compression rather than coordinate removal.
  • Positioning: The paper positions gradient sparsification as a complementary approach to reducing communication cost alongside communication-round and precision-reduction methods.Its focus is transmitting fewer gradient coordinates rather than only changing synchronization frequency or numeric precision.

3 Algorithms

The algorithm randomly sparsifies stochastic gradients while preserving unbiasedness, then selects sampling probabilities by optimizing coding length under a variance budget. Closed-form and greedy procedures support efficient distributed use and hybrid message coding.

  • Problem setup: The paper formulates stochastic-gradient sparsification as a linear planning problem over coordinate-selection probabilities.The formulation is built for a training set with per-example loss functions and model parameter vector w.
  • Stochastic gradients: An unbiased stochastic gradient satisfies E[gt(w)] = ∇f(w), and its second moment or variance affects convergence efficiency.The discussion applies to SGD and variance-reduced estimators such as SVRG.
  • Gradient sparsification: Each coordinate gi is retained with probability pi and rescaled to gi/pi, producing Q(g)i = Zi(gi/pi) while preserving unbiasedness.The selection variables Zi are binary, with Zi = 1 at probability pi.
  • Distributed protocol: In distributed optimization, workers compute local stochastic gradients, sparsify them, aggregate them with All-Reduce, and receive the average through Broadcast.The procedure is specified for synchronous optimization and can also be used similarly with asynchronous algorithms.
  • Variance–sparsity tradeoff: Sparsification reduces communication but increases gradient variance, so the method optimizes the sparsity–variance tradeoff under a variance-increase factor ϵ.The resulting optimal strategy has a closed-form solution based on the gradient and variance budget.
  • Coding strategy: The coding strategy separates always-kept coordinates from other nonzero coordinates, encoding values, indices, and signs with a hybrid representation.For coordinates outside Sk, the quantized value is sign(gi)/λ, so one shared floating-point value plus indices and signs suffices.

4 Theoretical guarantees on sparsity

Under approximate sparsity, the proposed sparsification controls both expected transmitted coordinates and coding length while limiting variance growth. The resulting guarantees quantify communication savings in terms of sparsity, approximation, dimension, and floating-point cost.

  • A (ρ, s)-approximately sparse gradient admits sparsification with variance increased by no more than a factor of 1+ρ.
  • The sparsification guarantee is obtained by selecting the approximate-sparsity subset S as the retained coordinate set and setting the variance parameter ϵ to ρ.
  • (1+ρ)s bounds the expected sparsity of the sparsified gradient when g is (ρ, s)-approximately sparse.Approximate sparsity measures concentration of the vector's signal on a subset of s coordinates.
  • Theorem 4 bounds the coding length of Q(g) by s(b + log2 d) + min(ρs log2 d, d) + b bits.The bound assumes a floating-point scalar costs b bits.
  • Compared with db bits for the original gradient, total communication is reduced by at least (1 + ρ)((s + 1)b + log2 d)/db.This comparison accounts for the slightly increased number of iterations needed to reach the same optimization accuracy.

5 Experiments

The experiments evaluate gradient sparsification across convex optimization, neural-network, and asynchronous parallel settings, comparing variance, convergence, communication cost, and training speed. Results show lower variance and faster convergence than uniform sampling, slight non-convex training slowdown, and strong performance relative to QSGD under stronger sparsity.

  • Experimental scope: The experiments use logistic regression, support vector machines, and convolutional neural networks to assess sparsification across convex and non-convex problems.The study also evaluates asynchronous parallel implementations on shared-memory architectures.
  • Experimental setup: The greedy algorithm produces a high-quality approximation of the optimal sampling probabilities after two iterations in convex problems and neural networks.Further updates are comparatively negligible by more than one order.
  • Convex problems: Sparser data yields smaller gradient variance, while GSpar produces lower variance and faster convergence than uniform sampling.These results are consistent with minimizing gradient variance under a fixed sparsity level.
  • Convex problems: SVRG shows better speedup: although sparsification increases gradient variance, its convergence rate degrades only slightly.The reported communication complexity reduction is inferred from the product var × spa, where spa denotes the sparsity parameter ρ.
  • Convex problems: The proposed sparsification is at least comparable to QSGD and significantly outperforms it when gradient sparsity is stronger.The comparison uses SGD-type approaches under weaker and stronger sparsity settings.
  • Deep learning: For convolutional neural networks, gradient sparsification slows training efficiency only slightly when objective loss is evaluated against epochs and communication cost.The experiments average results over four repetitions.

6 Conclusions

The paper presents gradient sparsification as a communication-reduction technique for distributed machine learning, combining unbiased coordinate dropping with variance-controlled convex optimization and approximate algorithms.

  • Gradient sparsification reduces communication by randomly dropping stochastic-gradient coordinates and appropriately amplifying those retained to preserve unbiasedness.
  • A convex formulation minimizes stochastic-gradient coding length under a variance budget, while approximate algorithms provide efficient solutions with theoretically guaranteed sparsity.
  • Experiments on ℓ2 regularized logistic regression and convolutional neural networks show effective communication reduction during training.
  • The method also improves multi-thread SVM running time by reducing conflicts when threads compete for shared memory.
Loading 1710.09854v1…