启智社区(中文版)| Github Community (English) |**Space4HGNN [SIGIR2022]** |Benchmark&Leaderboard | Slack Channel
OpenHGNN是一个基于 DGL [Deep Graph Library] 和 PyTorch 的开源异质图神经网络工具包,集成了异质图神经网络的前沿模型。
算法库支撑了北邮牵头,蚂蚁集团、中国移动、海致科技等参与的“大规模复杂异质图数据智能分析技术与规模化应用”项目。该项目获得了2022年电子学会科技进步一等奖。
我们开源了0.4版本。
我们的论文 OpenHGNN: An Open Source Toolkit for Heterogeneous Graph Neural Network 在CIKM2022 short paper track接收。
我们开源了0.3版本。
我们开源了0.2版本。
1. Python 环境 (可选): 推荐使用 Conda 包管理
conda create -n openhgnn python=3.6
source activate openhgnn
2. 安装Pytorch: 参考 PyTorch安装文档 根据你的操作系统和CUDA版本选择合适的安装命令。例如:
pip install torch torchvision torchaudio
3. 安装DGL: 参考 DGL安装文档 根据你的操作系统和CUDA版本选择合适的安装命令。例如:
pip install dgl -f https://data.dgl.ai/wheels/repo.html
4. 安装 openhgnn:
pip install openhgnn
git clone https://github.com/BUPT-GAMMA/OpenHGNN
# If you encounter a network error, try git clone from openi as following.
# git clone https://git.openi.org.cn/GAMMALab/OpenHGNN.git
cd OpenHGNN
pip install .
python main.py -m model_name -d dataset_name -t task_name -g 0 --use_best_config --load_from_pretrained
使用方法: main.py [-h] [--model MODEL] [--task TASK] [--dataset DATASET]
[--gpu GPU] [--use_best_config]
可选参数:
-h, --help
展示帮助信息并退出
--model -m
模型名
--task -t
任务名
--dataset -d
数据集名
--gpu -g
控制你使用哪一个GPU,如果没有GPU,设定 -g -1。
--use_best_config
use_best_config 意味着你使用该模型在该数据集下最优的配置,如果你想要设定不同的超参数,请手动修改 配置文件。使用最佳配置会覆盖配置文件中的参数。
--load_from_pretrained
从默认检查点加载模型。
示例:
python main.py -m GTN -d imdb4GTN -t node_classification -g 0 --use_best_config
提示: 如果你对某个模型感兴趣,你可以参考下列的模型列表。
请参考 文档 了解更多的基础和进阶的使用方法。
表格中的链接给出了模型的基本使用方法.
模型 | 节点分类 | 链路预测 | 推荐 |
---|---|---|---|
TransE[NIPS 2013] | ✔️ | ||
TransH[AAAI 2014] | ✔️ | ||
TransR[AAAI 2015] | ✔️ | ||
TransD[ACL 2015] | ✔️ | ||
Metapath2vec[KDD 2017] | ✔️ | ||
RGCN[ESWC 2018] | ✔️ | ✔️ | |
HERec[TKDE 2018] | ✔️ | ||
HAN[WWW 2019] | ✔️ | ✔️ | |
KGCN[WWW 2019] | ✔️ | ||
HetGNN[KDD 2019] | ✔️ | ✔️ | |
HeGAN[KDD 2019] | ✔️ | ||
HGAT[EMNLP 2019] | |||
GTN[NeurIPS 2019] & fastGTN | ✔️ | ||
RSHN[ICDM 2019] | ✔️ | ✔️ | |
GATNE-T[KDD 2019] | ✔️ | ||
DMGI[AAAI 2020] | ✔️ | ||
MAGNN[WWW 2020] | ✔️ | ||
HGT[WWW 2020] | |||
CompGCN[ICLR 2020] | ✔️ | ✔️ | |
NSHE[IJCAI 2020] | ✔️ | ||
NARS[arxiv] | ✔️ | ||
MHNF[arxiv] | ✔️ | ||
HGSL[AAAI 2021] | ✔️ | ||
HGNN-AC[WWW 2021] | ✔️ | ||
HeCo[KDD 2021] | ✔️ | ||
SimpleHGN[KDD 2021] | ✔️ | ||
HPN[TKDE 2021] | ✔️ | ✔️ | |
RHGNN[arxiv] | ✔️ | ||
HDE[ICDM 2021] | ✔️ | ||
HetSANN[AAAI 2020] | ✔️ | ||
ieHGCN[TKDE 2021] | ✔️ |
OpenHGNN团队[北邮 GAMMA 实验室]、DGL 团队和鹏城实验室。
欢迎在您的工作中用如下的方式引用OpenHGNN:
@inproceedings{han2022openhgnn,
title={OpenHGNN: An Open Source Toolkit for Heterogeneous Graph Neural Network},
author={Hui Han, Tianyu Zhao, Cheng Yang, Hongyi Zhang, Yaoqi Liu, Xiao Wang, Chuan Shi},
booktitle={CIKM},
year={2022}
}
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》