arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1802.08800cs.DBcs.DCcs.LGcs.PF
收藏

高度并行结构上的随机梯度下降算法

Stochastic Gradient Descent on Highly-Parallel Architectures

University of California Merced(加州大学默塞德分校)

Yujing Ma, Florin Rusu, Martin Torres

摘要:

在工业界和学术界,人们对构建具有高级代数功能的数据分析框架的兴趣越来越大。这些框架中的许多,例如,TensorFlow和BIDMach以两种方式实现其计算密集型原语-作为多核CPU的多线程例程和在GPU上执行的高度并行内核。随机梯度下降(SGD)是在现代数据分析平台上广泛实施的模型训练的最流行的优化方法。虽然SGD的数据密集型属性是众所周知的,但对于众多SGD变体中哪一个在实践中更好存在激烈的争论。在本文中,我们进行了全面的研究并行SGD训练广义线性模型。我们考虑了三个因素的影响-计算架构(多核CPU或GPU),同步或异步模型更新和数据稀疏性-对三个指标的影响-硬件效率,统计效率和收敛时间。在这个过程中,我们设计了一个优化的异步SGD算法的GPU,利用翘曲洗牌和缓存合并的数据和模型访问。我们从我们在五个真实数据集上使用逻辑回归(LR)和支持向量机(SVM)的广泛实验中得出了一些有趣的发现。对于同步SGD,GPU总是优于并行CPU-它们都比顺序CPU解决方案高出400倍以上。对于异步SGD,并行CPU是最安全的选择,而具有数据复制的GPU在某些情况下更好。同步GPU和异步CPU之间的选择取决于任务和数据的特征。作为参考,我们的最佳实现始终优于TensorFlow和BIDMach。我们希望我们的见解提供了一个有用的指导应用并行SGD广义线性模型。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑