{"id":23868511,"url":"https://github.com/gentlezhu/egi","last_synced_at":"2025-09-08T16:32:52.102Z","repository":{"id":38320625,"uuid":"340428738","full_name":"GentleZhu/EGI","owner":"GentleZhu","description":"Transfer Learning of Graph Neural Networks with Ego-graph Information Maximization (NeurIPS 21')","archived":false,"fork":false,"pushed_at":"2021-12-09T16:37:43.000Z","size":246,"stargazers_count":19,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-02-28T04:17:00.287Z","etag":null,"topics":["domain-adaptation","graph-neural-netowrks","pre-training","transfer-learning"],"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/GentleZhu.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-02-19T16:36:24.000Z","updated_at":"2023-02-25T13:34:46.000Z","dependencies_parsed_at":"2022-07-14T03:20:38.729Z","dependency_job_id":null,"html_url":"https://github.com/GentleZhu/EGI","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GentleZhu%2FEGI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GentleZhu%2FEGI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GentleZhu%2FEGI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GentleZhu%2FEGI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GentleZhu","download_url":"https://codeload.github.com/GentleZhu/EGI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232329216,"owners_count":18506345,"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":["domain-adaptation","graph-neural-netowrks","pre-training","transfer-learning"],"created_at":"2025-01-03T11:28:33.828Z","updated_at":"2025-01-03T11:28:34.586Z","avatar_url":"https://github.com/GentleZhu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EGI\nSource code for [\"Transfer Learning of Graph Neural Networks with Ego-graph Information Maximization\"](https://proceedings.neurips.cc/paper/2021/file/0dd6049f5fa537d41753be6d37859430-Paper.pdf), published in NeurIPS 2021.\n\n\nIf you find our paper useful, please consider cite the following paper.\n```\n@article{zhu2020transfer,\n  title={Transfer learning of graph neural networks with ego-graph information maximization},\n  author={Zhu, Qi and Yang, Carl and Xu, Yidan and Wang, Haonan and Zhang, Chao and Han, Jiawei},\n  journal={arXiv preprint arXiv:2009.05204},\n  year={2020}\n}\n```\n\n## Requirements\nPlease use old version of DGL library (0.4.3) to run the original code. \n### CPU version\n```\npip install dgl==0.4.3\n```\n### DGL GPU version (recommened)\nChange your cuda version accordingly.\n```\npip install dgl-cu101==0.4.3\n```\n\n## Model specifications\nEGI model can be found under models/subgi.py, we call EGI as SubGI when code is developed. The default encoder arch is GIN as you will see in the code. To run the airport data, see example below\n```\npython run_airport.py --file-path=data/usa-airports.edgelist --label-path=data/labels-usa-airports.txt --n-dgi-epochs=100  --n-hidden=32 --self-loop --gpu=0 --n-layers=1 --dgi-lr=0.01 --model-id=2 --model-type=2\n```\n\nWe also provide the code to run DGI on the dataset as below:\n```\npython run_airport.py --file-path=data/usa-airports.edgelist --label-path=data/labels-usa-airports.txt --n-dgi-epochs=100  --n-hidden=32 --self-loop --gpu=0 --n-layers=1 --dgi-lr=0.001 --model-id=2 --model-type=0\n```\n\n## Computer the EGI gap term\n### from edgelist\n```\npython compute_bound_filepath.py --args.file-path=data/europe-aiports.edgelist --args.label-path=data/usa-aiports.edgelist\n```\n### from pickle file for synthetic experiment\n```\npython compute_bound_pickle.py --args.file-path=data/barabasi_small_graphs_full.pkl --args.label-path=data/forest_fire_graphs_full.pkl\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgentlezhu%2Fegi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgentlezhu%2Fegi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgentlezhu%2Fegi/lists"}