NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Multi-level Contrastive Learning Framework for Sequential Recommendation

Ziyang Wang, Huoyu Liu, Wei Wei, Yue Hu, Xian-Ling Mao, Shaojian He, Rui Fang, Dangyang Chen · DOI

Abstract

Sequential Recommendation (SR) aims to predict future user behavior based on historical interaction sequences. However, the effectiveness of SR models is often hindered by data sparsity. While recent self-supervised contrastive learning (CL) methods attempt to address this by augmenting sequences, they frequently ignore broader collaborative signals. This paper introduces MCLSR, a Multi-level Contrastive Learning framework that incorporates global information from user-item, user-user, and item-item graphs. By aligning local sequence-based interests with global graph-based interests and performing feature-level contrastive learning, MCLSR significantly improves recommendation accuracy across multiple benchmarks.

Introduction: Addressing Data Sparsity in Sequential Recommendation

The core challenge in Sequential Recommendation (SR) is the "data sparsity" problem. Most users have short interaction histories, providing insufficient supervised signals for models to accurately capture their preferences. Traditional methods rely solely on the observed behavior sequence to predict the next item.

Recent advancements have introduced Contrastive Learning (CL) to create self-supervised signals through sequence augmentation (e.g., masking or cropping). However, these methods are often limited to the sequence itself, ignoring the rich collaborative context available in the wider dataset—such as how similar users behave or how items are co-acted upon across the entire platform.

Comparison of traditional SR, existing CL-based methods, and the proposed MCLSR framework.

Methodology: The MCLSR Framework

MCLSR (Multi-level Contrastive Learning for Sequential Recommendation) moves beyond simple sequence augmentation by utilizing four distinct views: the raw sequence, a user-item interaction graph, a user-user co-action graph, and an item-item co-action graph.

Multi-level Contrastive Learning

The framework employs a two-tier contrastive approach to bridge the gap between local sequences and global collaborative signals:

  1. Interest-level Contrastive Learning ($\mathcal{L}^{IL}$): This module aligns a user's current interest (derived from the sequence via self-attention) with their general interest (extracted from a global user-item bipartite graph using a Graph Neural Network). This process injects global collaborative signals into the local sequence model.
  2. Feature-level Contrastive Learning ($\mathcal{L}^{UC}, \mathcal{L}^{IC}$): This level ensures robust embedding representations. It contrasts user features from the user-item graph against those from a user-user co-action graph. Similarly, item features are contrasted using an item-item co-action graph. This captures latent relationships between similar users and items that are not apparent in individual sequences.
The detailed architecture of the MCLSR framework, illustrating the graph encoders, interest encoders, and multi-level contrastive learning modules.

Training and Inference

MCLSR is trained using a joint loss function combining prediction loss ($\mathcal{L}^P$) with the interest-level and feature-level contrastive losses. During inference, the model relies solely on the sequential view to predict the next item, ensuring no information leakage while benefiting from the collaborative knowledge embedded during training.

Experimental Evaluation

The model was evaluated on four standard datasets: Amazon (Books, Clothing, Toys) and Gowalla. These datasets represent various scales and sparsity levels, providing a robust testing ground.

Key Results

MCLSR consistently outperformed state-of-the-art baselines, including SASRec, CL4SRec, and DuoRec.

  • Performance Gains: The framework achieved an average improvement of 7.0% over the strongest baselines across all metrics.
  • Ablation Study: Removing either the interest-level or feature-level contrastive modules resulted in a performance decline, confirming that both global collaborative signals and local co-action signals are vital for high-quality recommendations.

Discussion and Insights

  • Cross-View Contrasting: The study demonstrates that contrasting a sequence against a graph (cross-view) is more effective than simple internal sequence augmentation (e.g., masking).
  • Mitigating Embedding Degeneracy: Contrastive learning helps prevent item embeddings from clustering into a narrow vector space, a common issue in models like SASRec. This leads to more discriminative and expressive representations.

Conclusion and Future Work

MCLSR provides a powerful solution to data sparsity in SR by integrating multi-level collaborative signals. While effective, the framework faces challenges regarding the computational overhead of constructing large-scale co-action graphs and the static nature of these graphs. Future research will explore dynamic graph updates and more efficient sampling techniques to scale the framework for massive, real-time industrial applications.

Summary updated

BibTeX
@inproceedings{wang2022multi,
  author = {Ziyang Wang and Huoyu Liu and Wei Wei and Yue Hu and Xian-Ling Mao and Shaojian He and Rui Fang and Dangyang Chen},
  title = {{Multi-level Contrastive Learning Framework for Sequential Recommendation}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2022},
  doi = {10.1145/3511808.3557404},
}
Figure