{"id":13958346,"url":"https://github.com/THUDM/ComiRec","last_synced_at":"2025-07-20T23:31:13.534Z","repository":{"id":64232220,"uuid":"265593760","full_name":"THUDM/ComiRec","owner":"THUDM","description":"Source code and dataset for KDD 2020 paper \"Controllable Multi-Interest Framework for Recommendation\"","archived":false,"fork":false,"pushed_at":"2021-09-23T06:52:37.000Z","size":23,"stargazers_count":274,"open_issues_count":17,"forks_count":75,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-24T05:53:57.722Z","etag":null,"topics":["controllable","multi-interest","recommendation","recommender-system"],"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/THUDM.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":"2020-05-20T14:37:25.000Z","updated_at":"2024-06-24T01:49:02.000Z","dependencies_parsed_at":"2022-12-05T04:15:26.815Z","dependency_job_id":null,"html_url":"https://github.com/THUDM/ComiRec","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/THUDM%2FComiRec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUDM%2FComiRec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUDM%2FComiRec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUDM%2FComiRec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/THUDM","download_url":"https://codeload.github.com/THUDM/ComiRec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214509425,"owners_count":15743730,"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":["controllable","multi-interest","recommendation","recommender-system"],"created_at":"2024-08-08T13:01:30.058Z","updated_at":"2024-08-08T13:03:27.988Z","avatar_url":"https://github.com/THUDM.png","language":"Python","funding_links":[],"categories":["其他_推荐系统"],"sub_categories":["网络服务_其他"],"readme":"# Controllable Multi-Interest Framework for Recommendation\n\nOriginal implementation for paper [Controllable Multi-Interest Framework for Recommendation](https://arxiv.org/abs/2005.09347).\n\n[Yukuo Cen](https://sites.google.com/view/yukuocen), Jianwei Zhang, Xu Zou, Chang Zhou, [Hongxia Yang](https://sites.google.com/site/hystatistics/home), [Jie Tang](http://keg.cs.tsinghua.edu.cn/jietang/)\n\nAccepted to KDD 2020 ADS Track!\n\n## Prerequisites\n\n- Python 3\n- TensorFlow-GPU \u003e= 1.8 (\u003c 2.0)\n- Faiss-GPU \n\n## Getting Started\n\n### Installation\n\n- Install TensorFlow-GPU 1.x\n\n- Install Faiss-GPU based on the instructions here: https://github.com/facebookresearch/faiss/blob/master/INSTALL.md\n\n- Clone this repo `git clone https://github.com/THUDM/ComiRec`.\n\n### Dataset\n\n- Original links of datasets are:\n\n  - http://jmcauley.ucsd.edu/data/amazon/index.html\n  - https://tianchi.aliyun.com/dataset/dataDetail?dataId=649\u0026userId=1\n\n- Two preprocessed datasets can be downloaded through: \n\n  - Tsinghua Cloud: https://cloud.tsinghua.edu.cn/f/e5c4211255bc40cba828/?dl=1\n  - Dropbox: https://www.dropbox.com/s/m41kahhhx0a5z0u/data.tar.gz?dl=1\n\n- You can also download the original datasets and preprocess them by yourself. You can run `python preprocess/data.py {dataset_name}` and `python preprocess/category.py {dataset_name}` to preprocess the datasets. \n\n### Training\n\n#### Training on the existing datasets\n\nYou can use `python src/train.py --dataset {dataset_name} --model_type {model_name}` to train a specific model on a dataset. Other hyperparameters can be found in the code. (If you share the server with others or you want to use the specific GPU(s), you may need to set `CUDA_VISIBLE_DEVICES`.) \n\nFor example, you can use `python src/train.py --dataset book --model_type ComiRec-SA` to train ComiRec-SA model on Book dataset.\n\nWhen training a ComiRec-DR model, you should set `--learning_rate 0.005`. \n\n#### Training on your own datasets\n\nIf you want to train models on your own dataset, you should prepare the following three(or four) files:\n- train/valid/test file: Each line represents an interaction, which contains three numbers `\u003cuser_id\u003e,\u003citem_id\u003e,\u003ctime_stamp\u003e`.\n- category file (optional): Each line contains two numbers `\u003citem_id\u003e,\u003ccate_id\u003e` used for computing diversity..\n\n## Common Issues\n\n\u003cdetails\u003e\n\u003csummary\u003e\nThe computation of NDCG score.\n\u003c/summary\u003e\n\u003cbr/\u003e\nI'm so sorry that the computation of NDCG score in the original version (now in `paper` branch) is not consistent with the definition in the paper, as mentioned in the issue #6. \nI have updated the computation of NDCG score in the `master` branch according to the correct definition. For reproducing the NDCG scores reported in the paper, please use the `paper` branch.\nBy the way, I personally recommend to use the reported results of recall and hit rate only.\n\u003c/details\u003e\n\n\nIf you have ANY difficulties to get things working in the above steps, feel free to open an issue. You can expect a reply within 24 hours.\n\n## Acknowledgement\n\nThe structure of our code is based on [MIMN](https://github.com/UIC-Paper/MIMN).\n\n## Cite\n\nPlease cite our paper if you find this code useful for your research:\n\n```\n@inproceedings{cen2020controllable,\n  title = {Controllable Multi-Interest Framework for Recommendation},\n  author = {Cen, Yukuo and Zhang, Jianwei and Zou, Xu and Zhou, Chang and Yang, Hongxia and Tang, Jie},\n  booktitle = {Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},\n  year = {2020},\n  pages = {2942–2951},\n  publisher = {ACM},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTHUDM%2FComiRec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTHUDM%2FComiRec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTHUDM%2FComiRec/lists"}