3 Star 4 Fork 1

Gitee 极速下载 / hmgnn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/iqiyi/HMGNN
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

HMGNN

TensorFlow implementation of Heterogeneous Multiple Mini-Graphs Neural Network

  • usage
    the task of (semi-supervised) classification of nodes in a graph
  • introduction
    We first introduce a kNN-based mechanism to combine diverse yet similar graphs and then the attention mechanism is presented to learn the importance of heterogeneous information. To enhance the representation of sparse and high-dimensional features, a residual style connection that embeds vanilla features into a hidden state is built.

overview

The overall architecture of our proposal is displayed here.
The left part illustrates kNN-based hyper-graphs generation given normal node features and their connected relation.
We concatenate the feature matrix of the generated hyper-nodes from different sub-graphs to the input feature matrix to form the final feature representation that is fed into neural networks.
The prediction is made based on the learned hidden state learned from the middle procedure.
Different colors of nodes and edges indicate different types of nodes and relationships. pic

requirements

tensorflow (>=1.12)
pandas
numpy

quick-start

python HMGNN.py

Data

The data used in quick-start is the Cora dataset.
The Cora dataset consists of 2708 scientific publications classified into one of seven classes.
The Cora dataset has saved as .npy in dir ./data

  • labels.npy: shape=(2708, 7)
    each publication is classified into one of seven classes.
  • features.npy: shape=(2708, 1433)
    each publication is described by a 0/1-valued word vector. The dictionary consists of 1433 words.
  • edges_mat.npy: shape=(2, 10556)
    The graph consists of 10556 links, and each element in edges_mat.npy represents node_id.

parameters explain

The parameters are defined in hparam.py. Main parameters conclude:

  • feature dimensions: feature_dim=1433
  • epochs=10
  • learning_rate=0.0005
  • whether or not using attention: attention=True
  • whether or not using vanilla features: residual=True

performance

We compare our proposal, HMGNN, with GCN, one of the classic graph convolutional network based approach.
The training dataset is used to learn the model while the model selection is based on the performance on the validation dataset.
The accuracy measure is considered. Our proposed method achieves the better performance.

HMGNN GCN
train_acc 0.908 0.860
val_acc 0.867 0.854

The table above is showed the accuracy of HMGNN and GCN. The pictures show the detailed loss and accuracy curve on training and validation dataset.

pic

The MIT License Copyright (c) 2020 iqiyi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

“异构小图神经网络”算法(Heterogeneous Mini-Graph Neural Network,简称 HMGNN) 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/mirrors/hmgnn.git
git@gitee.com:mirrors/hmgnn.git
mirrors
hmgnn
hmgnn
master

搜索帮助