{"id":19603906,"url":"https://github.com/divelab/neighbor2seq","last_synced_at":"2025-10-25T09:04:25.737Z","repository":{"id":44608013,"uuid":"450168889","full_name":"divelab/Neighbor2Seq","owner":"divelab","description":"Official implementation of \"Neighbor2Seq: Deep Learning on Massive Graphs by Transforming Neighbors to Sequences\" [SDM2022]","archived":false,"fork":false,"pushed_at":"2022-02-08T03:20:32.000Z","size":206,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-05T02:21:43.995Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divelab.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}},"created_at":"2022-01-20T16:16:38.000Z","updated_at":"2024-05-22T20:09:48.000Z","dependencies_parsed_at":"2022-09-17T14:43:25.483Z","dependency_job_id":null,"html_url":"https://github.com/divelab/Neighbor2Seq","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/divelab%2FNeighbor2Seq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2FNeighbor2Seq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2FNeighbor2Seq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2FNeighbor2Seq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divelab","download_url":"https://codeload.github.com/divelab/Neighbor2Seq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251195923,"owners_count":21550870,"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-11T09:33:38.120Z","updated_at":"2025-10-25T09:04:25.637Z","avatar_url":"https://github.com/divelab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neighbor2Seq: Deep Learning on Massive Graphs by Transforming Neighbors to Sequences\nThis repository is an official PyTorch implementation of Neighbor2Seq.\n\n[Meng Liu](https://mengliu1998.github.io) and [Shuiwang Ji](http://people.tamu.edu/~sji/). [Neighbor2Seq: Deep Learning on Massive Graphs by Transforming Neighbors to Sequences](https://arxiv.org/abs/2202.03341) [SDM2022].\n\n## Requirements\n* PyTorch\n* PyTorch Geometric (with 1.6.1-1.7.2 recommended)\n* OGB\n\n## Reference\n```\n@inproceedings{liu2022neighbor2seq,\n  title={{Neighbor2Seq}: Deep Learning on Massive Graphs by Transforming Neighbors to Sequences},\n  author={Liu, Meng and Ji, Shuiwang},\n  booktitle={Proceedings of the 2022 SIAM International Conference on Data Mining},\n  year={2022},\n  organization={SIAM}\n}\n```\n\n## Run\nAll of our running scripts are included in [`run_ours.sh`](https://github.com/divelab/Neighbor2Seq/blob/main/Neighbor2Seq/run_ours.sh). An example on Flickr is as follows.\n* Step 1: Precompute Neighbor2Seq\n```linux\npython precompute.py --dataset=Flickr --P=10 --add_self_loop=True\n```\n* Step 2: Train and evaluate Neighbor2Seq+Conv or Neighbor2Seq+Attn \n```linux\nCUDA_VISIBLE_DEVICES=0 python main_inductive.py --model=conv --lr=0.0008 --K=10 --weight_decay=0.00005 --hidden=256 --dropout=0.5 --batch_size=24576 --epochs=400 --kernel_size=7 --runs=10 --log_step=1 \n```\n```linux\nCUDA_VISIBLE_DEVICES=0 python main_inductive.py --model=posattn --lr=0.002 --K=10 --weight_decay=0.00005 --hidden=256 --dropout=0.5 --batch_size=256 --epochs=200 --pe_drop=0.25 --runs=10 --log_step=1\n```\n\n## Results\n* Results on inductive tasks: `Reddit`, `Flickr`, and `Yelp`\n\u003cimg src=\"https://github.com/mengliu1998/Contents/blob/master/Neighbor2Seq/result_inductive.png\" width=\"600\" /\u003e\n\n* Results on `ogbn-papers100M`\n\u003cimg src=\"https://github.com/mengliu1998/Contents/blob/master/Neighbor2Seq/result_papers100M.png\" width=\"600\" /\u003e\n\n* Results on `ogbn-products`\n\u003cimg src=\"https://github.com/mengliu1998/Contents/blob/master/Neighbor2Seq/result_products.png\" width=\"600\" /\u003e\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivelab%2Fneighbor2seq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivelab%2Fneighbor2seq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivelab%2Fneighbor2seq/lists"}