{"id":19979310,"url":"https://github.com/edisonleeeee/icdm2022_competition_3rd_place_solution","last_synced_at":"2025-10-24T00:17:18.141Z","repository":{"id":109814394,"uuid":"536068011","full_name":"EdisonLeeeee/ICDM2022_competition_3rd_place_solution","owner":"EdisonLeeeee","description":"3rd place solution of ICDM 2022 Risk Commodities Detection on Large-Scale E-Commence Graphs","archived":false,"fork":false,"pushed_at":"2022-09-15T10:18:39.000Z","size":2311,"stargazers_count":37,"open_issues_count":1,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T04:33:26.540Z","etag":null,"topics":["heterogeneous-graph-neural-network","heterognn","icdm-comptetion","icdm2022","tianchi-competition"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EdisonLeeeee.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-13T10:14:19.000Z","updated_at":"2024-12-15T07:31:44.000Z","dependencies_parsed_at":"2023-05-01T13:26:45.417Z","dependency_job_id":null,"html_url":"https://github.com/EdisonLeeeee/ICDM2022_competition_3rd_place_solution","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EdisonLeeeee/ICDM2022_competition_3rd_place_solution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FICDM2022_competition_3rd_place_solution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FICDM2022_competition_3rd_place_solution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FICDM2022_competition_3rd_place_solution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FICDM2022_competition_3rd_place_solution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdisonLeeeee","download_url":"https://codeload.github.com/EdisonLeeeee/ICDM2022_competition_3rd_place_solution/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FICDM2022_competition_3rd_place_solution/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259336213,"owners_count":22842506,"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":["heterogeneous-graph-neural-network","heterognn","icdm-comptetion","icdm2022","tianchi-competition"],"created_at":"2024-11-13T03:37:28.733Z","updated_at":"2025-10-24T00:17:18.045Z","avatar_url":"https://github.com/EdisonLeeeee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ICDM 2022: Risk Commodities Detection on Large-Scale E-Commence Graphs\n![](imgs/banner.png)\n\n---\n\n[[Slides]](./slides.pdf)\n\n\nThis is the 3rd place solution for [ICDM 2022: Risk Commodities Detection on Large-Scale E-Commence Graphs Competition](https://tianchi.aliyun.com/competition/entrance/531976/introduction). \n\n\n# Introduction\nRecently, graph computing technologies, especially graph neural networks, have gained rapid development as well as wide application.\n\nIn the risk commodity detection scenario on e-commerce platforms, there is a fierce confrontation between attackers and risk detection systems. Malicious users always deliberately disguise risk information in order to avoid platform detection. By introducing graph data, we can alleviate the performance decline caused by the confrontation of malicious users.\n\nIn practice, the performance of the graph algorithm is often closely related to the quality of the graph structure. Malicious users usually forge their devices, and addresses to circumvent our detection. How to fully mine risk information in the graph structure data with a lot of noise is a very challenging problem. In addition, heterogeneous graph structure, as well as huge graph scale, are also challenges.\n\nThe competition provides a risk commodity detection dataset extracted from real-world risk scenarios at Alibaba. It requires participants to detect risky products using graph algorithms in a large-scale and heterogeneous graph with imbalanced samples.\n\n# Requirements\nHigher versions should be also available.\n\n+ Python 3.7.3\n+ numpy==1.18.1\n+ torch==1.12.1+cu102\n+ torch-cluster==1.6.0\n+ torch_geometric\u003e=2.1.0\n+ torch-scatter==2.0.9\n+ torch-sparse==0.6.14\n+ torch-spline-conv==1.2.1\n+ CUDA 10.2\n+ CUDNN 7.6.0\n\n\n# HeteroGNN\n## Model Overview\n\n![](imgs/framework.png)\n\n\n## Data preparation\n+ Creat a folder `/data` in your workspace\n+ Download Session I and II datasets from [here](https://tianchi.aliyun.com/competition/entrance/531976/information) and put them in the `data/session`/ and `data/session2`, respectively.\n+ Extract zipped graphs: `unzip icdm2022_session1_train.zip` or `unzip icdm2022_session2.zip`\n+ Pre-process datasets (see follows)\n\n\n## Preprocessing\n+ Session I\n```bash\ncd code/\npython process_data.py --session 1\n```\nThen you will get `icdm2022_session1.pt` in the `/data` folder.\n\n+  Session II\n```bash\ncd code/\npython process_data.py --session 2\n```\nThen you will get `icdm2022_session2.pt` in the `/data` folder.\n\nNOTE: other unnecessary files are manually removed after pre-processing.\n\n## How to Run the Model\n\nCodes of Session I and Session II are marked by their suffixes `_sess1` and `_sess2`.\n\n\n## Session I\n\n```bash\ncd code/\npython main_sess1.py --lp --full --n-epoch 30  \u0026\u0026 python inference_sess1.py --lp \n```\n+ Running time ~20min\n+ `main_sess1.py` is to train the model and `inference_sess1.py` is to load the model and do inference\n+ `--lp` indicates using `Masked Label Propagation` during training and inference\n+ `--full` indicates using full training datasets (including validation set)\n+ We run 30 epochs in Session I to avoid overfitting\n\nAfter finished, there would be two files in the `code/` directly:\n+ `model_sess1.pth`: trained model\n+ `session1_record.txt`: running logs\n\n\n\n## Session II\n```bash\ncd code/\npython main_sess2.py --n-epoch 100 --full \u0026\u0026 python inference_sess2.py\n```\n+ Running time ~40min\n+ `--full` indicates using full training datasets (including validation set)\n+ `Masked Label Propagation` is not used in Session II as there are no labels provided\n\n\nAfter finished, there would be two files in the `code/` directly:\n+ `model_sess2.pth`: trained model\n+ `session2_record.txt`: running logs\n\n\n# File Structures\n```bash\nICDM2022_competition_3rd_place_solution\n├── code\n│   ├── inference_sess1.py\n│   ├── inference_sess2.py\n│   ├── logger.py\n│   ├── main_sess1.py\n│   ├── main_sess2.py\n│   ├── metapath.py\n│   ├── model_sess1.py\n│   ├── model_sess2.py\n│   ├── process_data.py\n├── data\n│   ├── session1\n│   │   ├── icdm2022_session1.pt\n│   │   ├── icdm2022_session1_test_ids.txt\n│   │   └── Readme.md\n│   └── session2\n│       ├── icdm2022_session2.pt\n│       ├── icdm2022_session2_test_ids.txt\n├── README.md\n└── submit\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonleeeee%2Ficdm2022_competition_3rd_place_solution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedisonleeeee%2Ficdm2022_competition_3rd_place_solution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonleeeee%2Ficdm2022_competition_3rd_place_solution/lists"}