Cross-entropy in minibatching
najwalb opened this issue · comments
I have a question about your use of cross-entropy over nodes/edges when mini-batching graphs. If I understood your implementation correctly, to compute the loss for one minibatch, you compute the cross-entropy of a single node and a single edge in your minibatch of graphs. These cross-entropies are averaged over the entire minibatch, then combined via the following formula:
To me
cool thanks for your reply. I am not sure I understand the intuition behind summing over all nodes and edges favoring bigger graphs. Is it because with my method bigger graphs will have a higher CE and would thus be penalized more?
I am actually proposing a sum over the nodes and edges for one graph, then taking the mean over the batch. So the loss per batch will be:
Ok, I see your point. Did you try it? Does it work better?