LinkNeighborLoader avoid/limiting sampling using the target edge #8710
Unanswered
GianlucaDeStefano
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Thanks for the issue. I am wondering why removing the target edge from sampling would yield a smaller subgraph? In the end, the subgraphs should be identical except for this one additional edge. Maybe I am misunderstanding. If you don't want to include the target edge during sampling, you can
We also added support for weighted sampling (higher weights means higher chance for an edge to get sampled), but the weights are generally assumed to be static across the whole graph. Would that fit your use-case? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone.
I'm currently working on a link-prediction model applied to a heterogeneous graph. The focus is on a specific edge type, which I'll refer to as 'target-edge'.
The uniqueness of this edge type lies in its structure: while the graph contains thousands of unique source nodes, the destination nodes are just a few, furthermore, they only have one or two links (not considering the 'target edge').
The issue arises when loading these edges via the LinkNeighborLoader. Due to the highly connected nature of the destination nodes, the resulting sampled graph becomes excessively large. I'm aware that reducing the 'num_neighbors' parameter could address this, but it would also compromise the neighborhood structure by predominantly including nodes connected through the 'target edge'. This approach omits critical information from other edge types that I want to include in the sampled graph.
In short, my questions are:
Is there a way to exclude the 'target edge' while sampling the subgraph?
Alternatively, can other edge types be prioritized over the 'target edge' during the sampling process?
Any insights or suggestions on this matter would be greatly appreciated.
(PS: I have also considered removing the 'target edge' from the subgraph after sampling, the problem with this approach is that it would generate a huge graph difficult to process and with a lot of (dis)connected nodes that should not be included. )
Thank you in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions