Hey, I am working with a Heterogeneous graph, and I am using the dgl.EGATConv module since I have node and edge features that I need to use. I have currently a graph with 3 node types and 9 edge features, but the problem I am working on requires some nodes not to have any in-edges when creating and looking at the subgraph (used for the convolution using EGATConv) (see picture).
The thing is that it is important for this node to not be linked to any other since it gives information on the structure of the problem. The issue here is that when applying the forward pass, I get this error :
raise DGLError( dgl._ffi.base.DGLError: There are 0-in-degree nodes in the graph, output for those nodes will be invalid. This is harmful for some applications, causing silent performance regression. Adding a self-loop on the input graph by calling g = dgl.add_self_loop(g)
will resolve the issue.
Which seems to be caused by the lonely nodes described earlier. When I try to fix this by doing as the error says, it causes a new error: It is impossible to add self-loops since we are working with a heterograph! For example if nodes ‘A’ and ‘B’ are linked using ‘followed_by’ edges. There is first: no sense in adding a ‘B’ is ‘followed_by’ ‘B’ edge and moreover, this would cause other problems with the mathematical way to make the convolution.
The thing is that I don’t understand why this way of creating the graph should lead to an issue since the mathematical theory says that we make the convolution using the neighborhood of the node we are working with and this is just the case where the neighborhood N is of size 0 (lNl = 0).
My question is pretty simple: can I still use the graph as created and is there something I am doing wrong that makes the lNl = 0 case buggy or should I modify all the graphs and add an edge feature that says “this edge shouldn’t be there !” ?
Thanks a lot for the help you may give me and have a wonderful day