启智社区(中文版) | Space4HGNN [SIGIR2022] | Benchmark&Leaderboard
This is an open-source toolkit for Heterogeneous Graph Neural Network based on DGL [Deep Graph Library] and PyTorch. We integrate SOTA models of heterogeneous graph.
2021-02-28
We release the latest version v0.2.
- New Models
- Space4HGNN [SIGIR2022]
- Benchmark&Leaderboard
2021-01-07
启智社区用户可以享受到如下功能:
- 全新的中文文档
- 免费的计算资源
- OpenHGNN最新功能
- Easy-to-Use: OpenHGNN provides easy-to-use interfaces for running experiments with the given models and dataset. Besides, we also integrate optuna to get hyperparameter optimization.
- Extensibility: User can define customized task/model/dataset to apply new models to new scenarios.
- Efficiency: The backend dgl provides efficient APIs.
1. Python environment (Optional): We recommend using Conda package manager
conda create -n openhgnn python=3.7
source activate openhgnn
2. Install Pytorch: Follow their tutorial to run the proper command according to your OS and CUDA version. For example:
pip install torch torchvision torchaudio
3. Install DGL: Follow their tutorial to run the proper command according to your OS and CUDA version. For example:
pip install dgl dglgo -f https://data.dgl.ai/wheels/repo.html
4. OpenHGNN and other dependencies:
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 -r requirements.txt
Running an existing baseline model on an existing benchmark dataset
python main.py -m model_name -d dataset_name -t task_name -g 0 --use_best_config --load_from_pretrained
usage: main.py [-h] [--model MODEL] [--task TASK] [--dataset DATASET] [--gpu GPU] [--use_best_config]
optional arguments:
-h, --help
show this help message and exit
--model -m
name of models
--task -t
name of task
--dataset -d
name of datasets
--gpu -g
controls which gpu you will use. If you do not have gpu, set -g -1.
--use_best_config
use_best_config means you can use the best config in the dataset with the model. If you want to
set the different hyper-parameter, modify the openhgnn.config.ini manually. The best_config
will override the parameter in config.ini.
--use_hpo
Besides use_best_config, we give a hyper-parameter example to search the best
hyper-parameter automatically.
--load_from_pretrained
will load the model from a default checkpoint.
e.g.:
python main.py -m GTN -d imdb4GTN -t node_classification -g 0 --use_best_config
Note: If you are interested in some model, you can refer to the below models list.
Refer to the docs to get more basic and depth usage.
The link will give some basic usage.
Model | Node classification | Link prediction | Recommendation |
---|---|---|---|
Metapath2vec[KDD 2017] | ✔️ | ||
RGCN[ESWC 2018] | ✔️ | ✔️ | |
HERec[TKDE 2018] | ✔️ | ||
HAN[WWW 2019] | ✔️ | ✔️ | |
KGCN[WWW 2019] | ✔️ | ||
HetGNN[KDD 2019] | ✔️ | ✔️ | |
HGAT[EMNLP 2019] | |||
GTN[NeurIPS 2019] & fastGTN | ✔️ | ||
RSHN[ICDM 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] | ✔️ | ||
GATNE-T[KDD 2019] | ✔️ |
- Heterogeneous Graph Attention Networks for Semi-supervised Short Text Classification[EMNLP 2019]
- Heterogeneous Information Network Embedding with Adversarial Disentangler[TKDE 2021]
OpenHGNN Team[GAMMA LAB], DGL Team and Peng Cheng Laboratory.
See more in CONTRIBUTING.