{"id":18646418,"url":"https://github.com/ucbrise/graphtrans","last_synced_at":"2025-04-11T12:31:49.278Z","repository":{"id":39346223,"uuid":"418793570","full_name":"ucbrise/graphtrans","owner":"ucbrise","description":"Representing Long-Range Context for Graph Neural Networks with Global Attention","archived":false,"fork":false,"pushed_at":"2022-04-22T01:18:40.000Z","size":43,"stargazers_count":129,"open_issues_count":6,"forks_count":21,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-25T14:01:46.807Z","etag":null,"topics":["deep-learning","graph-neural-networks","pytorch","transformer"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ucbrise.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":"2021-10-19T06:10:44.000Z","updated_at":"2025-03-18T15:59:52.000Z","dependencies_parsed_at":"2022-07-14T22:17:06.623Z","dependency_job_id":null,"html_url":"https://github.com/ucbrise/graphtrans","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/ucbrise%2Fgraphtrans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucbrise%2Fgraphtrans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucbrise%2Fgraphtrans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucbrise%2Fgraphtrans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ucbrise","download_url":"https://codeload.github.com/ucbrise/graphtrans/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248401973,"owners_count":21097328,"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":["deep-learning","graph-neural-networks","pytorch","transformer"],"created_at":"2024-11-07T06:19:47.057Z","updated_at":"2025-04-11T12:31:49.000Z","avatar_url":"https://github.com/ucbrise.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Representing Long-Range Context for Graph Neural Networks with Global Attention\n```\n@inproceedings{Wu2021GraphTrans,\n  title={Representing Long-Range Context for Graph Neural Networks with Global Attention},\n  author={Wu, Zhanghao and Jain, Paras and Wright, Matthew and Mirhoseini, Azalia and Gonzalez, Joseph E and Stoica, Ion},\n  booktitle={Advances in Neural Information Processing Systems (NeurIPS)},\n  year={2021}\n}\n```\n## Overview\nWe release the PyTorch code for the GraphTrans [[paper](https://proceedings.neurips.cc//paper/2021/hash/6e67691b60ed3e4a55935261314dd534-Abstract.html)]\n\n## Installation\nTo setup the Python environment, please install conda first. \nAll the required environments are in [requirement.yml](./requirement.yml).\n```bash\nconda env create -f requirement.yml\n```\n## How to Run\n\nTo run the experiments, please refer to the commands below (taking OGBG-Code2 as an example):\n```bash\n# GraphTrans (GCN-Virtual)\npython main.py --configs configs/code2/gnn-transformer/JK=cat/pooling=cls+norm_input.yml --runs 5\n# GraphTrans (GCN)\npython main.py --configs configs/code2/gnn-transformer/no-virtual/pooling=cls+norm_input.yml --runs 5\n# Or to use slurm\nsbatch ./slurm-run.sh ”configs/code2/gnn-transformer/JK=cat/pooling=cls+norm_input.yml --runs 5”\n```\nThe config path for each dataset/model can be found in the result table below.\n## Results\n| Dataset | Model | Valid | Test | Config |\n|:--|:--|:--:|:--:|:--:|\n| [OGBG-Code2](https://ogb.stanford.edu/docs/leader_graphprop/#ogbg-code2) | GraphTrans (GCN) | 0.1599±0.0009 | 0.1751±0.0015 | [Config](configs/code2/gnn-transformer/no-virtual/pooling=cls+norm_input.yml) |\n| | GraphTrans (PNA) | 0.1622±0.0025 | 0.1765±0.0033 | [Config](configs/code2/pna-transformer/pooling=cls+norm_input.yml) |\n| | GraphTrans (GCN-Virtual) | 0.1661±0.0012 | 0.1830±0.0024 | [Config](configs/code2/gnn-transformer/JK=cat/pooling=cls+norm_input.yml) |\n| [OGBG-Molpcba](https://ogb.stanford.edu/docs/leader_graphprop/#ogbg-molpcba) | GraphTrans (GIN) | 0.2893±0.0050 | 0.2756±0.0039 | [Config](configs/molpcba/gnn-transformer/no-virtual/JK=cat/pooling=cls+gin+norm_input.yml) |\n| | GraphTrans (GIN-Virtual) | 0.2867±0.0022 | 0.2761±0.0029 | [Config](configs/molpcba/gnn-transformer/JK=cat/pooling=cls+gin+norm_input.yml) |\n| [NCI1](https://ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets) | GraphTrans (small, GCN) | — | 81.3±1.9 | [Config](configs/NCI1/gnn-transformer/no-virtual/gd=128+gdp=0.1+tdp=0.1+l=3+cosine.yml) |\n| | GraphTrans (large, GIN) | — | 82.6±1.2 | [Config](configs/NCI1/gnn-transformer/no-virtual/gin+gdp=0.1+tdp=0.1+l=4+cosine.yml) |\n| [NCI109](https://ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets) | GraphTrans (small, GCN) | — | 79.2±2.2 | [Config](configs/NCI109/gnn-transformer/no-virtual/ablation-pos_encoder) |\n| | GraphTrans (large, GIN) | — | 82.3±2.6 | [Config](configs/NCI109/gnn-transformer/no-virtual/gin+gdp=0.1+tdp=0.1+l=4+cosine.yml) |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucbrise%2Fgraphtrans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fucbrise%2Fgraphtrans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucbrise%2Fgraphtrans/lists"}