Why GATConv gives two weights of each edge in both direction?

I extracted attention weights for each edge from a GATConv Layer. Here, I got two weights for each edge say for (2,3) and (3,2). These weights are not the same. Why these two weights are not the same? While taking ‘2’ as the target node, the weight of edge (2,3), and ‘3’ as the target node, the weight of edge (3,2) should not be the same in an undirected graph? If I need to take only one weight for each edge, is it reasonable to take the average of two weights?

Typically we consider (2, 3) as an edge from node 2 to node 3 and (3, 2) as an edge from node 3 to node 2. The weight of edge (2, 3) for the target node 3 is related to the weight of all edges pointing to node 3. Similarly, the weight of edge (3, 2) for the target node 2 is related to the weight of all edges pointing to node 2. Since node 2 and node 3 have different neighbors, it’s not surprising that the weights of edge (2, 3) and (3, 2) are different.

If I need to take only one weight for each edge, is it reasonable to take the average of two weights?

Whether it is reasonable depends on how you are going to use or interpret the averaged weights.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.