Graph node classification: Stacked GCN layers seems not to learn anything (highly imbalanced data). #9614
nasrinsaalehi
started this conversation in
General
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.
-
I have a graph with nearly 100 nodes. I duplicated this graph 200 times. Then, I add a new feature to each node feature using concatenation each time I duplicate each graph. So, I have 100*200 nodes with different labels. If the batch size of my model is set to 3, I process 2 of these graphs in my data loader. Also, I have highly imbalanced data with nearly 0.1 data being positive. To solve this issue, I use PolyLoss, a more general version of FocalLoss:
Since I need to do binary node classification on these graphs, my accuracy, AUC, precision, recall, and f-score are not improved after epoch 200 and are as follows:
To ensure my model is learning or not, I try to use tse-analysis with 2 dimensions. I get the last two layers of my model and visualize the layer before the last layer. After visualizing, I can see that the model is unable to detect the pattern for positive and negative samples and most of the negative samples are wrongly detected as a positive sample because of the Poly loss effect.
I have tried changing other hyper-parameters like changing batch size, trying other losses including Focal_loss and weighted cross-entropy loss, changing learning rates and even scheduling rating rates, adding various normalization techniques, using dropouts, different numbers of GCN layers, etc.
It is worth telling you that I have a graph this float values as relations between each two nodes and I use a threshold of 0.6 to convert this graph to a binary relation graph (as a network graph):
After making the networkx graph, I connected node features to a new feature Tensor. Then, I convert each graph to a Data object containing node features, labels, and edge index. After that, I pass batches of these graphs to my model:
My question is if there exists any issue with my codes and how can I force my model to learn this data.
Beta Was this translation helpful? Give feedback.
All reactions