Abstract
Sequential recommender systems (SRS) are vital for capturing dynamic user interests but often rely on massive deep neural networks with large embedding dimensions and deep architectures. These models pose significant deployment challenges on resource-constrained devices due to their memory footprint and latency. We propose CpRec, a compressed sequential recommendation framework utilizing two generic model shrinking techniques: block-wise adaptive decomposition for input and softmax matrices, and layer-wise parameter sharing for hidden layers. Evaluated on real-world datasets, CpRec achieves 4–8x compression rates, improves training and inference speed, and frequently outperforms uncompressed counterparts.
Introduction
Modern sequential recommenders typically follow a "sandwich" architecture, where hidden layers (such as CNNs or RNNs) are situated between a massive input embedding layer and a large softmax output layer. In industrial applications with millions of items, these boundary layers become the primary bottleneck. For instance, a model with 100 million items and a 1024-dimensional embedding could reach 200 billion parameters—orders of magnitude larger than state-of-the-art language models like BERT.
As illustrated in Figure 2, increasing the number of layers or the embedding size generally improves recommendation accuracy (Hit@20), but at the cost of a linear or super-linear increase in parameter count. This scaling makes deployment on mobile or edge devices nearly impossible and can lead to overfitting.
The CpRec Framework
CpRec addresses these challenges through structural optimizations that match model capacity to data distribution.
Block-wise Adaptive Decomposition
Items in recommendation systems typically follow a long-tailed distribution. Most items are rare ("tail"), while a few are highly popular ("head"). CpRec exploits this by assigning varying embedding dimensions based on item frequency. Popular items receive high-rank matrices for rich representation, while rare items use low-rank matrices to save space. A projection matrix then maps these disparate sizes to a consistent hidden dimension. This approach is applied to both the input and softmax layers.
Layer-wise Parameter Sharing
To shrink the hidden layers, CpRec introduces Adjacent-block sharing. Unlike global cross-layer sharing, which can degrade performance in recommendation tasks, this scheme shares parameters only between neighboring residual blocks. This acts as a structural regularizer, stabilizing training while significantly reducing the hidden layer's footprint.
Experimental Evaluation
The framework was tested on five diverse datasets, including Movielens, TikTok, and Weishi.
- Compression Efficiency: CpRec achieved 4x to 8x compression. On the Weishi dataset, parameters were reduced from 74M to 11M without performance loss.
- Speed and Accuracy: On the TikTok dataset, CpRec provided a 9.4x inference speedup and improved MRR@5 by 7.5% compared to the uncompressed NextItNet baseline.
- Regularization Effect: The observation that compressed models often outperform full-sized ones suggests that standard SRS models are over-parameterized. The compression bottleneck forces the model to learn more robust, generalized features.
Conclusion
CpRec demonstrates that massive parameter counts in SRS are often redundant. By utilizing block-wise adaptive decomposition and adjacent-block parameter sharing, we can deploy highly efficient models that maintain or exceed the accuracy of their uncompressed versions. Future work will explore the application of these techniques to Transformer-based architectures and dynamic item distributions.
Summary updated