Skip to main content
QUICK REVIEW

[Paper Review] Stochastic Gradient Descent on Highly-Parallel Architectures

Yujing Ma, Florin Rusu|arXiv (Cornell University)|Feb 24, 2018
Stochastic Gradient Optimization TechniquesComputer Science34 references7 citations
TL;DR

This paper presents a comprehensive performance study of synchronous and asynchronous stochastic gradient descent (SGD) on multi-core CPUs and GPUs for generalized linear models. It introduces an optimized asynchronous SGD algorithm for GPU that leverages warp shuffling and cache coalescing, demonstrating that GPU outperforms CPU by over 400x in synchronous mode, while asynchronous CPU remains the safest choice, with GPU with data replication excelling in specific cases.

ABSTRACT

There is an increased interest in building data analytics frameworks with advanced algebraic capabilities both in industry and academia. Many of these frameworks, e.g., TensorFlow and BIDMach, implement their compute-intensive primitives in two flavors---as multi-thread routines for multi-core CPUs and as highly-parallel kernels executed on GPU. Stochastic gradient descent (SGD) is the most popular optimization method for model training implemented extensively on modern data analytics platforms. While the data-intensive properties of SGD are well-known, there is an intense debate on which of the many SGD variants is better in practice. In this paper, we perform a comprehensive study of parallel SGD for training generalized linear models. We consider the impact of three factors -- computing architecture (multi-core CPU or GPU), synchronous or asynchronous model updates, and data sparsity -- on three measures---hardware efficiency, statistical efficiency, and time to convergence. In the process, we design an optimized asynchronous SGD algorithm for GPU that leverages warp shuffling and cache coalescing for data and model access. We draw several interesting findings from our extensive experiments with logistic regression (LR) and support vector machines (SVM) on five real datasets. For synchronous SGD, GPU always outperforms parallel CPU---they both outperform a sequential CPU solution by more than 400X. For asynchronous SGD, parallel CPU is the safest choice while GPU with data replication is better in certain situations. The choice between synchronous GPU and asynchronous CPU depends on the task and the characteristics of the data. As a reference, our best implementation outperforms TensorFlow and BIDMach consistently. We hope that our insights provide a useful guide for applying parallel SGD to generalized linear models.

Motivation & Objective

  • To understand the combined impact of computing architecture, model update strategy (synchronous/asynchronous), and data sparsity on SGD performance.
  • To address the lack of optimized asynchronous SGD kernels for GPU, a gap in existing literature despite widespread use of Hogwild on CPUs.
  • To provide a practical guide for selecting the optimal SGD configuration (architecture, update strategy, data handling) based on hardware efficiency, statistical efficiency, and time to convergence.
  • To benchmark the proposed implementations against industry-standard frameworks like TensorFlow and BIDMach, aiming for consistent performance superiority.

Proposed method

  • Design and implement an optimized asynchronous SGD algorithm for GPU that exploits architectural features such as warp shuffling and cache coalescing for efficient data and model access.
  • Partition training data across GPU threads and use atomic operations for model updates in the asynchronous setting, minimizing synchronization overhead.
  • Explore multiple data organization and replication strategies to reduce update conflicts and improve load balance in asynchronous GPU execution.
  • Implement both synchronous and asynchronous SGD variants on multi-core CPUs (NUMA) and GPUs, using highly-optimized linear algebra kernels for performance-critical operations.
  • Measure performance across five real-world datasets using logistic regression and support vector machines as test models.
  • Use hardware efficiency (utilization of compute resources), statistical efficiency (convergence rate and solution quality), and time to convergence as primary evaluation metrics.

Experimental results

Research questions

  • RQ1How does the choice between synchronous and asynchronous model updates affect the performance of SGD on multi-core CPUs and GPUs?
  • RQ2What is the impact of data sparsity on the efficiency and convergence of parallel SGD across different architectures?
  • RQ3Can an optimized asynchronous SGD algorithm for GPU outperform existing synchronous GPU and asynchronous CPU implementations in terms of time to convergence?
  • RQ4How do the performance characteristics of synchronous GPU, asynchronous CPU, and GPU with data replication compare across diverse real-world datasets?
  • RQ5To what extent can architectural optimizations like warp shuffling and cache coalescing improve the efficiency of asynchronous SGD on GPU?

Key findings

  • For synchronous SGD, GPU consistently outperforms parallel CPU by more than 400x compared to a sequential CPU implementation.
  • In asynchronous SGD, parallel CPU is the most reliable and safest choice due to minimal conflict overhead, while GPU with data replication achieves superior performance in specific data sparsity and model size scenarios.
  • The choice between synchronous GPU and asynchronous CPU depends critically on the data characteristics and task type, with no single solution being universally optimal.
  • The proposed GPU-optimized asynchronous SGD algorithm, leveraging warp shuffling and cache coalescing, achieves significant performance gains over baseline GPU implementations.
  • The best-performing implementation in this study consistently outperforms both TensorFlow and BIDMach across all evaluated datasets and models.
  • Hardware efficiency is maximized on GPU for synchronous SGD, while statistical efficiency is often higher on asynchronous CPU due to reduced update conflicts.

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.