Introduction
Sequential recommendation systems aim to predict a user's next interaction by analyzing their historical behavior. While Recurrent Neural Networks (RNNs) like GRU and LSTM are standard choices, they often struggle to capture very long-term dependencies. Memory-based Neural Recommenders (MNR) address this by utilizing an external memory matrix to explicitly store past information. However, typical MNRs face a significant bottleneck: they perform computationally expensive "read" and "write" operations at every single time step. For industrial-scale systems handling millions of users and long interaction sequences, this frequent memory access is prohibitive.
CmnRec introduces a "chunking" framework for memory-based sequential recommendation models, designed to slash computational overhead. By grouping user interactions into chunks and performing memory operations only at specific intervals, the framework achieves up to a 10x speedup in inference and 7x in training while maintaining or even improving recommendation accuracy.
The Chunk Framework
The core innovation of CmnRec is the Chunk framework, inspired by the cognitive psychology principle that humans remember information more efficiently by grouping individual units into meaningful "chunks." The framework consists of three main components that modify the standard memory network architecture:
- Chunk Area: A temporary buffer that stores the hidden states generated by the controller (e.g., a GRU) during "non-chunk" time steps.
- Attention Machine: When a "chunk time" is reached, this component uses an attention mechanism to aggregate the most relevant information from the buffer into a single representative vector, which is then used to update the memory.
- Chunk Rules: These determine when memory should be updated. The authors propose two strategies:
- Periodic Chunk (PEC): Memory is updated at fixed, equal intervals.
- Time-Sensitive Chunk (TSC): Updates happen more frequently for recent items and less frequently for older ones, aligning with the "recency bias" often found in user behavior.
By only updating the external memory at the end of a chunk, the model drastically reduces the number of expensive memory matrix operations without losing the global context provided by the external memory.
Empirical Insights: Recency and Denoising
The authors conducted a cosine similarity analysis to validate their chunking strategies. As shown in the figure below, more recent items in a sequence consistently exhibit a higher correlation with the next target item across different datasets. This empirical evidence validates the TSC (Time-Sensitive Chunk) approach, which allocates more "memory slots" to recent behavior to capture high-fidelity short-term intent.
Furthermore, the study revealed that "less is more" regarding update frequency. Updating memory less frequently can actually improve performance by acting as a "denoiser." By aggregating multiple proximal interactions before writing to memory, the model smooths out "noisy" or accidental clicks that do not reflect the user's true long-term interests.
Experimental Results
The authors evaluated CmnRec on three real-world datasets: weishi (short sequences), ml-10M (medium sequences), and ml-latest (long sequences).
- Efficiency Gains: On the
ml-latestdataset, CmnRec achieved a 10.07x average speedup in inference and a 6.34x speedup in training time per epoch compared to the standard SRMN model. - Accuracy Improvements: Despite the reduced memory operations, the TSC variant consistently outperformed or matched the baseline SRMN. For instance, on
ml-10M, TSC with 9 memory slots showed a 1.72% improvement in MRR@5 over the standard memory network. - Stability: CmnRec models demonstrated more stable convergence and better resistance to overfitting compared to vanilla RNNs like GRU4Rec.
Conclusion
CmnRec challenges the assumption that there is an inherent trade-off between speed and precision in sequential recommendation. By leveraging a chunking framework, the model achieves state-of-the-art accuracy while providing the efficiency required for real-world deployment. Future work may explore learnable chunking rules using reinforcement learning to dynamically determine the importance of specific user interactions.
Summary updated