{"id":13958375,"url":"https://github.com/summmeer/session-based-news-recommendation","last_synced_at":"2025-07-09T13:42:44.205Z","repository":{"id":37730889,"uuid":"430059839","full_name":"summmeer/session-based-news-recommendation","owner":"summmeer","description":"source code of paper \"Positive, Negative and Neutral: Modeling Implicit Feedback in Session-based News Recommendation\", which is accepted at SIGIR 2022.","archived":false,"fork":false,"pushed_at":"2022-10-20T10:39:07.000Z","size":138,"stargazers_count":31,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-09T13:18:43.305Z","etag":null,"topics":["deep-learning","recommender-system","session-based-recommendation-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/summmeer.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":"2021-11-20T09:24:58.000Z","updated_at":"2024-04-17T02:13:48.000Z","dependencies_parsed_at":"2023-01-19T13:03:18.146Z","dependency_job_id":null,"html_url":"https://github.com/summmeer/session-based-news-recommendation","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/summmeer%2Fsession-based-news-recommendation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/summmeer%2Fsession-based-news-recommendation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/summmeer%2Fsession-based-news-recommendation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/summmeer%2Fsession-based-news-recommendation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/summmeer","download_url":"https://codeload.github.com/summmeer/session-based-news-recommendation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226845009,"owners_count":17691140,"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":["deep-learning","recommender-system","session-based-recommendation-system"],"created_at":"2024-08-08T13:01:30.800Z","updated_at":"2024-11-28T01:31:56.134Z","avatar_url":"https://github.com/summmeer.png","language":"Python","funding_links":[],"categories":["其他_推荐系统"],"sub_categories":["网络服务_其他"],"readme":"This is the source code of paper \"Positive, Negative and Neutral: Modeling Implicit Feedback in Session-based News Recommendation\", which is accepted at SIGIR 2022.\n\nBy leveraging different kinds of implicit feedback, we alleviate the trade-off between the precision and diversity and cold-start problem, which is effective for real-world application.\n\nOur model is named TCAR (Temporal and Content Aware Recommendation System)\n\n## Dataset prepare\nWe use 3 dataset:\n- Globo.com \u003chttps://www.kaggle.com/gspmoreira/news-portal-user-interactions-by-globocom\u003e download the data to the folder `../data/globo/`\n- Adressa \u003chttps://reclab.idi.ntnu.no/dataset/\u003e (Need contact them for the full dataset) download the data to the folder `../data/adressa/`. We use a crawler to get the titles of news articles in this dataset, the code is in ```data_process/get_content_vec.py```. The preprocess is following https://github.com/bio-info-guy/AdressaDataLSTMRecommender\n- MIND \u003chttps://msnews.github.io/\u003e download the data to the folder `../data/mind/`\n\n## Session data preprocessing\ncreate middle file:\n```\ncd data_process\npython globo_preprocess.py --use_preprocess\n```\ncreate file for TCAR (cnt for cold item, with augmentation)\n```\npython globo_preprocess.py --content_info\npython globo_preprocess.py --split_way=TrainLen --content_info\npython globo_preprocess.py --split_way=TestLen --content_info\n```\ncreate file for CBCF (cnt for cold item, without augmentation)\n```\npython globo_preprocess.py --train_augment\npython globo_preprocess.py --split_way=TrainLen --train_augment\npython globo_preprocess.py --split_way=TestLen --train_augment\n```\n\ncreate file for GRU-STAMP-mid (ignore the cold item, no augmentation)\n```\npython dataset2STAMP.py\n\npython globo_preprocess.py --cold_start --train_augment --split_way=TrainLen\npython dataset2STAMP.py --split_way=TrainLen\n\npython globo_preprocess.py --cold_start --train_augment --split_way=TestLen\npython dataset2STAMP.py --split_way=TestLen\n```\n\ncreate file for SR-GNN (ignore cold item, with data augmentation)\n```\npython dataset2SRGNN.py\n\npython globo_preprocess.py --cold_start --split_way=TrainLen\npython dataset2SRGNN.py --split_way=TrainLen\n\npython globo_preprocess.py --cold_start --split_way=TestLen\npython dataset2SRGNN.py --split_way=TestLen\n```\nThen you can run baselines: CBCF, STAN, GRU4Rec, SASRec, [STAMP](https://github.com/uestcnlp/STAMP), [SR-GNN](https://github.com/CRIPAC-DIG/SR-GNN), SGNN-HN(upon request) , CPRS.\n\nFor Adressa and MIND, the procedure is the same.\n\n## TCAR data pre-processing\nTo leverage the negative feedback, you need to generate the inferenced the impression lists and sample negative points from them. The code is in ```data_process/generate_neighbor.py```\n\n## Training \u0026 testing\nNeed to specify the model name, dataset, foldnum, etc. (See `python main.py -h`)\n```\npython main.py --foldnum=0  --epoch=10\n```\n\n## Experiment Results\nWe use F1 score to measure the trade-off between the accuracy and diversity.\n\n![image](https://github.com/summmeer/session-based-news-recommendation/blob/master/results.png)\n\n## Citation\n\nShansan Gong and Kenny Q. Zhu. Positive, Negative and Neutral: Modeling Implicit Feedback in Session-based News Recommendation. In *Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval. 2022.*\n\n```\n@inproceedings{10.1145/3477495.3532040,\n    author = {Gong, Shansan and Zhu, Kenny Q.},\n    title = {Positive, Negative and Neutral: Modeling Implicit Feedback in Session-Based News Recommendation},\n    year = {2022},\n    isbn = {9781450387323},\n    publisher = {Association for Computing Machinery},\n    address = {New York, NY, USA},\n    url = {https://doi.org/10.1145/3477495.3532040},\n    doi = {10.1145/3477495.3532040},\n    abstract = {News recommendation for anonymous readers is a useful but challenging task for many news portals, where interactions between readers and articles are limited within a temporary login session. Previous works tend to formulate session-based recommendation as a next item prediction task, while they neglect the implicit feedback from user behaviors, which indicates what users really like or dislike. Hence, we propose a comprehensive framework to model user behaviors through positive feedback (i.e., the articles they spend more time on) and negative feedback (i.e., the articles they choose to skip without clicking in). Moreover, the framework implicitly models the user using their session start time, and the article using its initial publishing time, in what we call neutral feedback. Empirical evaluation on three real-world news datasets shows the framework's promising performance of more accurate, diverse and even unexpectedness recommendations than other state-of-the-art session-based recommendation approaches.},\n    booktitle = {Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval},\n    pages = {1185–1195},\n    numpages = {11},\n    keywords = {news recommendation, cold-start, session-based, time aware, implicit feedback},\n    location = {Madrid, Spain},\n    series = {SIGIR '22}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsummmeer%2Fsession-based-news-recommendation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsummmeer%2Fsession-based-news-recommendation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsummmeer%2Fsession-based-news-recommendation/lists"}