malllabiisc / CompGCN

ICLR 2020: Composition-Based Multi-Relational Graph Convolutional Networks
Apache License 2.0
597 stars 107 forks source link

CompGCN with TransE decoder does not converge #9

Closed migalkin closed 4 years ago

migalkin commented 4 years ago

Hello dear authors,

thanks for publishing the code! Trying out different decoders with the default parameters I observe that loss of ConvE and DistMult decoders gradually decreases (and accuracy increases), whereas for the TransE decoder default params do not work and loss/MRR fluctuate around the same point over and over (at least 50+ epochs from start). There are no TransE-specific hyperparams in the paper either, so after varying gcn_layers, gamma (10 to 100), and others, the model still does not converge. Could you please provide us with the hyperparams for the TransE decoder?

svjan5 commented 4 years ago

Hi @migalkin, Thanks for pointing this out. There are two ways to handle this particular issue. First, you can start with a lower value of gamma (like 9). This will take a significant amount of time to converge. Another way which gave us slightly better results quickly was that we took gamma as 40 initially and whenever the model saturated (or every fixed number of epochs, say 10), we reduce the gamma by 5, i.e., 40 -> 35 and continue till the performance stops improving. Ensure that gamma doesn't become negative (i.e. stop at gamma = 5 or so).

Let me know if you have any queries about this.

migalkin commented 4 years ago

Tried the first option with low gamma margins - no luck so far. After the very first batch the loss stabilizes at about 0.008 and MRR is stuck around 0.9% and doesn't change next hundreds of epochs.

svjan5 commented 4 years ago

Resolved the error. Just pull the code and run it with the given configuration.