Purpose of having different edge type for reverse edges #9894
Replies: 1 comment
-
Hi, I am not an expert but I will try to help. 1. the src and dst nodes have different typesAn edge_type is defined by a tuple: node_type of the source_node, _edge_type, node_type of the destination_node. 2. the src and dst nodes have the same typesFor example you have a social network with users and followers. let's say on Instagram for example that you have a edge_type Let's take the example of 'social media influencers', by definition they have millions of followers, but that doesn't mean that they follow them back. There is a direction in the edge, meaning that message passing framework goes from src_node to dst_node. Adding the reverse edges to the same edge_type would change the weights learnt during training. conclusionI don't know what your problem is, maybe it is relevant to use your approach. Maybe try both of them and see what are the changes. Hope that I was clear and that it helps. best, |
Beta Was this translation helpful? Give feedback.
-
Hi,
What is the purpose of having a separate edge type with
_rev_
like('author', 'rev_writes', 'paper')
, which is generated automatically when transforming a heterogeneous graph usingT.ToUndirected()(data)
, compared to combining reversed edges with edges using something likedata.edge_index_dict = {key: to_undirected(edge_index) for key, edge_index in data.edge_index_dict.items()}
?Beta Was this translation helpful? Give feedback.
All reactions