Workaround for link-based data loader on heterogeneous graph #7932
Replies: 5 comments 1 reply
-
This is sadly not yet possible, sorry. The only workaround would be to map your |
Beta Was this translation helpful? Give feedback.
-
Hi Matthias, thank you for letting me know. Unfortunately, I think I also noticed that, by default,
This yields the following, which lacks the
I guess I would have to reconstruct them manually? I had also thought about constructing a separate Do you have an estimated timeline for when this feature might be fully supported by PyTorch Geometric? Thanks again for your help and advice. |
Beta Was this translation helpful? Give feedback.
-
In PyG master, these attributes should now be included by default and padded in case the feature size is not the same. Constructing separate I don't have an estimated timeline, sadly. |
Beta Was this translation helpful? Give feedback.
-
Thanks for letting me know, Matthias. Let me know if I can help with or support any changes to |
Beta Was this translation helpful? Give feedback.
-
Hi, Are there any official examples for this feature if it is available in recent versions? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi PyG team,
Thank you very much to @rusty1s and team for your work in developing an incredible PyG resource and community.
I'm attempting to design an unsupervised link prediction training task. My data, a heterogeneous graph with multiple node and edge types, is stored as a
HeteroData
object. Following theNeighborLoader
examples in the documentation here and this tutorial, I attempted to use aLinkNeighborLoader
data loader for this task.However, I realized that only single node/edge types can be used as seed nodes in
LinkNeighborLoader
and related data loaders (see discussions at #7551 and #5269, and the open PR at #5521).Do you have any suggestions for a workaround data loader that can operate on a heterogeneous graph for link prediction?
In particular, I am attempting to use a Heterogeneous Graph Transformer supported by the
HGTConv
class (as documented here and with thehgt_dblp.py
demo here). I had explored usingHGTLoader
, but don't see negative sampling supported, which I would need for link prediction. I would appreciate any recommendations and/or pointers to resources where I can learn more.Thanks for your guidance!
P.S., for context, I am currently constructing the
HeteroData
object and splitting my graph into train/validation/test using the approach outlined in this Gist:https://gist.github.com/ayushnoori/1c2430f6e489f05631c4f304a614fbc2
Please let me know if my approach is incorrect. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions