yule-BUAA / R-HGNN

codes of R-HGNN model for Heterogeneous Graph Representation Learning
46 stars 5 forks source link

Link prediction #1

Closed sahilprasad closed 3 years ago

sahilprasad commented 3 years ago

Hi! Really enjoyed your paper and the R-HGNN architecture.

Do you have any tips for implementing a link prediction example with this architecture? The paper references a Link Prediction benchmark, but this source code only seems to do node classification.

Thanks in advance!

yule-BUAA commented 3 years ago

Hi!

Thanks for your interest in our work.

I have released the code for link prediction task in the project. In the link prediction task, we need to use the EdgeDataLoader to sample edges instead of nodes. A good example on homogeneous graphs is shown at here.

Kindly note that when performing the link prediction task, we add LayerNorm layer in R-HGNN model to normalize the node features. Following the configuration in R_HGNN_ogbn_mag_link_prediction.py, you would get the model performance in link prediction task.

If you have any other questions, welcome to contact me.

Best wishes.

sahilprasad commented 3 years ago

Awesome, thanks! Just took a look and it works exactly as expected.

Out of curiosity, in your experiments while writing this paper, did you attempt to incorporate temporal encodings in some fashion? For example, the RTE module from the Heterogenous Graph Transformers paper by Hu ?

yule-BUAA commented 3 years ago

I think considering temporal information in heterogeneous graph learning (more concretely, dynamic/temporal heterogeneous graph learning) would be an interesting direction.

In this paper, the temporal encodings are not considered in the experiments. But just like the mentioned HGT (Heterogeneous Graph Transformers), we could simply adapt R-HGNN to deal with the temporal information.

Specifically, we can feed the temporal information into R-HGNN and then encode the temporal information into a vector using some time encoding techniques. Then, like HGT, we can combine the temporal encodings with the source node feature in the RelationGraphConv component above this line.

The above adaption is very simple, and I think there could be more appropriate ways to describe the temporal information, such as the semantic meanings (e.g., year, month, or week of the time).

sahilprasad commented 3 years ago

Got it, will try out some temporal encoding approaches and see if I can get them to work. Thanks for the tip!