{"id":19979290,"url":"https://github.com/edisonleeeee/step","last_synced_at":"2025-09-19T19:32:27.499Z","repository":{"id":52811987,"uuid":"504466103","full_name":"EdisonLeeeee/STEP","owner":"EdisonLeeeee","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-14T10:27:49.000Z","size":31,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T03:37:22.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/EdisonLeeeee.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-06-17T09:08:20.000Z","updated_at":"2024-10-17T03:04:15.000Z","dependencies_parsed_at":"2023-01-19T23:22:41.593Z","dependency_job_id":null,"html_url":"https://github.com/EdisonLeeeee/STEP","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/EdisonLeeeee%2FSTEP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FSTEP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FSTEP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FSTEP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdisonLeeeee","download_url":"https://codeload.github.com/EdisonLeeeee/STEP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233590447,"owners_count":18699100,"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-11-13T03:37:25.431Z","updated_at":"2025-09-19T19:32:22.171Z","avatar_url":"https://github.com/EdisonLeeeee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Less Can be More: Unsupervised Graph Pruning for Large-scale Dynamic Graphs\n\nPyTorch implementation of the paper \"Less Can be More: Unsupervised Graph Pruning for Large-scale Dynamic Graphs\".\n\n# Requirements\n+ torch == 1.8.1\n- pytorch-lightning == 1.6.4\n- torch_scatter == 2.0.8\n- scikit-learn == 1.0.2\n- scipy == 1.7.3\n\n\n## Preprocessing\n\n### Dataset\nCreate a folder 'dataset' to store data file.\n\n[Wikipedia](http://snap.stanford.edu/jodie/wikipedia.csv)  \n[Reddit](http://snap.stanford.edu/jodie/reddit.csv)  \n\n### Preprocess the data\nWe use the data processing method of the reference [TGAT](https://openreview.net/pdf?id=rJeW1yHYwH), [repo](https://github.com/StatsDLMathsRecomSys/Inductive-representation-learning-on-temporal-graphs#inductive-representation-learning-on-temporal-graphs-iclr-2020).\n\nWe use the dense npy format to save the features in binary format. If edge features or nodes features are absent, it will be replaced by a vector of zeros.   \n  \n    python build_dataset_graph.py --data wikipedia --bipartite\n    python build_dataset_graph.py --data reddit --bipartite\n\n## Model Training\nTraining the Graph pruning network based on an unsupervised task.\n\n    python train_gsn.py --data_set wikipedia --prior_ratio 0.5 --learning_rate 1e-3 \n\n   \n\n## Inference\nPruning the edge data in the database inductively according to the trained Graph pruning network above.    \n\n    python edge_pruning.py --data_set wikipedia  --output_edge_txt ./result/edge_pred.txt --ckpt_file  ./lightning_logs_gsn/lightning_logs/version_0/checkpoints/epoch=10.ckpt\n\n## Evaluation\nUsing a gnn to evaluate the performance of graph pruning.(this requires a trained gnn model from the supervised task, eg. runing the following commands on dynamic node classification).\n    \n    python train_gnn.py --mode origin --data_set wikipedia\n\n    python eval_gnn.py --data_set wikipedia --mode gsn --pruning_ratio 0.5 --mask_edge --output_edge_txt ./result/edge_pred.txt --ckpt_file ./lightning_logs_gnn/lightning_logs/version_0/checkpoints/epoch=10.ckpt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonleeeee%2Fstep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedisonleeeee%2Fstep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonleeeee%2Fstep/lists"}