Quaternion Graph Neural Networks (ACML 2021) (Pytorch and Tensorflow)
This program provides the implementation of our QGNN as described in our paper, where we propose to learn embeddings for nodes and graphs within the Quaternion space.
QGNN | GNNs for knowledge graph completion |
---|---|
Regarding knowledge graph completion:
SimQGNN$ python main_SimQGNN.py --dataset codex-s --num_iterations 4000 --eval_after 2000 --batch_size 1024 --lr 0.01 --emb_dim 128 --hidden_dim 128 --encoder QGNN
SimQGNN$ python main_SimQGNN.py --dataset codex-m --num_iterations 4000 --eval_after 2000 --batch_size 1024 --lr 0.005 --emb_dim 128 --hidden_dim 128 --encoder QGNN
SimQGNN$ python main_SimQGNN.py --dataset codex-l --num_iterations 2000 --eval_after 1000 --batch_size 1024 --lr 0.0001 --emb_dim 128 --hidden_dim 128 --encoder QGNN
Regarding node classification:
QGNN$ python train_node_cls.py --dataset cora --learning_rate 0.05 --hidden_size 16 --epochs 100 --fold 2
QGNN$ python train_node_cls.py --dataset citeseer --learning_rate 0.05 --hidden_size 16 --epochs 100 --fold 4
QGNN$ python train_node_cls.py --dataset pubmed --learning_rate 0.01 --hidden_size 64 --epochs 200 --fold 6
Regarding graph classification:
QGNN$ python train_graph_Sup.py --dataset IMDBBINARY --batch_size 4 --hidden_size 128 --fold_idx 2 --num_epochs 100 --num_GNN_layers 2 --learning_rate 0.0005 --model_name IMDBBINARY_bs4_hs128_fold2_k2_1
QGNN$ python train_graph_Sup.py --dataset DD --batch_size 4 --hidden_size 256 --fold_idx 5 --num_epochs 100 --num_GNN_layers 3 --learning_rate 0.0005 --model_name DD_bs4_hs256_fold5_k3_1
Please cite the paper whenever QGNN is used to produce published results or incorporated into other software:
@inproceedings{Nguyen2021QGNN,
author={Dai Quoc Nguyen and Tu Dinh Nguyen and Dinh Phung},
title={Quaternion Graph Neural Networks},
booktitle={Asian Conference on Machine Learning},
year={2021}
}
As a free open-source implementation, QGNN is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. All other warranties including, but not limited to, merchantability and fitness for purpose, whether express, implied, or arising by operation of law, course of dealing, or trade usage are hereby disclaimed. I believe that the programs compute what I claim they compute, but I do not guarantee this. The programs may be poorly and inconsistently documented and may contain undocumented components, features or modifications. I make no guarantee that these programs will be suitable for any application.
QGNN is licensed under the MIT License.