提出轻量级稀疏训练方法,提升移动端推荐系统的内存效率与性能。
Sparser Training for On-Device Recommendation Systems
- 用非负矩阵分解初始化掩码,构建更有效的稀疏连接。
- 通过梯度累积识别关键未激活参数,提升模型表现。
- 仅对重要向量计算梯度,实现前向后向全程稀疏化。
推荐系统常依赖大型嵌入表,将用户和物品映射为固定大小的稠密向量,导致内存占用大、效率低,尤其在移动设备与物联网(WoT)等内存受限场景下尤为突出。尽管基于动态稀疏训练(DST)的嵌入剪枝方法因训练与推理成本低、稀疏性稳定且端到端可微而表现优异,但仍存在三大挑战:一是掩码矩阵通常采用随机均匀稀疏初始化,导致连接结构混乱、效率低下;二是重激活时倾向于选择上一批次中梯度大的参数,未必提升整体性能;三是虽前向使用稀疏权重,但反向传播仍需计算稠密梯度。本文提出SparseRec,一种基于DST的轻量级嵌入方法,以解决上述问题。具体而言,SparseRec采用非负矩阵分解(NMF)初始化掩码矩阵,提升初始稀疏结构质量;通过累积梯度识别更可能提升性能的未激活参数,指导重激活策略;同时,在反向传播中仅采样重要向量进行梯度计算,避免稠密梯度,实现前向与反向全程稀疏化。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。