pytorch_geometric
pytorch_geometric copied to clipboard
GraphVAE for molecular generation
I am a novice for graph generation. I notice the vae in PyG only can generate Adjacency matrix. Could you help me implememt the graphvae for molelualr generation? How to generate the atom type and bond type? thank you very much! https://arxiv.org/pdf/1802.03480.pdf
The GraphVAE is somewhat difficult to implement since you can only utilize PyG for the Encoder
part. The Decoder
can be modeled by three different MLPs that map to [batch_size, num_nodes, num_nodes]
, [batch_size, num_nodes, num_nodes, num_bond_types]
, and [batch_size, num_nodes, num_atom_types]
outputs. In addition, you need to implement the graph matching algorithm from Section 3.4 to train the model.
thanks for your suggestions!
Hi guys,
I am trying to figure out how to construct a molecule graph with bond information, but I am confused about how the decoder is modeled by three different MLPs. Would you guys mind explaining it a bit more?
Many many thanks
As far as I know, the decoders of GraphVAE are just plain MLPs that map a low-dimensional vector z to (num_nodes, num_node_features), (num_nodes, num_nodes), and (num_nodes, num_nodes, num_edge_features), respectively.
Thank you so much. I will try it out.
As far as I know, the decoders of GraphVAE are just plain MLPs that map a low-dimensional vector z to (num_nodes, num_node_features), (num_nodes, num_nodes), and (num_nodes, num_nodes, num_edge_features), respectively.
I am trying to use PyG to generate new molecules, this is the paper i am trying to implement (https://arxiv.org/pdf/1908.08612.pdf) paper, can you help me how to get the nodes to build the graph.
Is there some open-source version of it available somewhere? Other-wise, it might be good to tell me which step you are currently implementing and what you have tried so far.
How can I map Z of shape (# nodes, 256) into (# nodes, # nodes, # edge features)?
You can do:
z_src = z.view(1, num_nodes, num_features).repeat(num_nodes, 1, 1)
z_dst = z.view(num_nodes, 1, num_features).repeat(1, num_nodes, 1)
MLP(torch.cat([z_src, z_dst], dim=-1))
Thanks for your reply, I came to know that molecular graph generation has three state-of-the-art models GraphVAE, GraphRNN, and Junction Tree Variational Autoencoders for Molecular graph generation. Which model should I use for molecular graph generation?
I am not an expert on graph generation, but I think that in the molecular graph setting, the junction tree representation is the most promising.