{"id":13958360,"url":"https://github.com/RUCAIBox/NCL","last_synced_at":"2025-07-20T23:31:10.752Z","repository":{"id":38795264,"uuid":"458559347","full_name":"RUCAIBox/NCL","owner":"RUCAIBox","description":"[WWW'22] Official PyTorch implementation for \"Improving Graph Collaborative Filtering with Neighborhood-enriched Contrastive Learning\".","archived":false,"fork":false,"pushed_at":"2022-11-11T22:17:00.000Z","size":286,"stargazers_count":117,"open_issues_count":8,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-09T13:18:36.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RUCAIBox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-12T15:24:44.000Z","updated_at":"2024-07-22T11:14:13.000Z","dependencies_parsed_at":"2022-07-17T04:00:30.867Z","dependency_job_id":null,"html_url":"https://github.com/RUCAIBox/NCL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FNCL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FNCL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FNCL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RUCAIBox%2FNCL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RUCAIBox","download_url":"https://codeload.github.com/RUCAIBox/NCL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226845000,"owners_count":17691139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-08T13:01:30.438Z","updated_at":"2024-11-28T01:31:50.780Z","avatar_url":"https://github.com/RUCAIBox.png","language":"Python","funding_links":[],"categories":["其他_推荐系统"],"sub_categories":["网络服务_其他"],"readme":"# NCL (Neighborhood-enriched Contrastive Learning)\n\nThis is the official PyTorch implementation for the [paper](https://arxiv.org/abs/2202.06200):\n\u003e Zihan Lin*, Changxin Tian*, Yupeng Hou* Wayne Xin Zhao. Improving Graph Collaborative Filtering with Neighborhood-enriched Contrastive Learning. WWW 2022.\n\n## Overview\n\nWe propose a contrastive learning paradigm, named Neighborhood-enriched Contrastive Learning (**NCL**), to explicitly capture potential node relatedness into contrastive learning for graph collaborative filtering.\n\n\u003cdiv  align=\"center\"\u003e \n\u003cimg src=\"asset/intro.png\" style=\"width: 75%\"/\u003e\n\u003c/div\u003e\n\n## Requirements\n\n```\nrecbole==1.0.0\npython==3.7.7\npytorch==1.7.1\nfaiss-gpu==1.7.1\ncudatoolkit==10.1\n```\n\n## Quick Start\n\n```bash\npython main.py --dataset ml-1m\n```\n\nYou can replace `ml-1m` to `yelp`, `amazon-books`, `gowalla-merged` or `alibaba` to reproduce the results reported in our paper.\n\n## Datasets\n\nFor `alibaba`, you can download `alibaba.zip` from [Google Drive](https://drive.google.com/file/d/1Th7ii_Z0l6AjGq8zWsKuLVCsacIO1AQJ/view?usp=sharing). Then,\n```bash\nmkdir dataset\nmv alibaba.zip dataset\nunzip alibaba.zip\npython main.py --dataset alibaba\n```\n\nFor others, they will be downloaded automatically via RecBole once you run the main program. Take `yelp` for example,\n```bash\npython main.py --dataset yelp\n```\n\n## Customized datasets\n\nTo run NCL on customized datasets, please following https://github.com/RUCAIBox/NCL/issues/1#issuecomment-1076370560.\n\n## Acknowledgement\n\nThe implementation is based on the open-source recommendation library [RecBole](https://github.com/RUCAIBox/RecBole).\n\nPlease cite the following papers as the references if you use our codes or the processed datasets.\n\n```\n@inproceedings{lin2022ncl,\n    author={Zihan Lin and\n            Changxin Tian and\n            Yupeng Hou and\n            Wayne Xin Zhao},\n    title={Improving Graph Collaborative Filtering with Neighborhood-enriched Contrastive Learning},\n    booktitle={{WWW}},\n    year={2022},\n}\n\n@inproceedings{zhao2021recbole,\n  title={Recbole: Towards a unified, comprehensive and efficient framework for recommendation algorithms},\n  author={Wayne Xin Zhao and Shanlei Mu and Yupeng Hou and Zihan Lin and Kaiyuan Li and Yushuo Chen and Yujie Lu and Hui Wang and Changxin Tian and Xingyu Pan and Yingqian Min and Zhichao Feng and Xinyan Fan and Xu Chen and Pengfei Wang and Wendi Ji and Yaliang Li and Xiaoling Wang and Ji-Rong Wen},\n  booktitle={{CIKM}},\n  year={2021}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRUCAIBox%2FNCL","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRUCAIBox%2FNCL","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRUCAIBox%2FNCL/lists"}