Is it necessary to have at least two GNN layers? Why One layer is not sufficient?

When I am using GraphConv(GCN), GraphSAGE or GATConv, I see that there are at least two GNN layers stacked one after another in each case. If I consider these methods itselves, they already should have mulltilayer perceptron inside their own architechture. So, if I think them as a black box, I give input as the given feature to this black box, and in output I get new feature with new dimension for each node. My question is what is the reason behind using same two layers one after each like two graphsage, or two gat, or two gcn? Isn’t one enough?

Each node takes messages from the nodes of its one-hop neighbourhood in each iteration to calculate its updated embedding.
So, the layers when unrolled for each node, from the output end, would indicate that the layers are effectively passing messages from multiple hops neighbourhoods based exactly on how many layers.

There could be cases where these distant layer neighbours may not help much, or they do help in aggregating needed information effectively. Think Heterophilous networks and homophilous. Most GNNs also won’t go beyond certain layers just because of complexity and over-squashing, if you think the total neighbours for each node explode the higher layers you consider

1 Like

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