pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.1k stars 3.63k forks source link

Degree/structure aware GNNs #1594

Open THinnerichs opened 4 years ago

THinnerichs commented 4 years ago

🚀 Feature

Motivation

Hey there, I couldn't find a directly related issue, so I will open a new one.

I am currently performing a node classification task on biomedical graphs, where node degrees and local structures (motifs) do play a significant role. However, the PyG implementations just perform some form of information diffusion along the graph, which obviously works great for a lot of occasions, with the property of unstructured locality. All nodes are handled somewhat similarly, and hence "hubs" as in social graphs/protein-protein graphs are difficult to classify.

For this case however, I couldn't find a suitable implementation/layer in PyG as all of them just somehow aggregate, e.g., mean/max/..., over the incoming values, instead of being aware of the number of incoming signals. From my point of view, the paper noted above does a great job solving this issue. I think it'd make a great addition to the package.

I am currently bypassing this issue, by embedding the degrees into the node features, but this doesn't scale too well for larger ones.

More general, one could think of a structure aware layer implementation. I will hand in the citation when I find it again. It helps to find cliques/motifs along social/biomedical networks/graphs, which a normal GCN or any of its PyG alterations aren't capable of. We can hope for e.g. PPNP to get stuck there, but I wouldn't call that structure awareness. ;)

Sorry for the fuzziness. Please feel reach out to me, when necessary.

rusty1s commented 4 years ago

Thanks for the pointers! This is definitely interesting and a good candidate for the PyG 1.7.0 release :)

THinnerichs commented 4 years ago

I updated my introductory comment for the structure aware GNN link. Sorry for the missing label.

As your last 1.6.1 release was quite recent, can you tell when this will be the case? I can try to build an implementation, as I may need it a little earlier than that. :P I am especially interested in the first case. I'd be glad to participate.

rusty1s commented 4 years ago

I plan the next release around November. However, feel free to try on a first initial implementation and we can refine it together :)

THinnerichs commented 3 years ago

Hey Matthias, Sorry for the late reply, I hope you are doing good. I have been quite busy in the last few weeks. Here is the repo of the project but only in TF. I am in contact with one of the authors, if you want to connect.