Contrastive Cross-Domain Sequential Recommendation

Jiangxia Cao, Xin Cong, Jiawei Sheng, Tingwen Liu, Bin Wang

TL;DR

$C^2DSR$ (Contrastive Cross-Domain Sequential Recommendation) is a novel framework that improves product recommendations by jointly modeling a user's behavior across multiple domains (e.g., Movies and Books). By combining Graph Neural Networks with a unique contrastive infomax objective, it effectively bridges the gap between domain-specific and holistic user preferences, setting a new state-of-the-art for cross-domain recommendation.

What Problem Does This Paper Address?

Sequential Recommendation (SR) systems—the tech behind "what to watch next" on YouTube or "frequently bought together" on Amazon—usually rely on a user's history within a single platform. However, users often have "cold starts" or sparse data in one domain while being very active in another.

Cross-Domain Sequential Recommendation (CDSR) aims to fix this by transferring knowledge between domains. For example, if you love The Lord of the Rings movies, a system should be smart enough to recommend the Lord of the Rings books, even if you've never bought a book on that platform before.

The authors identify two major flaws in current CDSR methods:

  1. The Pipeline Bottleneck: Most models learn single-domain preferences first and then try to "transfer" them. This often carries over domain-specific biases.
  2. Ignoring the "Global" Signal: Existing models focus on a single user's sequence (intra-sequence) but ignore how items relate across all users' histories (inter-sequence collaborative relationships).

Methods

The authors propose $C^2DSR$, which moves away from the "learn-then-transfer" pipeline toward a joint learning approach. Its architecture consists of three main pillars:

  1. Graphical and Attentional Encoder:
    • It uses a Graph Neural Network (GNN) to mine "inter-sequence" relationships. By looking at item co-occurrences across the entire dataset, the model learns a global collaborative signal.
  2. It then uses a Self-Attention Encoder (similar to the popular SASRec model) to capture the "intra-sequence" patterns—the specific chronological order of a single user's actions.
  3. Dual Sequential Training Objectives: The model is trained to predict the next item in both a single-domain context and a merged, cross-domain context simultaneously. This ensures the model maintains "expert" knowledge of each domain while learning how they interact.
  4. Contrastive Cross-Domain Infomax: This is the core innovation. The model creates "prototypes" (summarized representations) of a user's single-domain and cross-domain interests. It then uses a contrastive learning objective to maximize the Mutual Information between these views. Essentially, it forces the model to ensure that the "partial" view from one domain is mathematically consistent with the "holistic" cross-domain view.

Datasets

The researchers evaluated their model on two major real-world sources:

  • Amazon: Specifically the "Food-Kitchen" and "Movie-Book" domain pairs.
  • HVIDEO: A TV service platform dataset for "Entertainment-Education" recommendations.

Crucially, the authors identified a "data leak" in how previous researchers split these datasets (where future data was accidentally used to predict the past). They released a re-split, corrected version of these benchmarks to ensure a fair and rigorous evaluation.

Key Insights and Ideas

  • Collaboration is Key: The "aha moment" here is that cross-domain recommendation isn't just about the sequence; it's about the graph. By using a GNN to see how items relate across the whole community, the model gains a much sturdier foundation than by looking at one user's history in isolation.
  • Alignment via Contrast: Single-domain representations are inherently "biased" or incomplete. Instead of trying to "fix" them with a complex transfer module, $C^2DSR$ uses contrastive learning to "align" them with a broader cross-domain truth.
  • Balanced Learning: In cross-domain sequences, one domain often has way more data than the other. The authors used a balanced loss function to ensure the "data-rich" domain doesn't drown out the "data-poor" one.

Key Results

$C^2DSR$ consistently outperformed state-of-the-art baselines (like $\pi$-net and MIFN) across all tested scenarios:

  • Accuracy Gains: On the "Food-Kitchen" dataset, $C^2DSR$ achieved an MRR (Mean Reciprocal Rank) of 8.91% in the Food domain, compared to 8.55% for the previous best model (MIFN).
  • Robustness: Ablation studies showed that removing the contrastive infomax objective led to a significant drop in performance, proving that the "alignment" of representations is vital.
  • Efficiency: Despite the added complexity of the GNN and contrastive loss, the model maintains a similar time complexity to standard attention-based recommendation models.

Limitations and Future Work

While highly effective, the paper notes a few areas for growth:

  • Domain Scaling: The current experiments focus on two domains at a time. Real-world users interact across dozens of domains simultaneously.
  • Continuous Time: The model treats interactions as a sequence of steps but doesn't account for the actual time elapsed between clicks (e.g., a gap of 5 minutes vs. 5 months).
  • Future Direction: The authors plan to explore multi-domain settings and incorporate continuous-time modeling to better capture the "decay" of certain user interests.

Summary updated

BibTeX
@inproceedings{cao2022contrastive,
  author = {Jiangxia Cao and Xin Cong and Jiawei Sheng and Tingwen Liu and Bin Wang},
  title = {{Contrastive Cross-Domain Sequential Recommendation}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2022},
  doi = {10.1145/3511808.3557262},
}

Loading related content...

Figure