{"id":13958296,"url":"https://github.com/shenweichen/DSIN","last_synced_at":"2025-07-20T23:30:54.606Z","repository":{"id":35447499,"uuid":"187190336","full_name":"shenweichen/DSIN","owner":"shenweichen","description":"Code for the IJCAI'19 paper  \"Deep Session Interest Network for Click-Through Rate Prediction\"","archived":false,"fork":false,"pushed_at":"2023-05-23T04:07:02.000Z","size":30,"stargazers_count":444,"open_issues_count":5,"forks_count":132,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-25T06:07:43.227Z","etag":null,"topics":["advertising-dataset","click-through-rate","ctr","deep-learning","dien","din","dsin","ijcai","recommender-system","session-based-recommendation-system"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1905.06482","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shenweichen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-17T09:44:07.000Z","updated_at":"2025-05-22T20:46:06.000Z","dependencies_parsed_at":"2023-01-15T21:26:43.802Z","dependency_job_id":"cabd002b-dd40-4a78-b758-07cad9699792","html_url":"https://github.com/shenweichen/DSIN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shenweichen/DSIN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenweichen%2FDSIN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenweichen%2FDSIN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenweichen%2FDSIN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenweichen%2FDSIN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shenweichen","download_url":"https://codeload.github.com/shenweichen/DSIN/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenweichen%2FDSIN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266214659,"owners_count":23893933,"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":["advertising-dataset","click-through-rate","ctr","deep-learning","dien","din","dsin","ijcai","recommender-system","session-based-recommendation-system"],"created_at":"2024-08-08T13:01:28.940Z","updated_at":"2025-07-20T23:30:54.286Z","avatar_url":"https://github.com/shenweichen.png","language":"Python","readme":"# Deep Session Interest Network for Click-Through Rate Prediction\n\nExperiment code on Advertising Dataset of paper Deep Session Interest Network for Click-Through Rate Prediction(https://arxiv.org/abs/1905.06482)  \n\n[Yufei Feng](https://github.com/649435349) , Fuyu Lv, Weichen Shen and Menghan Wang and Fei Sun and Yu Zhu and Keping Yang.  \n\nIn Proceedings of 28th International Joint Conference on Artificial Intelligence (IJCAI 2019)\n\n----------------\n## Operating environment\nplease use \n`pip install -r requirements.txt`\nto setup the operating environment in `python3.6`.\n\n--------------------------\n## Download dataset and preprocess\n### Download dataset\n\n1. Download Dataset [Ad Display/Click Data on Taobao.com](https://tianchi.aliyun.com/dataset/dataDetail?dataId=56)\n2. Extract the files into the ``raw_data`` directory\n   \n### Data preprocessing\n\n1. run  `0_gen_sampled_data.py`,\nsample the data by user\n2. run `1_gen_sessions.py`,\ngenerate historical session sequence for each user\n\n## Training and Evaluation\n\n### Train DIN model\n1. run `2_gen_din_input.py`,generate input data\n2. run `train_din.py`\n\n### Train DIEN model\n1. run `2_gen_dien_input.py`,generate input data(It may take a long time to sample negative samples.)\n2. run `train_dien.py`\n\n### Train DSIN model\n1. run `2_gen_dsin_input.py`,generate input data\n2. run `train_dsin.py`\n   \u003e The loss of DSIN with `bias_encoding=True` may be NaN sometimes on Advertising Dataset and it remains a confusing problem since it never occurs in the production environment.We will work on it and also appreciate your help.\n\n# License\n\nThis project is licensed under the terms of the  Apache-2 license. See [LICENSE](./LICENSE) for additional details.","funding_links":[],"categories":["其他_推荐系统"],"sub_categories":["网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenweichen%2FDSIN","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshenweichen%2FDSIN","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenweichen%2FDSIN/lists"}