Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Hongyi Zhang 98bb2fe11c | 1 year ago | |
---|---|---|
.. | ||
README.md | 1 year ago |
Paper: [GTN] Graph Transformer Networks
Extension Paper: [fastGTN] Graph Transformer Networks: Learning Meta-path Graphs to Improve GNNs
Code from author: https://github.com/seongjunyun/Graph_Transformer_Networks
Clone the OpenHGNN
# Run GTN
python main.py -m GTN -t node_classification -d acm4GTN -g 0 --use_best_config
# Run the fastGTN
python main.py -m fastGTN -t node_classification -d acm4GTN -g 0 --use_best_config
If you do not have gpu, set -gpu -1.
acm4GTN/imdb4GTN/dblp4GTN
Node classification
Node classification(F1 score) | acm4GTN | imdb4GTN | dblp4GTN |
---|---|---|---|
paper[GTN] | 92.68 | 60.92 | 94.18 |
OpenHGNN[GTN] | Macro: 92.03 Micro: 92.00 | Macro: 56.97 Micro: 58.61 | 87.33(OOM on Tesla T4(16GB), cpu result) |
OpenHGNN[fastGTN] | Macro: 92.92 Micro: 92.85 | Macro: 60.62 Micro: 62.59 | Macro: 90.39 Micro: 91.39 |
The model is trained in semi-supervisied node classification.
Supported dataset: acm4GTN, imdb4GTN, dblp4ACM
Note: Every node in dataset should have the same features dimension.
We process the acm dataset given by HAN. It saved as dgl.heterograph and can be loaded by dgl.load_graphs
You can download the dataset by
wget https://s3.cn-north-1.amazonaws.com.cn/dgl-data/dataset/acm4GTN.zip
wget https://s3.cn-north-1.amazonaws.com.cn/dgl-data/dataset/imdb4GTN.zip
Or run the code mentioned above and it will download automaticlly.
num_channels = 2 # number of channel
num_layers = 3 # number of layer
adaptive_lr_flag = True # use different learning rate for weight in GTLayer.
Best config can be found in best_config
dgl.adj_product_graph which is equivalent SpSpMM.
Tianyu Zhao[GAMMA LAB]
Submit an issue or email to tyzhao@bupt.edu.cn.
OpenHGNN是由北邮GAMMA Lab开发的基于PyTorch和DGL的开源异质图神经网络工具包。
Python Markdown Shell
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》