snap-stanford / neural-subgraph-learning-GNN

329 stars 64 forks source link

[Question] About multigraphs #19

Closed LafLaurine closed 3 years ago

LafLaurine commented 3 years ago

Hi! Congratulations and thank you for this great library!

I am currently working with it and I was wondering, does it works with multigraph? I tested it with some NetworkX Multigraph/MultiDiGraph but I don't know if the way that I am interpreting results is the good way or not and if the embedding is logical.

Thanks in advance!

qema commented 3 years ago

Thanks for your interest! Currently the library does not support multigraphs -- if multigraphs are fed as input, they will be treated as regular graphs (where an edge exists in the graph if at least one corresponding edge existed in the multigraph). In principle the method works with multigraphs as long as one uses a GNN that supports multigraphs; however, such GNNs do not seem to be commonplace and I am not sure if PyTorch Geometric (the underlying GNN library) supports them either. My recommendation would be to try to represent the data as a standard graph if possible.