arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.07334cs.DCcs.LG
收藏

HEAT:一种用于CPU上基于协同过滤的推荐的高效且经济的训练系统

HEAT: A Highly Efficient and Affordable Training System for Collaborative Filtering Based Recommendation on CPUs

Indiana University(印第安纳大学);Microsoft(微软);Argonne National Labotary(阿贡国家实验室)

Chengming Zhang, Shaden Smith, Baixi Sun, Jiannan Tian, Jonathan Soifer, Xiaodong Yu, Shuaiwen Leon Song, Yuxiong He, Dingwen Tao

AI总结:

针对现有SimpleX协同过滤推荐算法在多核CPU上性能受限的问题,提出HEAT训练系统,通过嵌入矩阵分块、向量乘积并行化、中间结果复用三类优化,实现了远超CPU和GPU现有方案的性能与成本优势。

摘要:

协同过滤(CF)已被证明是最有效的推荐技术之一。在所有CF方法中,SimpleX是采用新型损失函数和适量负样本的当前最优方法。然而,目前尚无针对多核CPU优化SimpleX的研究,导致其性能受限。为此,我们对现有SimpleX实现进行了深入的性能剖析与分析,确定了其性能瓶颈包括:(1)不规则内存访问;(2)不必要的内存拷贝;(3)冗余计算。为解决这些问题,我们提出了一种高效的CF训练系统(名为HEAT),该系统充分利用了现代CPU的多级缓存和多线程能力。具体而言,HEAT的优化分为三方面:(1)对嵌入矩阵进行分块以提高数据局部性并减少缓存未命中(从而降低读取延迟);(2)通过并行化向量乘积而非矩阵-矩阵乘法(尤其是其中的相似度计算)来优化带采样的随机梯度下降(SGD),避免矩阵数据准备过程中的内存拷贝;(3)在后向传播阶段积极复用前向传播阶段的中间结果,以减少冗余计算。在x86和ARM架构处理器上对五个广泛使用的数据集进行的评估表明,HEAT相比现有CPU解决方案实现了最高45.2倍的加速比,相比使用NVIDIA V100 GPU的现有GPU解决方案,在云端实现了4.5倍的加速比和7.9倍的成本降低。

英文摘要:

Collaborative filtering (CF) has been proven to be one of the most effective techniques for recommendation. Among all CF approaches, SimpleX is the state-of-the-art method that adopts a novel loss function and a proper number of negative samples. However, there is no work that optimizes SimpleX on multi-core CPUs, leading to limited performance. To this end, we perform an in-depth profiling and analysis of existing SimpleX implementations and identify their performance bottlenecks including (1) irregular memory accesses, (2) unnecessary memory copies, and (3) redundant computations. To address these issues, we propose an efficient CF training system (called HEAT) that fully enables the multi-level caching and multi-threading capabilities of modern CPUs. Specifically, the optimization of HEAT is threefold: (1) It tiles the embedding matrix to increase data locality and reduce cache misses (thus reduces read latency); (2) It optimizes stochastic gradient descent (SGD) with sampling by parallelizing vector products instead of matrix-matrix multiplications, in particular the similarity computation therein, to avoid memory copies for matrix data preparation; and (3) It aggressively reuses intermediate results from the forward phase in the backward phase to alleviate redundant computation. Evaluation on five widely used datasets with both x86- and ARM-architecture processors shows that HEAT achieves up to 45.2X speedup over existing CPU solution and 4.5X speedup and 7.9X cost reduction in Cloud over existing GPU solution with NVIDIA V100 GPU.

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

↑