Skip to content

THUDM/RecDCL

Repository files navigation

RecDCL: Dual Contrastive Learning for Recommendation

📃 [RecDCL] [GitHub]

RecDCL is a dual contrastive learning recommendation framework. In this work, we investigate how to employ both batch-wise CL (BCL) and feature-wise CL (FCL) for recommendation. We theoretically analyze the relation between BCL and FCL, and find that combining BCL and FCL helps eliminate redundant solutions but never misses an optimal solution. In RecDCL, the FCL objective is designed to eliminate redundant solutions on user-item positive pairs and to optimize the uniform distributions within users and items using a polynomial kernel for driving the representations to be orthogonal; The BCL objective is utilized to generate contrastive embeddings on output vectors for enhancing the robustness of the representations. Extensive experiments on four widely-used benchmarks and one industry dataset demonstrate that RecDCL can consistently outperform the state-of-the-art GNNs-based and SSL-based models (with an improvement of up to 5.65% in terms of Recall@20).

Table of Contents

PyTorch Implementation

This is our PyTorch implementation for the WWW'24 paper:

Environment Requirements

The code has been tested running under Python 3.10.9. The required packages are as follows:

  • PyTorch == 2.0.1

Usage Example

Running one trial on Beauty:

bash run_beauty.sh

Leaderboard

Overall top-20 performance comparison with representative models on four datasets.

Citation

If you find our work helpful, please kindly cite our paper:

@misc{zhang2024recdcl,
      title={RecDCL: Dual Contrastive Learning for Recommendation}, 
      author={Dan Zhang and Yangliao Geng and Wenwen Gong and Zhongang Qi and Zhiyu Chen and Xing Tang and Ying Shan and Yuxiao Dong and Jie Tang},
      year={2024},
      eprint={2401.15635},
      archivePrefix={arXiv},
      primaryClass={cs.IR}
}

About

RecDCL: Dual Contrastive Learning for Recommendation (WWW'24, Oral)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published