In a knowledge graph, embedding vectors can be learned for nodes (node embedding) and edges (edge embeddings). Is there a method to learn one single embedding vector for the entire knowledge graph?
Asked
Active
Viewed 131 times
0
-
Do you mean the entire graph, or rather the entire relationship between two nodes through an edge? – Jaume Oliver Lafont Dec 19 '22 at 08:15
-
@JaumeOliverLafont The entire graph – skumaravel Dec 19 '22 at 12:24
-
Im not too familiar with knowledge graphs. But seeing as you talk about embedding vectors for nodes, are the knowledge graphs you talk about embedded using graph neural networks? Because in that case you could learn a graph classification/regression network for embedding the complete graph. – Robin van Hoorn Dec 19 '22 at 13:35
-
@RobinvanHoorn Yes the nodes are embedded using GNNs. How will learning a graph classification/regression network result in embedding for the entire graph? – skumaravel Dec 19 '22 at 20:32
-
Well in a GNN you can have node embeddings which are then stacked/aggregated together. On that combined vector you can add a multi-layer perceptron to learn a new embedding on top. I think graph2vec is worth looking into for you. – Robin van Hoorn Dec 20 '22 at 09:14
-
@RobinvanHoorn Thank you for your answer. I will think over this approach and try to implement it. – skumaravel Dec 26 '22 at 06:31
1 Answers
-1
The answer is Graph Readout operation can get a graph level representation out of the node/edge representations. Read the following: https://lifesci.dgl.ai/api/model.readout.html

skumaravel
- 1
- 1
-
1You might be on to something. However, it is helpful to add to your answer why you think this is a solution and to provide external links with additional explanations. Providing APIs is generally not the best approach for explaining new concepts. – Robin van Hoorn Dec 20 '22 at 09:19
-
@RobinvanHoorn I will go through the documentation fully and understand it and give an update to my answer with proper explanations. I am not sure who gave a -1 to my answer. What do you mean by 'you might be on to something'? – skumaravel Dec 26 '22 at 06:33
-
What i meant with 'you might be on to something' is that the API does look like something that can be used. I was thinking along the lines of graph regression/graph classification, and reading a few sentences in the link i feel like its somewhat similar. – Robin van Hoorn Dec 26 '22 at 10:09
-