Clarification of requirement of bipartiteness for HeteroConv wrapper #10635
Unanswered
90degs2infty
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
First and foremost thanks for the tremendous work on this library! 🙏
I'm reaching out to you because I need some clarification of the docs on
HeteroConv"at the conceptual" level. Its documentation on theconvsparameter reads:Notice the requirement of the passed
MessagePassinglayers to be bipartite.Suppose I have an heterogeneous graph with multiple node and edge types where one of the edge types connects nodes of a single type (i.e.
edge_key[0] == edge_key[-1]). For example, extending the example from the docs onHeteroConv, suppose we introduced another edge type tracking citations at the author level:("author", "cites", "author"). Such an edge type may well include self-loops (e.g. an author self-citing previous work) or in general odd-length cycles (which to my understanding of wikipedia renders the graph non-bipartite).Does the
HeteroConvwrapper support such graphs or is the requirement of bipartiteMessagePassinglayers intended to prevent users from applyingHeteroConvto such graphs? More specifically, I wonder if explicitly encoding self-loops in the graph "by hand" is supported byHeteroConv- despite the graph not being bipartite in this case (again, to my understanding of wikipedia 😅 ).I guess part of my confusion stems from discussion #4637 and the check in
check_add_self_loopsintroduced in #4647 . I do get that self-loops are not well-defined for edges connecting different node types (linking a node of source type to itself while at the same time enforcing edges to point to a different destination type is simply not possible). In the discussion and in the implemented check, the term bipartite and the notion of "edges connecting nodes of different types" are used somewhat interchangeably.Sorry, if this question appears overly pedantic. I'm just trying to avoid potential bugs in my usage of
HeteroConv😇 Thanks for any clarification!Beta Was this translation helpful? Give feedback.
All reactions