Do Link prediction on large heterogeneous graph (a kg)

hi all,
I have trouble in doing link prediction on kg, a large heterogeneous graph.
I have read the tutorial for dataset class 4.3 Process data — DGL 0.6.0 documentation
for example, FB15K237dataset is processed as a homogeneous graph finally, and the node type and edge type be seen as node/edge features.
actually, this operation confuse me deeply. I can’t grasp the reason that convert a heterogeneous into a homogeneous graph in dgl kgdataset class. and why not follow the way as 1.5 Heterogeneous Graphs — DGL 0.6.0 documentation .
i.e. why not doing link prediction directly on heterograph?
And fine, I accept the setting above, but what to do next ? This processed homograph is passed to a homo model or a hetero model (like rgcn)? and what about the features( ie the node type and edge type)?
when I refer to example in dgl/examples/pytorch/rgcn at master · dmlc/dgl · GitHub , its code is different from code in tutorials, and I was told as the example is out of date, and suggest me to refer to dgl/examples/pytorch/rgcn-hetero at master · dmlc/dgl · GitHub . However, no link prediction example in this folder…
And I find the example in new tutorial dgl/L2_large_link_prediction.py at master · dmlc/dgl · GitHub may be close what i am looking for…
But, I find in this code from ogb.nodeproppred import DglNodePropPredDataset dataset = DglNodePropPredDataset(‘ogbn-arxiv’) , why not use dgl built-in dataset class (for tutorial)?
what’s more, this dataset seems a homograph not a hetero one.
No offense, the tutorial and examples give me such a impression that you do A, B, C separately and you should do ‘DEF’ together, from an eye of a new-comer…
So, if anyone tells me how to do link prediction on a large kg (heterograph) with built-in dataset class (as I would like to apply models on our own data).
thanks in advance.

Or the dgl its self can recognize kgdataset internally? and the kg graph( processed to a homograph) and freely be passed to hetero model?
the code https://github.com/dmlc/dgl/tree/master/examples/pytorch/rgcn/link_predict.py reconvert kgdataset data by build_test_graph and generate_sampled_graph_and_labels

Follow-up discussion takes place in https://deep-graph-library.slack.com/archives/CDN0R0RGF/p1614056112032500

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.