Open demmerichs opened 4 years ago
Hi and thanks for this issue. You are right that this is currently not supported in PyG, and this is mainly due to two reasons:
I agree though that this is a generalization to the above message passing interface and might have potential use-cases. Furthermore, I actually already have plans to implement it (but it‘s not top prio). However, personally, I feel that approaches like our SplineCNN model are a better generalization to CNNs (since it‘s more robust to varying neighbors and does not require a specific ordering of neighbors).
Hi,
thanks for the fast comment.
k
at every node and therefore would avoid the problem. So in a way, I was not even generalizing as much as you were now already :) I think with the restriction of constant node degree it could be efficient and does not require padding?I can totally understand, if it is not your priority, I am actually happy to just get a comment :+1: Maybe then just one follow up question, cause I am a bit overwhelmed by all the implementations and just started looking into GNNs, PyTorch and PyG.
... approaches like our SplineCNN model are a better generalization to CNNs ...
If you have multiple models in mind, could you make a short semi-complete list of those? That would be really appreciated and might help future readers of this issue too.
Thanks again :)
XConv
operator). For other graphs (where you may have multiple node degrees), parallelization across those degrees is kinda impossible in PyTorch without padding (at least I do not know how).EdgeConv
, GMMConv
, NNConv
, PointConv
or SplineConv
operators.
🚀 Feature
First of all, thanks for this amazing project. I am thinking about implementing pairwise and patchwise self-attention presented in this paper for general graph structures. Now, the pairwise part is easy, as it is covered by your provided message passing interface, however I am not sure, if there is an easy workaround or even a "patchwise" message passing interface in PyG. If not, this might be an interesting addition.
How would a patchwise interface differ from the current one:
The brackets
[...]
denote concatenation (possibly along a new dimension) over the indexes. For this to make sense, one needs to introduce an ordering to the outgoing (or ingoing) edges, so that actually represents a sorted and consistent traversal of the neighbors. This proposed patchwise message passing interface is a strict generalization of the pairwise one (just unpack the concatenated feature vectors and define as the inner part of the pairwise interface. This generalization, however, might be the reason why it does not exist in the framework, as it might not allow optimizations to take place like in the pairwise interface?! I am not clear on this point, so I would appreciate any discussion (e.g. not computational feasible, not easily implemented in the current project, workaround using PyG, etc.).Thanks for your help.
Motivation
Like the mentioned paper explains, a patchwise operator is a strict generalization of the standard convolution operator, and for images it outperforms the pairwise operator (see paper) (I realize that the ordering of neighbors in image pixels is more natural than in other graphs, but I think it's worth trying it out).
Additional context
Link again to the paper.