-
I have a large graph (12M nodes, 66M edges) and my task is to do link prediction with GNN. I successfully trained the model with GraphSAINT, however, the learned embedding is too big to be stored in memory. Is there any partition/clustering algorithm that preserve all the edges so that I can use it during testing? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Sadly no, and this is one of the disadvantages of subgraph-sampling since you typically want to do inference on the full graph. There is a clever workaround though, which allows you to create node-embeddings on CPU in a layer-wise fashion, i.e., it will create all node embeddings for the first layer, and then uses those to create node embeddings for the second layer, and so on. Here is an example on how to do so. |
Beta Was this translation helpful? Give feedback.
Sadly no, and this is one of the disadvantages of subgraph-sampling since you typically want to do inference on the full graph. There is a clever workaround though, which allows you to create node-embeddings on CPU in a layer-wise fashion, i.e., it will create all node embeddings for the first layer, and then uses those to create node embeddings for the second layer, and so on. Here is an example on how to do so.