{"id":27946630,"url":"https://github.com/lirongwu/gssc","last_synced_at":"2025-05-07T13:56:43.158Z","repository":{"id":267568701,"uuid":"854567142","full_name":"LirongWu/GSSC","owner":"LirongWu","description":"Code for TNNLS paper \"Learning to Model Graph Structural Information on MLPs via Graph Structure Self-Contrasting\"","archived":false,"fork":false,"pushed_at":"2024-12-11T04:32:52.000Z","size":1185,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T13:56:37.371Z","etag":null,"topics":["graph-algorithms","graph-contrastive-learning","graph-modeling","graph-neural-networks"],"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/LirongWu.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}},"created_at":"2024-09-09T12:06:56.000Z","updated_at":"2024-12-12T08:33:25.000Z","dependencies_parsed_at":"2024-12-11T11:32:35.326Z","dependency_job_id":null,"html_url":"https://github.com/LirongWu/GSSC","commit_stats":null,"previous_names":["lirongwu/gssc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LirongWu%2FGSSC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LirongWu%2FGSSC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LirongWu%2FGSSC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LirongWu%2FGSSC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LirongWu","download_url":"https://codeload.github.com/LirongWu/GSSC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892520,"owners_count":21820646,"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":["graph-algorithms","graph-contrastive-learning","graph-modeling","graph-neural-networks"],"created_at":"2025-05-07T13:56:41.725Z","updated_at":"2025-05-07T13:56:43.143Z","avatar_url":"https://github.com/LirongWu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graph Structure Self-Contrasting (GSSC)\n\n\nThis is a PyTorch implementation of Graph Structure Self-Contrasting (GSSC), and the code includes the following modules:\n\n* Dataset Loader (Cora, Citeseer, Actor, Coauthor-CS, and Coauthor-Phy)\n\n* Various baselines (GCN, GraphSage, GAT, SGC, APPNP, and DAGNN compared in this paper)\n\n* Neighborhood sparsification (NeighSparse) and Neighborhood self-contrasting (NeighContrast) network\n\n* Bi-level optimization framework\n\n* Training and evaluation paradigm \n\n  \n\n## Main Requirements\n\n* networkx==2.5\n* numpy==1.19.2\n* dgl==0.6.1\n* torch==1.6.0\n\n\n\n## Description\n\n* main.py  \n  * main() -- Train the model for node classification task with NeighContrast network on five datasets.\n* model.py  \n  * MLP_GNN() -- A pure MLP-based architecture ans two prediction heads.\n  * EdgeSampler() -- Neighborhood Sparsification (NeighSparse) Network.\n  * MixupScale() -- Learning Sampling Coefficients for interpolation between the target node and its ineighborhood nodes.\n* dataset.py  \n\n  * dataloader() -- Load five datasets as well as their variants with different label rates, label noise, and struture disturbance.\n* utils.py  \n  * SetSeed() -- Set seeds for reproducible results.\n\n\n\n## Running the code\n\n1. Install the required dependency packages\n\n3. To get the results on a specific *dataset*, please run with proper hyperparameters:\n\n  ```\npython main.py --dataset data_name\n  ```\n\nwhere the *data_name* is one of the 5 datasets (Cora, Citeseer, Actor, Coauthor-CS, and Coauthor-Phy) . Use  *Cora* dataset an example: \n\n```\npython main.py --dataset cora\n```\n\n3. To get the results on datasets with different label rates, label noise, and struture disturbance, please run with:\n\n  ```\npython main.py --label_mode\n  ```\n\nwhere the *label_mode* denotes different dataset variants. \n\n**(1) -1:** training with 1 labels per class; \n\n**(2) -3:** training with 3 labels per class; \n\n**(3) -5**: training with 5 labels per class; \n\n**(4) -10:** training with 5 labels per class; \n\n**(5) -25:** training with structure perturbation ratio 5%; \n\n**(6) -30:** training with structure perturbation ratio 10%; \n\n**(7) -40:** training with structure perturbation ratio 20%; \n\n**(8) -50:** training with structure perturbation ratio 30%; \n\n**(9) -51:** training with symmetric label noise ratio 20%; \n\n**(10) -52:** training with symmetric label noise ratio 40%; \n\n**(11) -53:** training with symmetric label noise ratio 60%; \n\n**(12) -54:** training with asymmetric label noise ratio 20%; \n\n**(13) -55:** training with asymmetric label noise ratio 40%; \n\n**(14) -56:** training with asymmetric label noise ratio 60%.\n\n\n\n## Citation\n\nIf you are interested in our repository and our paper, please cite the following paper:\n\n```\n@article{wu2024learning,\n  title={Learning to Model Graph Structural Information on MLPs via Graph Structure Self-Contrasting},\n  author={Wu, Lirong and Lin, Haitao and Zhao, Guojiang and Tan, Cheng and Li, Stan Z},\n  journal={IEEE Transactions on Neural Networks and Learning Systems},\n  year={2024},\n  publisher={IEEE}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flirongwu%2Fgssc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flirongwu%2Fgssc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flirongwu%2Fgssc/lists"}