Source-linked AI summary
Contrastive Cross-Domain Sequential Recommendation
Jiangxia Cao, Xin Cong, Jiawei Sheng, Tingwen Liu, Bin Wang
TL;DR
CDSR seeks to predict future interactions from histories across domains, but prior approaches learn single-domain preferences before transferring them and typically omit inter-sequence item relationships. C2DSR jointly models both relationship types and single- and cross-domain preferences using graph, attention, prediction, and contrastive objectives. The paper reports consistent, significant improvements over prior state-of-the-art baselines on four CDSR datasets.
Problem
Prior CDSR approaches learn single-domain preferences before transferring them and focus on intra-sequence relationships, while cross-domain histories can reveal preferences missing from a single-domain history.
Source: §1 · p. 2Method
C2DSR combines graph modeling of inter-sequence relations, attentive encoding of intra-sequence relations, single- and cross-domain prediction objectives, and contrastive infomax.
Source: §1 · p. 2Results
C2DSR achieves consistent and significant improvements over previous state-of-the-art baselines across four CDSR datasets.
Source: §1 · p. 2Takeaways & Limitations
Abstract
from arXiv · showhide
Cross-Domain Sequential Recommendation (CDSR) aims to predict future interactions based on user's historical sequential interactions from multiple domains. Generally, a key challenge of CDSR is how to mine precise cross-domain user preference based on the intra-sequence and inter-sequence item interactions. Existing works first learn single-domain user preference only with intra-sequence item interactions, and then build a transferring module to obtain cross-domain user preference. However, such a pipeline and implicit solution can be severely limited by the bottleneck of the designed transferring module, and ignores to consider inter-sequence item relationships. In this paper, we propose C^2DSR to tackle the above problems to capture precise user preferences. The main idea is to simultaneously leverage the intra- and inter- sequence item relationships, and jointly learn the single- and cross- domain user preferences. Specifically, we first utilize a graph neural network to mine inter-sequence item collaborative relationship, and then exploit sequential attentive encoder to capture intra-sequence item sequential relationship. Based on them, we devise two different sequential training objectives to obtain user single-domain and cross-domain representations. Furthermore, we present a novel contrastive cross-domain infomax objective to enhance the correlation between single- and cross- domain user representations by maximizing their mutual information. To validate the effectiveness of C^2DSR, we first re-split four e-comerce datasets, and then conduct extensive experiments to demonstrate the effectiveness of our approach C^2DSR.
1 INTRODUCTION
Cross-domain sequential recommendation uses histories across domains to address preferences that may be only partially visible in any one domain. C2DSR jointly models intra- and inter-sequence relationships and single- and cross-domain preferences, with experiments reporting improvements over prior state-of-the-art baselines.
1 INTRODUCTION
- Single-domain histories may reflect only partial user preferences, while related domains can provide clues for more complete cross-domain preferences.The introduction illustrates this with a user whose movie history suggests a book preference not evident in the book history alone.Source: §1 · p. 2
- Earlier approaches such as π-net learn single-domain representations before transferring them, and MIFN adds a knowledge-graph transfer module.Source: §1 · p. 2
- Prior CDSR approaches learn single-domain preferences separately and transfer them, while typically modeling intra-sequence but not inter-sequence item relationships.The paper argues that jointly learning single- and cross-domain preferences and modeling both relationship types is needed.Source: §1 · p. 2
- C2DSR uses a graph neural network for inter-sequence collaborative signals, a sequential attentive encoder for intra-sequence signals, and objectives for single- and cross-domain next-item prediction.A contrastive infomax objective encourages the resulting single- and cross-domain representations to be relevant by maximizing mutual information.Source: §1 · p. 2
- C2DSR achieves consistent and significant improvements over previous state-of-the-art baselines across four CDSR datasets.The paper reports re-splitting four e-commerce datasets for its experiments.Source: §1 · p. 2
2 PROBLEM FORMULATION
The formulation represents each user with two domain-specific interaction sequences and a cross-domain sequence that merges their items chronologically. CDSR predicts the next item in either domain from these observed sequences.
2 PROBLEM FORMULATION
- For each user, the formulation defines domain-X and domain-Y interaction sequences and a cross-domain sequence formed by merging their items in chronological order.Source: §2 · p. 2
- The item sets X and Y contain the items in their respective domains, and the formulation introduces directed item-item matrices for each domain and the combined domains.Source: §2 · p. 3
- Given the observed sequences, CDSR predicts the next item in domain X or domain Y, selecting the candidate with the highest probability in that domain.Source: §2 · p. 3
3 METHODOLOGY
C2DSR combines graph and attention encoding with separate sequential objectives for single- and cross-domain preferences, then uses contrastive infomax to enhance their correlation.
3 METHODOLOGY
- C2DSR has a graphical and attentional encoder, sequential objectives for single- and cross-domain representations, and a contrastive infomax objective.The infomax objective uses mutual information maximization to enhance correlation between the two kinds of representations.Source: §3 · p. 3
3.1 Graphical and Attentional Encoder
The encoder initializes item representations, uses graph layers to capture inter-sequence information, and applies self-attention to encode intra-sequence dependencies. It produces sequential outputs for domain-specific and merged interaction sequences.
3.1.1 Embedding Initialization Layer.
- The embedding stage initializes representations for the two single-domain sequences and the cross-domain sequence, and adds learnable position embeddings to encode order.The position-embedding matrix has maximum sequence length M; the example uses M = 30.Source: §3.1.1 · p. 3
3.1.2 Graph Neural Network Module.
- The graph neural network models inter-sequence item relationships using collaborative signals, with convolution multiplication and nonlinear activation removed to better capture co-occurrence.Representations from graph layers are averaged to form item representations.Source: §3.1.2 · p. 3
3.1.3 Self-Attention Module.
- The self-attention module captures complex intra-sequence item dependencies, followed by a point-wise feed-forward layer that projects the outputs nonlinearly.The encoder uses padding to handle the input sequences.Source: §3.1.3 · p. 3
3.1 Graphical and Attentional Encoder
- The encoder generates sequential outputs for the domain-X, domain-Y, and cross-domain interaction sequences.Source: §3.1.3 · p. 3
3.2 Sequential Training Objective
The section trains sequential representations with separate next-item objectives for single-domain and cross-domain preferences. The cross-domain objective balances prediction between domains when one domain dominates the interaction sequence.
3.2.1 Single-Domain Item Prediction.
- Single-domain next-item prediction trains each sequence representation to predict the next item within its own domain.The prediction probability is based on the observed sequence and its sequential representations.Source: §3.2.1 · p. 4
3.2.2 Cross-Domain Item Prediction.
- Cross-domain next-item prediction uses the merged sequence to predict items in either domain, with equally weighted domain-specific loss parts.The balanced objective is intended to preserve prediction ability in one domain even when the sequence contains many consecutive items from the other.Source: §3.2.2 · p. 4
3.2 Sequential Training Objective
- The two objectives assign distinct roles to the learned representations: single-domain representations encode domain-specific preference, while the cross-domain representation predicts across both domains.The section motivates the cross-domain objective by noting that a single-domain strategy can minimize probabilities for another domain's items in a mixed sequence.Source: §3.2.2 · p. 4, §3.2.1 · p. 4
3.3 Contrastive Infomax Objective
The contrastive infomax objective is designed to link partial single-domain preferences with cross-domain representations. It uses domain-specific prototypes and corrupted examples to distinguish relevant representation pairs from negatives.
3.3 Contrastive Infomax Objective
- Infomax is introduced to improve correlation between independently learned single-domain representations and cross-domain representations.The single-domain representations tend to capture only partial user preference.Source: §3.3 · p. 4
3.3.1 Single- and Cross- Domain Prototype Representations.
- Mean pooling forms single-domain prototypes from sequential representations and cross-domain prototypes by averaging corresponding domain representations in the merged sequence.The cross-domain prototypes encode holistic preferences using information from both domains.Source: §3.3.1 · p. 5
- The contrastive objective treats joint-distribution samples as positives and product-of-marginals samples as negatives, using domain-specific corruption functions to generate negatives.Corruption replaces domain items with randomly selected items to form corrupted cross-domain sequences and prototypes.Source: §3.3.2 · p. 5
3.3.2 Infomax Objective.
- A binary discriminator scores single- and cross-domain prototype pairs; its cross-entropy objective serves as a mutual-information estimator based on Jensen–Shannon divergence.For domain X, the design favors pairing its single-domain prototype with a cross-domain prototype containing true X items over a corrupted one.Source: §3.3.2 · p. 5
3.4 Model Training and Evaluation
The section combines sequential training and contrastive infomax losses, then describes mini-batch optimization and next-item inference using learned representations.
3.4 Model Training and Evaluation
- C2DSR's total loss comprises sequential training and contrastive infomax objectives.The sequential objective and contrastive objective are identified as the two loss types.Source: §3.4 · p. 5
- C2DSR is optimized in mini-batches and has time complexity similar to other attention-architecture sequential recommenders.The paper states this complexity comparison without giving a specific runtime value.Source: §3.4 · p. 5
- At evaluation, the model selects the highest-scoring next item in the target domain using the latest single-domain and cross-domain representations.The same prediction procedure applies to domain Y.Source: §3.4 · p. 5
4 EXPERIMENTS
The experiments compare C2DSR with recommendation baselines on three cross-domain scenarios, using revised sequential data splits. The authors report that C2DSR outperforms baselines in many metrics.
4.1 Datasets
- The experiments use Food-Kitchen and Movie-Book from Amazon and Entertainment-Education from HVIDEO, filtering for users and items with at least 10 interactions.Sequences must include at least three items from each domain within a period; the authors divide the latest interactions into validation and test sets after identifying a potential temporal leakage issue in prior splits.Source: §4.1 · pp. 5–6, Table 1 · p. 6
4.2.1 Evaluation Protocol.
- Evaluation uses leave-one-out testing, ranking one positive item against 999 negatives and reporting MRR, NDCG@5/10, and HR@1/5/10.The authors select the best evaluation result using validation-set MRR.Source: §4.2.1 · p. 6, §4.2.3 · p. 6
4.2.2 Compared Baselines.
- The comparison includes traditional, cross-domain, sequential, and cross-domain sequential recommendation baselines.Examples include BPRMF and ItemKNN, NCF-MLP and CoNet, GRU4Rec, SASRec and SR-GNN, and π-Net, PSJNet and MIFN.Source: §4.2.2 · p. 6
4.3 Performance Comparisons
- C2DSR largely outperforms all baselines in many metrics across the three CDSR scenarios.The scenarios are Food-Kitchen, Movie-Book, and Entertainment-Education.Source: §4.3 · pp. 6–7, Table 2 · p. 7, Table 3 · p. 7
4.4 Discussion of Model Variants
Variant studies assess the model components, the infomax objective, and hyperparameter sensitivity. The reported findings favor joint preference modeling, show stronger predictions with infomax, and identify settings where performance improves or degrades.
4.5 Discussion of the Infomax Impact
- Cross-domain representations predict better than single-domain ones, and adding infomax improves both representation types’ prediction ability.The authors suggest infomax helps single-domain representations perceive more complete preferences and cross-domain representations provide more general preferences.Source: §4.5 · p. 8
4.4 Discussion of Model Variants
- “++” variants improve over their original methods, while “∗” variants consistently outperform their “++” counterparts.“++” adds the graph neural network and cross-domain sequential objective; “∗” denotes training without the infomax objective.Source: Table 5 · p. 8, §4.4 · p. 8
4.6 Hyperparameter Analysis
- Graph depths L = 1 or 2 give steady improvements, whereas L = 3 or 4 degrades performance.The authors suggest deeper graph networks may cause over-smoothing that limits collaborative-signal capture.Source: §4.6 · p. 8
- For λ, results are superior and robust in the range [0.3, 0.7], and λ = 0.7 may balance model effectiveness and training efficiency.The authors report that larger λ can lead to faster convergence; even the worst settings outperform other baselines shown in Table 2.Source: §4.6 · p. 8, Figure 6 · p. 9
5 RELATED WORKS
Related work spans general cross-domain recommendation, sequential recommendation, and cross-domain sequential recommendation, with transfer and contrastive learning as recurring approaches. C2DSR differs by jointly considering single- and cross-domain preferences and using contrastive infomax to capture their correlation.
5 RELATED WORKS
- Contrastive learning measures dependency through mutual information; C2DSR maximizes mutual information between single- and cross-domain representations.Prior examples include DIM, CPC, DGI, and S3-Rec.Source: §5 · p. 9
- Cross-domain recommendation uses interactions from auxiliary domains to address data sparsity, with approaches including fusion and domain-shared information transfer.Examples include CMF, M3Rec, CoNet, BiTGCF, DisenCDR, and CDRIB.Source: §5 · p. 9
- Sequential recommendation predicts future items from recent interaction sequences, with methods spanning Markov chains, recurrent, convolutional, attention, and graph networks.Examples include GRU4Rec, HRNN, Caser, SASRec, NARM, and SR-GNN.Source: §5 · p. 9
- Figure 7 examines the impact of GNN depth L.Source: Figure 7 · p. 9
- C2DSR jointly considers single- and cross-domain preferences and uses contrastive infomax to capture their correlation.Earlier CDSR approaches include gating mechanisms and cross-domain item or knowledge graphs.Source: §5 · p. 9
6 CONCLUSION
C2DSR combines intra- and inter-sequence relationships to jointly learn single- and cross-domain preferences. On the re-split datasets, it reaches state-of-the-art performance; the paper also analyzes its components and contrastive objective.
6 CONCLUSION
- C2DSR reaches state-of-the-art performance in empirical results.Source: §6 · p. 9
- C2DSR uses graphical and attentional encoders to leverage inter- and intra-sequence relationships, with sequential and contrastive objectives for jointly learning preferences.Source: §6 · p. 9
- The paper releases re-split datasets for fair comparison and analyzes the model components and contrastive objective.Source: §6 · p. 9
- Future work will explore C2DSR in multi-domain settings and continuous time space.Source: §6 · p. 9
Related papers
This paper cites
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding2018
- Semi-Supervised Classification with Graph Convolutional Networks2016
- Representation Learning with Contrastive Predictive Coding2018
- BPR: Bayesian Personalized Ranking from Implicit Feedback2012
- Self-Attentive Sequential Recommendation2018
- Neural Collaborative Filtering2017