Abstract
Sequential recommendation systems face significant challenges when processing "lifelong" user behavior sequences, which can span thousands of interactions over several years. Traditional Transformer-based models suffer from quadratic computational complexity, while RNN-based methods struggle with long-term dependencies and noise. We present LimaRec (Lifelong Incremental Multi-Interest Attention-based Recommendation), a novel architecture that combines incremental linear self-attention with a multi-interest extraction module. LimaRec maintains a constant-time ($O(1)$) update complexity, making it suitable for real-time industrial applications. Our experiments on four large-scale datasets demonstrate that LimaRec significantly outperforms existing state-of-the-art lifelong and multi-interest models in both accuracy and efficiency.
Introduction
In modern e-commerce and content platforms, users accumulate massive amounts of behavior data. Capturing the evolution of user preferences within these lifelong sequences is critical for accurate recommendation. However, existing models face a "lifelong dilemma":
- Computational Cost: Standard self-attention scales quadratically with sequence length. Even linear variants often require re-processing the entire history for each new interaction, which is prohibitive for real-time systems.
- Signal-to-Noise Ratio: Extremely long sequences are inherently noisy; distant historical actions may be irrelevant to current needs.
- Interest Drift: Over time, a user’s interests become multi-faceted, making a single user vector representation insufficient.
LimaRec addresses these issues by leveraging the efficiency of linear attention and the representational power of multi-interest modeling.
The LimaRec Architecture
LimaRec introduces two primary innovations to handle lifelong sequences efficiently:
Incremental Linear Self-Attention
Instead of standard softmax-based attention, LimaRec utilizes a linear attention mechanism via random feature maps. By exploiting the associative property of matrix multiplication, the model maintains a compact "hidden state" that summarizes historical interactions. When a new item is clicked, this state is updated in $O(1)$ time. This allows LimaRec to provide the modeling power of Transformers with the deployment efficiency of an RNN.
Multi-Interest Extraction and Regularization
To capture diverse user preferences, the model employs $K$ trainable interest vectors that act as queries to disentangle the user's history into separate representations (e.g., electronics, fashion, gardening). To prevent these representations from collapsing into a single vector, a Disentangled Regularization loss is applied, encouraging the model to associate the next-item prediction with the most relevant specific interest.
Experimental Evaluation
We evaluated LimaRec against state-of-the-art baselines, including lifelong models (MIMN, HPMN) and multi-interest models (MIND, ComiRec), across four datasets: MovieLens (1M & 25M), XLong (sourced from Alimama), and a massive Industrial dataset from Alibaba containing 161 million actions.
As shown in the results for XLong and Industrial datasets, LimaRec achieves superior performance. On the XLong dataset, LimaRec reached an HR@10 of 0.8931, significantly higher than SASRec (0.8075) and HPMN (0.4796). Notably, LimaRec maintains high performance even as the minimum sequence length increases, demonstrating its robustness in handling long-term dependencies.
Key Insights and Discussion
The "Sparsity" of Time
An interesting observation occurred on the MovieLens datasets: performance for all models tended to decline slightly as sequences became extremely long. This suggests that in datasets spanning decades, behavior from 20 years ago becomes "fuzzy" and less predictive than more recent, high-frequency sessions. This highlights the importance of modeling temporal relevance alongside sequence length.
Efficiency and Scalability
Unlike standard Transformers that scale linearly with sequence length during inference, LimaRec maintains constant time and storage complexity per update. This makes it uniquely viable for industrial deployment where low-latency real-time updates are mandatory.
Conclusion
LimaRec effectively bridges the gap between the expressive power of attention mechanisms and the efficiency requirements of lifelong sequential recommendation. By combining incremental updates with multi-interest disentanglement, it provides a scalable solution for modern recommendation engines. Future work will explore integrating these lifelong representations into the ranking stage of recommendation pipelines and explicitly modeling temporal decay between interactions.
Summary updated