Introduction
In modern recommender systems, user preferences are dynamic, consisting of stable long-term tastes and rapidly shifting short-term interests, often referred to as "preference drift." While dynamic graph neural networks (GNNs) excel at capturing long-term collaborative signals, they frequently struggle to explicitly encode sharp pivots in user behavior. Conversely, sequential models like LSTMs handle short-term trends but miss the complex structural relationships between users and items.
LSTSR (Long Short-Term Preference Modeling) bridges this gap. It is a novel framework for continuous-time sequential recommendation that integrates a specialized memory mechanism into a dynamic graph architecture. LSTSR achieves state-of-the-art accuracy while delivering up to a 10x speedup in inference compared to previous leading methods.
Methodology
The LSTSR architecture is designed to process user-item interactions within a continuous-time dynamic graph (CTDG). It consists of four primary components:
- Dynamic Graph Construction: Interactions are represented as a chronologically ordered graph where edges are timestamped.
- Long Short-Term Embedding Layer: This core module utilizes three embedding types:
- Continuous-Time: Maps timestamps into vectors using Bochner’s Theorem to handle time-based kernels.
- Long-Term: Standard global ID-based embeddings for stable preferences.
- Short-Term (Memory Mechanism): A dedicated module using Message, Aggregate, and Update operations. It employs a Gated Recurrent Unit (GRU) to update the node state upon each interaction, effectively "memorizing" compressed history.
- Dynamic Collaborative Transformer (DCT): A self-attention mechanism (DSACF) captures collaborative signals from a user’s neighbors, integrating social/collaborative context.
- Recommendation & Optimization: Final representations generate affinity scores via a feed-forward network, optimized using Bayesian Personalized Ranking (BPR) loss.
Experimental Setup
The model was evaluated on five diverse datasets:
- Wikipedia & Reddit: One month of user-edit and user-post interactions, respectively.
- Amazon Subsets: Software, Musical Instruments, and Luxury Beauty categories, providing varying levels of data sparsity.
Results and Discussion
LSTSR demonstrates significant improvements in both accuracy and efficiency.
Superior Accuracy and Robustness
LSTSR consistently outperformed state-of-the-art baselines such as TGSRec and JODIE. It improved NDCG@10 by 25.31% on Wikipedia and 71.87% on the Amazon Software dataset. Notably, the model remains robust even when training data is limited. As shown in the performance analysis, LSTSR maintains a substantial lead over baselines even when only 25% of the training data is utilized.
Efficiency and Recency
A key finding is the importance of recency; the authors discovered that using the last interaction in the memory module's "Aggregate" phase was more effective than mean or attention-based aggregation. This suggests the most recent action is the strongest signal for short-term drift. Furthermore, by storing 1-hop information in a compressed memory state, LSTSR avoids "neighborhood explosion," resulting in a 5x training speedup and a 10x inference speedup over TGSRec.
Conclusion
LSTSR provides a powerful solution for modeling the duality of user preferences in continuous time. By explicitly encoding short-term states through a memory mechanism, it reacts quickly to behavioral changes without sacrificing the structural insights of graph-based methods. Future work will address noise sensitivity in long user histories and adapt the framework for real-time online streaming environments.
Summary updated