Node embeddings in a multidirectedgraph (Heterograph with multiple node types and multiple edge types) #4183
-
Hello PyG team. I want to make sure once and for all not only for me but also someone who would look for clear understanding for hetero node embeddings. I am not entirely sure if my knowledge is right so I wanna ask here. Let's say I have one big multi-directed graph (Heterograph with multiple node types and multiple edge types) with
Then we also have 4 edge types as below:
Then for better embedding update, we add reverse edges as below:
Now say we do node classification to get node embeddings. Then here is my question:
Another question in the same setting but for link prediction task. I am still interested in node embedding here too. In this case I suppose that we dont have node labels like node classification up there. So we update by edges with negative sampling. In this case,
I guess I am very confused at this moment and maybe I am really not understanding correctly how the hetero node classification and link prediction work. I hope someone can clarify this so we are all clear in the details. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Beta Was this translation helpful? Give feedback.
x_src = x_dict["user"]; x_dst = x_dst["movie"]; x_src[edge_index[0]] * x_dst[edge_index[1]]
. If you also want to return embeddings, you should be able to s…