SRA-CL: Semantic Retrieval Augmented Contrastive Learning for Sequential Recommendation

Shiwei Li (Huazhong University of Science and Technology) · Xing Tang (FiT,Tencent) · Ziqiang Cui · Dugang Liu (Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ)) · Xiuqiang He (Shenzhen Technology University) · Bowei He (City University of Hong Kong) · Xiaokun Zhang (Dalian University of Technology) · Chen Ma (City University of Hong Kong) · Yunpeng Weng (TENCENT) · Peiyang Liu (Peking University) · Weihong Luo (FiT)
candidate poolscollaborative datacontrastive learningcontrastive pairscontrastive sample generationexpressive embeddingsinter-user contrastive learningintra-user contrastive learningitem characteristicslearnable sample synthesizermodel-agnosticplug-and-play designselection rulessemantic understandingsequential recommendationuser preference patterns

Contrastive learning has shown effectiveness in improving sequential recommendation models. However, existing methods still face challenges in generating high-quality contrastive pairs: they either rely on random perturbations that corrupt user preference patterns or depend on sparse collaborative data that generates unreliable contrastive pairs. Furthermore, existing approaches typically require predefined selection rules that impose strong assumptions, limiting the model's ability to autonomously learn optimal contrastive pairs. To address these limitations, we propose a novel approach named Semantic Retrieval Augmented Contrastive Learning (SRA-CL). SRA-CL leverages the semantic understanding and reasoning capabilities of LLMs to generate expressive embeddings that capture both user preferences and item characteristics. These semantic embeddings enable the construction of candidate pools for inter-user and intra-user contrastive learning through semantic-based retrieval. To further enhance the quality of the contrastive samples, we introduce a learnable sample synthesizer that optimizes the contrastive sample generation process during model training. SRA-CL adopts a plug-and-play design, enabling seamless integration with existing sequential recommendation architectures. Extensive experiments on four public datasets demonstrate the effectiveness and model-agnostic nature of our approach. Our code is available at https://github.com/ziqiangcui/SRA-CL