Replies: 1 comment
-
Wow, what a detailed question :) I am not totally sure I can help you but if you are dealing with the problem that all your model is learning is the mean of the targets, you should try out some weighted loss formulation, i.e., weight node targets higher that are far away from the mean. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hello everyone,
i am currently facing a problem where my model is learning nothing besides the mean of my target values.
Im training this model for a regression problem where i will have a lot of graphs as samples in my dataset. These graphs will always have the same topology, as they are always modeling the same graph-like object, just at a different point in time. Given that circumstance, edge features and some node features will only differ across the different nodes/edges inside a graph, but not across the many graphs themselves (i am unsure if it even makes sense to keep those features then).
Further example on this im not sure how to express it without it being confusing
Some features, such as feature c will never differ across all the graphs but only across nodes. Features such as d may differ without such constraints.
I am trying to predict two values (magnitude and phase) for every node in every graph/timestep of a target validation set.
From the following loss and accuracy plots it does seem like my model is learning. (A prediction is considered accurate when both magnitude and phase are within a given margin of error from the target value.
The plots
It even seems to predict the phase quite well, however i think thats just because theres not a lot of variance in the targets to begin with.
Phase violin plot
When it comes to voltage magnitudes there is very little to no variance at all in the predictions. That can also be seen in the following boxplot where the predictions should be shown as a yellow bar to the right of every green bar. However, due to the lack of variance there are no yellow bars (or whiskers) to be seen.
Magnitude violin plot and boxplot
When plotting my predictions and targets for one particular node of every graph you can see my model doesnt seem to learn the underlying relations. The predictions are plotted in green, the targets are plotted in orange.
Preds and targets
It seems that the ~80% accuracy achieved by my model are owed to around 80% of the targets being with the currently specified margins of error from the predicted values.
All of the above plots originate from the following training run:
The training run
According to this stackexchange post it seems like my model is not complex enough and gives up on learning any variance, instead just settling for always predicting the mean as the best way to minimize the output of the loss function. However I am unsure how to increase the complexity of a GNN.
My model
As I have little to no experience with graph neural networks i thought i might just ask for some help here.
Thank you very much in advance,
Erik :)
Beta Was this translation helpful? Give feedback.
All reactions