Skip to content

Latest commit

 

History

History

MHNF

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

MHNF

Paper: MHNF: Multi-hop Heterogeneous Neighborhood information Fusion graph representation learning

The author did not provide codes. So, we complete it according to the implementation of GTN.

How to run

Clone the Openhgnn-DGL

python main.py -m MHNF -t node_classification -d acm4GTN -g 0 --use_best_config

If you do not have gpu, set -gpu -1.

Candidate dataset:

​ acm4GTN/imdb4GTN

Performance

Node classification

Node classification acm4GTN imdb4GTN
paper 93.15 59.52
OpenHGNN 92.64 62.52

TrainerFlow: node_classification

The model is trained in semi-supervisied node classification.

model

  • transform_relation_graph_list

    • Extract a graph list where every graph just contains a relation.
  • HSAF

    • Contain HLHIA
    • Aggregate representation which is product in HLHIA by two-level attention mechanism.
  • HLHIA

    • Contain HMAELayer
    • Contain the representation of every hop HMAELayer which is generated by gcn.
  • HMAELayer

    • Contain GTConv
    • Contain the product of the adjacency matrices of two graphs getting from GTConv.
  • GTConv

    • Create a weighted graph whose adjacency matrix is the sum of the adjacency matrices of the given graph list.

Dataset

Supported dataset: acm4GTN, imdb4GTN

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 automatically.

Hyper-parameter specific to the model

num_channels = 2 # number of channel
num_layers = 3 # number of layer
adaptive_lr_flag = True # use different learning rate for weight in HMAELayer.
identity = False # don't need identity because of layers aggregation

Best config can be found in best_config

Relation to GTN

MHNF model is similar to GTN.

  • The method HMAEConv to product hybrid relationship matrix is same to GTConv .

  • MHNF use layer attention to aggregate different hop layer representation thus don't need to add identity to relation matrix set like GTN.

  • MHNF use channel attention to replace channel aggregation operation in GTN and channel attention can be known as one of channel aggregation operation.

Related API in DGL

dgl.adj_product_graph which is equivalent SpSpMM.

dgl.adj_sum_graph

GraphConv, EdgeWeightNorm

More

Contirbutor

Fengqi Liang[GAMMA LAB]

If you have any questions,

Submit an issue or email to [email protected].