Papers
Topics
Authors
Recent
Search
2000 character limit reached

SLSREC: Self-Supervised Contrastive Learning for Adaptive Fusion of Long- and Short-Term User Interests

Published 6 Apr 2026 in cs.IR and cs.LG | (2604.04530v1)

Abstract: User interests typically encompass both long-term preferences and short-term intentions, reflecting the dynamic nature of user behaviors across different timeframes. The uneven temporal distribution of user interactions highlights the evolving patterns of interests, making it challenging to accurately capture shifts in interests using comprehensive historical behaviors. To address this, we propose SLSRec, a novel Session-based model with the fusion of Long- and Short-term Recommendations that effectively captures the temporal dynamics of user interests by segmenting historical behaviors over time. Unlike conventional models that combine long- and short-term user interests into a single representation, compromising recommendation accuracy, SLSRec utilizes a self-supervised learning framework to disentangle these two types of interests. A contrastive learning strategy is introduced to ensure accurate calibration of long- and short-term interest representations. Additionally, an attention-based fusion network is designed to adaptively aggregate interest representations, optimizing their integration to enhance recommendation performance. Extensive experiments on three public benchmark datasets demonstrate that SLSRec consistently outperforms state-of-the-art models while exhibiting superior robustness across various scenarios.We will release all source code upon acceptance.

Summary

  • The paper proposes SLSRec, which disentangles and adaptively fuses long- and short-term user interests through session segmentation and contrastive learning.
  • It employs dual encoders—GRU-based for long-term and self-attention for short-term interests—to balance stability and responsiveness, achieving notable gains in AUC, MRR, and HIT@K.
  • Experimental ablation confirms the critical role of contrastive learning and session granularity, offering a robust framework for real-world e-commerce and streaming services.

SLSRec: Self-Supervised Contrastive Learning for Adaptive Fusion of Long- and Short-Term User Interests

Motivation and Problem Setting

Effective sequential recommendation requires robust modeling of evolving user interests. These interests manifest across distinct temporal scales: stable long-term preferences and rapidly changing short-term intentions. Conventional sequential recommendation models often conflate these diverse dynamics into a single representation, limiting their ability to address multi-scale behavior and to accurately predict future interactions when user needs shift quickly. SLSRec directly targets the disentanglement and adaptive fusion of LS-term interests by leveraging session-based segmentation and self-supervised contrastive learning.

Architecture and Core Contributions

SLSRec consists of four principal modules: session segmentation, long-term interest encoder, short-term interest encoder, contrastive learning mechanism, and adaptive fusion network. The architecture explicitly segments user interaction history into sessions to better capture intra-session coherence and evolutionary patterns (Figure 1). Figure 1

Figure 1: The overall architecture of SLSRec, incorporating session segmentation, LS-term encoders, adaptive fusion, and contrastive learning supervision.

Session-Based Temporal Modeling

User-item interactions are partitioned into temporally coherent sessions via a thresholding mechanism that ensures high intra-session correlation. This segmentation is essential for enabling fine-grained modeling of both transient and persistent user interests. Only the most recent session is used for short-term modeling, while all earlier sessions form the basis for long-term preference extraction.

LS-Term Interest Encoding

Short-Term Encoder: Applies self-attention to the current session, further refined using a category-aware mask. This mask highlights the dominant item category in the session, enabling the model to prioritize category-relevant intents.

Long-Term Encoder: Employs attention pooling across historical sessions to extract independent session representations, further processed via GRU for capturing inter-session dynamics. Aggregation uses weighted alignment with the target item to produce a composite representation; both the raw and GRU-transformed vectors are concatenated for final long-term interest encoding.

Adaptive Fusion and Prediction

Interest fusion is governed by an attention-based aggregation module. An adaptive fusion weight α\alpha is computed, modulating the influence of long- and short-term interest vectors relative to the target item embedding. The final fused representation is passed through a two-layer MLP to predict interaction probability, balancing responsiveness and stability according to user behavior context.

Self-Supervised Contrastive Learning

Contrastive learning employs averaged item embeddings from LS-term sessions as supervisory anchors. Via triplet loss, LS-term encoders are trained to maximize intra-type similarity and minimize cross-type similarity, ensuring explicit semantic separation. Four triplet objectives are instantiated, enhancing dynamic calibration of interest vectors and promoting disentanglement even in the absence of explicit labels.

Experimental Results and Ablation

Comprehensive evaluation across Taobao, Tmall, and Cosmetics datasets demonstrates that SLSRec achieves superior accuracy and ranking metrics (AUC, MRR, NDCG@K, HIT@K) in every scenario. Notably, SLSRec outperforms the strongest baselines—including transformer-based and LS-term recommendation models—with AUC increases up to 0.41%, MRR gains up to 6.43%, and consistently improved HIT@10 scores. These numerical results are robust across data domains, underscoring the effectiveness of multi-scale modeling and adaptive fusion.

Ablation studies confirm the indispensability of all core modules, with the short-term encoder providing the largest gains. Eliminating the contrastive learning component reduces performance, but not catastrophically, indicating that the main benefit arises from the explicit separation and calibration of LS-term interests.

Hyperparameter analyses show that performance is optimized by carefully tuning the contrast loss weight λ\lambda and session segmentation threshold ω\omega, confirming the necessity for session granularity and regularization strength matching the behavioral characteristics of each dataset.

Practical and Theoretical Implications

SLSRec's results underscore the necessity for explicit multi-scale modeling in sequential recommendation systems, especially in domains with highly dynamic user intent. The attention-based adaptive fusion mechanism responds effectively to context changes, improving not only immediate accuracy but also longer-term ranking stability. The integration of self-supervised contrastive objectives advances the field’s capacity for interest disentanglement, offering a template for further refinement with more advanced augmentation and semantic retrieval-based contrast.

Theoretical implications extend to the broader area of representation learning, suggesting that session segmentation and triplet-based contrastive calibration can yield semantically meaningful embeddings in multi-scale tasks. Practically, SLSRec’s framework is well-suited for deployment in large-scale e-commerce platforms, streaming services, and other environments where user preferences are both persistent and volatile.

Outlook and Future Directions

This approach opens several avenues for future research. Extensions could explore more granular category masking, hierarchical session segmentation using variable-length windows, or integrating additional modalities (e.g., textual meta-data or knowledge graphs) for further improvement in semantic disentanglement. Further work may also incorporate advanced contrastive learning paradigms such as cross-modal or graph-based contrast, or adapt the model for real-time, online learning scenarios. Lastly, the adaptive fusion mechanism could be expanded to support multi-objective optimization, aligning recommendation diversity and novelty with user intent dynamics.

Conclusion

SLSRec advances sequential recommendation by explicitly disentangling and adaptively fusing long- and short-term user interests via session segmentation and self-supervised contrastive learning. Its robust performance demonstrates that multi-scale, attention-based modeling yields substantial improvements in accuracy and ranking metrics, validating the importance of semantic separation for evolving user behaviors. The model provides a rigorous foundation for future research on representation learning and recommendation under complex temporal dynamics (2604.04530).

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.