pyg-team / pytorch_geometric

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

GNN-FiLM Layer Implementation #1659

Open reshinthadithyan opened 3 years ago

reshinthadithyan commented 3 years ago

🚀 Feature

Paper Link - https://arxiv.org/abs/1906.12192 Reference Code Link - https://github.com/microsoft/tf-gnn-samples/blob/master/gnns/gnn_film.py

Motivation

GNN-Film uses Feature wise Linear Modulation in Message Passing. It tries to propagate message through an edge not only based on the Source Feature, but also the Target Feature. This allows Message Passing to be more viable. Then Author also has shown a lot of comparison onto how this has paved way in lot of Information Graphs such as DataFlow in a Source Code and Biological Graphs.

Additional context

This would be a great addition to existing layers. Thanks.

rusty1s commented 3 years ago

Thanks, I will mark this as a feature.

ldv1 commented 3 years ago

If you look carefully, GNN-Film is close to CGConv: In GNN-Film, the first term inside the summation depends only on x_i whereas the second term inside the summation depends only on x_j and g is the identity. I will try to implement it and make the \sigma function a callable.

ldv1 commented 3 years ago

@reshinthadithyan look here for an implementation.