SSLRec: A Self-Supervised Learning Framework for Recommendation

Xubin Ren, Lianghao Xia, Yuhao Yang, Wei Wei, Tianle Wang, Xuheng Cai, Chao Huang · DOI

TL;DR

The paper introduces SSLRec, a novel, unified, and flexible framework for evaluating self-supervised learning (SSL) methods in recommender systems. By standardizing data handling, model building, and evaluation across diverse recommendation scenarios, SSLRec aims to address the current fragmentation and lack of reproducibility in SSL-based recommender research, paving the way for more reliable comparisons and faster innovation.

What Problem Does This Paper Address?

Recommender systems are crucial for navigating information overload, but they often struggle with sparse user interaction data and noisy behavior signals. Self-supervised learning (SSL) has emerged as a promising solution to mitigate these issues by leveraging unlabeled data. However, the field of SSL for recommendation is currently fragmented. Researchers often develop their own implementations, leading to inconsistencies in data formats, training procedures, and evaluation protocols. This makes it difficult to fairly compare different SSL methods, reproduce results, and build upon existing work. The paper addresses this critical gap by proposing SSLRec, a unified framework designed to standardize and streamline the development, evaluation, and comparison of SSL-enhanced recommender systems across various domains.

Methods

SSLRec is built on PyTorch and offers a modular architecture that allows users to easily integrate and customize different components. Key methodological contributions include:

  • Modular Architecture: The framework is designed with interchangeable modules for neural components, data augmentation, SSL objectives (loss functions), and recommender models. This promotes flexibility and reusability.
  • Standardized Data Handling: A unified DataHandler class and DataLoader objects ensure consistent data preprocessing and loading across different datasets and recommendation scenarios.
  • Unified Execution Flow: A standardized training and evaluation loop, along with a Configurator for managing hyperparameters via YAML files, ensures fair and reproducible experimental setups.
  • Augmentation and SSL Toolkits: SSLRec provides a rich set of pre-built, model-agnostic modules for common data augmentation techniques (e.g., graph structure corruption, sequence masking, feature noise) and SSL loss functions (e.g., InfoNCE, KL/JS-divergence, Cross Entropy).
  • Automated Hyperparameter Tuning: A built-in tuner facilitates efficient hyperparameter optimization through grid search, further enhancing reproducibility.
  • Comprehensive Model Coverage: The framework already incorporates around 30 state-of-the-art SSL-based recommender models across five diverse scenarios.

Datasets

SSLRec supports a variety of datasets across five recommendation scenarios:

  • General Collaborative Filtering: Yelp, Gowalla, Amazon
  • Sequential Recommendation: MovieLens-20M, Sports
  • Social Recommendation: Yelp (Social), Epinions
  • Knowledge Graph-enhanced Recommendation: Alibaba, MIND
  • Multi-behavior Recommendation: Tmall, Retail-rocket

The paper provides statistics for these datasets, including the number of users, items, interactions, and knowledge graph triplets where applicable.

Key Insights and Ideas

  • The Need for Standardization: The paper strongly emphasizes that the lack of a unified framework is a significant bottleneck hindering progress in SSL-based recommendation research. SSLRec directly tackles this by providing a common ground for experimentation.
  • Modularity is Key: The modular design is crucial for allowing researchers to easily swap components, experiment with novel augmentation strategies, or integrate new SSL objectives without rewriting large portions of code.
  • Beyond Graph CF: While many existing SSL frameworks focus primarily on graph collaborative filtering, SSLRec's broad coverage of sequential, social, KG-enhanced, and multi-behavior recommendation scenarios is a significant advantage.
  • Reproducibility and Fairness: By standardizing data, training, and evaluation, SSLRec ensures that comparisons between different models are fair and that results are reproducible, which is essential for scientific rigor.
  • Bridging the Gap: SSLRec aims to bridge the gap between cutting-edge research and practical implementation by providing a robust and easy-to-use platform.

Key Results

The paper demonstrates the effectiveness of SSLRec by reproducing the performance of approximately 30 state-of-the-art SSL-based recommender models across the five covered scenarios. Tables in the paper show performance metrics like Recall (R) and NDCG (N) for various models on specific datasets. For instance:

  • In General Collaborative Filtering on the Gowalla dataset, models like AutoCF and GFormer showed competitive performance, with AutoCF achieving R@10 of 0.1747.
  • For Sequential Recommendation on MovieLens-20M, DCRec outperformed others with R@10 of 0.2327.
  • In Social Recommendation on Yelp (Social), DSL achieved R@10 of 0.0536.
  • For KG-enhanced Recommendation on Alibaba, KGRec showed strong results with R@10 of 0.1188.
  • In Multi-behavior Recommendation on Retail Rocket, KMCLR achieved R@10 of 0.0501.

These results, reproduced within SSLRec, validate its capability to handle diverse models and scenarios fairly.

Limitations and Future Work

  • Limitations:
    • The paper mentions an Out-of-Memory (OOM) error encountered when implementing the DcRec model on the Yelp dataset, highlighting potential memory constraints for very large models or datasets.
  • While the framework covers many SOTA models, it's an ongoing effort, and new SSL methods will continue to emerge.
  • Future Work:
    • The authors plan to continuously improve and expand SSLRec based on user feedback, aiming to meet the evolving needs of the recommendation system research community.
  • This includes adding more SSL algorithms, supporting new recommendation scenarios, and potentially enhancing the automated hyperparameter tuning capabilities.
  • The framework is intended to be a living benchmark, encouraging further research and development in SSL for recommendation.

Summary updated

BibTeX
@inproceedings{ren2024sslrec,
  author = {Xubin Ren and Lianghao Xia and Yuhao Yang and Wei Wei and Tianle Wang and Xuheng Cai and Chao Huang},
  title = {{SSLRec: A Self-Supervised Learning Framework for Recommendation}},
  booktitle = {WSDM},
  year = {2024},
  doi = {10.1145/3616855.3635814},
}
Figure