JiaxuanYou / graph-generation

GraphRNN: Generating Realistic Graphs with Deep Auto-regressive Models
MIT License
683 stars 140 forks source link

The implemented baseline issues #13

Open kiarashza opened 3 years ago

kiarashza commented 3 years ago

Many thanks for releasing the code. I have some questions regarding the GraphVAE.

Many thanks for your help and answer.

shayestehfard commented 3 years ago

Hi Kiarash, @kiarashza ,any updates on this issue? I'm dealing with similar problem!

Many thanks for releasing the code. I have some questions regarding the GraphVAE.

  • It seems that the encoder is not using the graph neural network, the GCN layers are commented at lines 113-118 of baselines/graphvae/model.py. Am I right?
  • The binary assignment matrix has not been used after matching graphs, since self.permute_adj is also commented. if that's the case, the model is a simple Variational Graph Auto-Encoders implemented by kipf.
  • I uncommented these parts and still did not get the reported result in the GrapgRNN paper. I am not sure what could be the problem. I was wondering if this implementation of the GrapgVAE model used in the paper.

Many thanks for your help and answer.

kiarashza commented 3 years ago

Hi @shayestehfard. No, Nothing.

rwchakra commented 2 years ago

Hi @kiarashza and @shayestehfard ,

I am also trying to run the code on enzymes without any changes, but unfortunately the max pool matching code seems to throw nan values on the first epoch itself. This in turn, as expected, prevents the Hungarian algorithm to work, throwing a ValueError("invalid numeric entries in matrix").

I have tried changing the number of iterations, and the max_num_nodes for the graphs, but the issue persists. Did you face this? Any ideas how to fix? Thanks

pb0316 commented 1 year ago

Hi @kiarashza and @shayestehfard ,

I am also trying to run the code on enzymes without any changes, but unfortunately the max pool matching code seems to throw nan values on the first epoch itself. This in turn, as expected, prevents the Hungarian algorithm to work, throwing a ValueError("invalid numeric entries in matrix").

I have tried changing the number of iterations, and the max_num_nodes for the graphs, but the issue persists. Did you face this? Any ideas how to fix? Thanks

Hi @rwchakra ,

I am facing the same issue. Have you fixed it? Do you have any ideas if so? Thank you so much!

pb0316 commented 1 year ago

Hi all, I solved this issue by changing the adj_recon_loss function in graphvae/model.py to:

def adj_recon_loss(self, adj_truth, adj_pred):
        return F.binary_cross_entropy_with_logits(adj_truth, adj_pred)

Thanks.

cxw-droid commented 1 year ago

It seems the adj_recon_loss() in the code is not correct. The order of the adj_truth and adj_pred should be switched (otherwise pytorch throw errors), and leave F.binary_cross_entropy untouched. After switching the training loss looks normal.