How train - test split works for Graph Neural Networks
I have recently started studying GNN's. I have covered GCN and GraphSage so far. But I am confused regarding the process when testing occurs.
Now suppose in the graph above I am using the nodes as train and test set as shown in the figure. Suppose I am using the GraphSage model for a supervised node-classification task , now during training I am providing the sub-graph with blue nodes and the weights(parameters) gets calculated using the neighbourhood information of the nodes within this sub-graph(blue).
But during testing I want to find the labels of the green nodes. So during this time the forward propagation of GraphSage will be performed using the weights calculated during training and using the neighbourhood information of the test nodes.
My Doubt : So the part where I am confused is that during testing does the algorithm consider as neighbourhood only the green nodes(test set) or it also considers the blue node's (Since it is connected as can be seen in the figure) information during the forward propagation step to compute the node embedding?
Below is the attached forward propagation algorithm of Graphsage as mentioned in the paper.
It might be a silly question, but since I am new to this I am having difficulty in understanding the neighbourhood definition during train and test times. Do correct me if I have wrongly stated any point.
Topic graph-neural-network training inference
Category Data Science