Abstract
On-device recommendation systems face significant memory constraints due to massive embedding tables. While Dynamic Sparse Training (DST) offers a potential solution, existing methods suffer from poor initialization, recency bias in parameter regrowth, and dense gradient bottlenecks. This paper introduces SparseRec, a framework that maintains end-to-end sparsity throughout the training process. By utilizing NMF-based initialization and cumulative gradient-driven regrowth, SparseRec achieves up to an 11.79% performance improvement over state-of-the-art methods while significantly reducing memory overhead.
Introduction
Modern recommender systems rely on high-dimensional embedding tables that map users and items to vectors. These tables are often too large for resource-constrained devices like smartphones. Dynamic Sparse Training (DST) attempts to mitigate this by pruning and regrowing parameters during training. However, the authors identify three critical flaws in current DST approaches:
- Inefficient Initialization: Random sparse masks often lead to poor local optima from the start.
- Recency Bias: Regrowth decisions based on single-batch gradients ignore global data importance, favoring recently seen items.
- Memory Bottlenecks: Calculating dense gradients during backpropagation negates the benefits of sparse weights, making on-device training difficult.
Methodology: The SparseRec Framework
SparseRec addresses these challenges through three core innovations designed to maintain sparsity throughout the training lifecycle.
NMF-based Mask Initialization
Instead of random initialization, SparseRec applies Non-negative Matrix Factorization (NMF) to the user-item interaction matrix. This creates a data-driven initial mask, providing a "warm start" that aligns the model's structure with the underlying data distribution from the beginning.
Cumulative Gradient Regrowth
To overcome recency bias, SparseRec accumulates gradients over a window of training steps ($\Delta t$). This cumulative approach ensures that parameter reactivation is based on a broader view of data importance rather than the noise of the most recent batch.
Sparse Gradient Computation and Sampling
To ensure the backward pass remains memory-efficient, SparseRec samples a subset of embedding vectors based on user and item frequency. Gradients are only computed for these sampled parameters, preventing the memory spikes typically associated with dense gradient matrices during backpropagation.
Experimental Evaluation
The framework was evaluated on the Gowalla (~1M interactions) and Yelp2018 (~1.5M interactions) datasets. SparseRec was integrated with three base Graph Neural Network (GNN) recommenders: XSimGCL, MGDCF, and LightGCN.
Key Results
- Superior Accuracy: SparseRec outperformed state-of-the-art baselines (e.g., PEP, DSL) in 16 out of 18 test scenarios. Notably, it achieved an 11.79% increase in Recall@20 on the Yelp dataset at a 6.25% density ratio.
- Efficiency at Scale: The performance advantage of SparseRec increased as the model became sparser, highlighting its effectiveness for extreme memory constraints.
- Reduced Peak Memory: By avoiding dense gradient computation, SparseRec maintains a lower memory footprint than traditional DST methods during the entire training process.
Discussion and Conclusion
SparseRec demonstrates that end-to-end sparsity is achievable without sacrificing accuracy. The success of NMF-based initialization suggests that the structural distribution of sparsity is as critical as the density level itself. While the model shows high robustness, future research will focus on optimizing hyperparameters like the sampling ratio ($\omega$) and exploring the application of these techniques to Large Language Model (LLM)-based recommenders.
Summary updated