Contrastive learning has been effectively utilized to enhance the training of sequential recommendation models by leveraging informative self-supervised signals. Most existing approaches generate augmented views of the same user sequence through random augmentation and subsequently maximize their agreement in the representation space. However, these methods often neglect the rationality of the augmented samples. Due to significant uncertainty, random augmentation can disrupt the semantic information and interest evolution patterns inherent in the original user sequences. Moreover, pulling semantically inconsistent sequences closer in the representation space can render the user sequence embeddings insensitive to variations in user preferences, which contradicts the primary objective of sequential recommendation. To address these limitations, we propose the Context-aware Diffusion-based Contrastive Learning for Sequential Recommendation, named CaDiRec. The core idea is to leverage context information to generate more reasonable augmented views. Specifically, CaDiRec employs a context-aware diffusion model to generate alternative items for the given positions within a sequence. These generated items are aligned with their respective context information and can effectively replace the corresponding original items, thereby generating a positive view of the original sequence. By considering two different augmentations of the same user sequence, we can construct a pair of positive samples for contrastive learning. To ensure representation cohesion, we train the entire framework in an end-to-end manner, with shared item embeddings between the diffusion model and the recommendation model. Extensive experiments on five benchmark datasets demonstrate the advantages of our proposed method over existing baselines.
翻译:对比学习通过利用信息丰富的自监督信号,已有效用于增强序列推荐模型的训练。现有方法大多通过随机增强生成同一用户序列的增强视图,随后最大化其在表示空间中的一致性。然而,这些方法往往忽略了增强样本的合理性。由于存在显著的不确定性,随机增强可能破坏原始用户序列固有的语义信息与兴趣演化模式。此外,将语义不一致的序列在表示空间中拉近,可能导致用户序列嵌入对用户偏好变化不敏感,这与序列推荐的主要目标相悖。为解决这些局限性,我们提出基于上下文感知扩散的对比学习用于序列推荐,命名为CaDiRec。其核心思想是利用上下文信息生成更合理的增强视图。具体而言,CaDiRec采用上下文感知扩散模型为序列中给定位置生成替代项目。这些生成的项目与其对应上下文信息保持一致,并能有效替换相应的原始项目,从而生成原始序列的正向视图。通过考虑同一用户序列的两种不同增强方式,我们可以构建一对用于对比学习的正样本。为确保表示一致性,我们以端到端方式训练整个框架,使扩散模型与推荐模型共享项目嵌入。在五个基准数据集上的大量实验证明了我们提出的方法相较于现有基线的优势。