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

面向端侧推荐系统的稀疏化训练

Sparser Training for On-Device Recommendation Systems

Yunke Qu, Liang Qu, Tong Chen, Xiangyu Zhao, Jianxin Li, Hongzhi Yin

AI总结:

本文提出基于动态稀疏训练的轻量级嵌入方法 SparseRec,通过非负矩阵分解初始化掩码、梯度累积识别重要参数以及反向传播中仅对重要向量子集计算梯度,在保持训练稀疏性的同时提升端侧推荐系统的性能与效率。

摘要:

推荐系统通常依赖大型嵌入表将用户和物品映射为统一大小的稠密向量,导致大量内存消耗和效率低下。这一问题在移动设备和万维物联网(WoT)应用等内存受限环境中尤为突出,因为在这些场景下可扩展性和实时性能至关重要。已有许多研究工作试图解决这些问题。尽管利用动态稀疏训练(Dynamic Sparse Training,DST)的嵌入剪枝方法因其较低的训练和推理成本、一致的稀疏性以及端到端可微性而脱颖而出,但它们仍面临几个关键挑战。首先,它们通常使用随机均匀稀疏初始化来初始化用于剪枝冗余参数的掩码矩阵,这种策略往往会产生非结构化且低效的连接,从而导致性能不理想。其次,当它们重新激活具有较大梯度幅值的被剪枝参数时,往往偏向于在权重探索之前单个批次中采样到的用户或物品,这并不一定能提升整体性能。第三,虽然它们在前向传播中使用稀疏权重,但在反向传播中仍需计算稠密梯度。在本文中,我们提出 SparseRec,一种基于动态稀疏训练的轻量级嵌入方法,以解决上述问题。具体而言,SparseRec 使用非负矩阵分解(Nonnegative Matrix Factorization)初始化掩码矩阵。它累积梯度以识别那些在激活后能够更好提升模型性能的非活跃参数。此外,它通过采样重要向量的子集来避免反向传播中的稠密梯度计算。梯度仅针对该子集中的参数进行计算,从而在前向和反向传播过程中都保持训练稀疏性。

英文摘要:

Recommender systems often rely on large embedding tables that map users and items to dense vectors of uniform size, leading to substantial memory consumption and inefficiencies. This is particularly problematic in memory-constrained environments like mobile and Web of Things (WoT) applications, where scalability and real-time performance are critical. Various research efforts have sought to address these issues. Although embedding pruning methods utilizing Dynamic Sparse Training (DST) stand out due to their low training and inference costs, consistent sparsity, and end-to-end differentiability, they face key challenges. Firstly, they typically initializes the mask matrix, which is used to prune redundant parameters, with random uniform sparse initialization. This strategy often results in suboptimal performance as it creates unstructured and inefficient connections. Secondly, they tend to favor the users/items sampled in the single batch immediately before weight exploration when they reactivate pruned parameters with large gradient magnitudes, which does not necessarily improve the overall performance. Thirdly, while they use sparse weights during forward passes, they still need to compute dense gradients during backward passes. In this paper, we propose SparseRec, an lightweight embedding method based on DST, to address these issues. Specifically, SparseRec initializes the mask matrix using Nonnegative Matrix Factorization. It accumulates gradients to identify the inactive parameters that can better improve the model performance after activation. Furthermore, it avoids dense gradients during backpropagation by sampling a subset of important vectors. Gradients are calculated only for parameters in this subset, thus maintaining sparsity during training in both forward and backward passes.

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

↑