vgsatorras / egnn

MIT License
420 stars 75 forks source link

Question about graph edges in QM9 experiment #6

Closed colormeblue1013 closed 2 years ago

colormeblue1013 commented 2 years ago

Dear author,

In the QM9 experiement, you mentioned you were "not provided with an adjacency matrix" and used "the extension of our model from Section 3.3 that infers a soft estimation of the edges. "

But as far as I know, it's not hard to get the molecular graphs with edges between atoms from the QM9 dataset. And I was wondering why you chose to infer the soft edges with molecular graphs given. Was there any benefits of this operation?

Many thanks, Lixin Yang

jscant commented 2 years ago

In my experience with any kind of graph or point cloud based NNs for chemistry using as large a connectivity as is computationally possible, with attention so that the importance of edges can be learned, outperforms using the molecular graph.

I have found that connecting all atoms within 10Angstroms of one another works well for what I'm doing, albeit with different objectives to the QM9 experiment.

vgsatorras commented 2 years ago

In the QM9 benchmark for property prediction the provided data is in the form of a point cloud (node coordinates and node features). Messages are then exchanged among pairs of nodes/atoms. Most previous works in the QM9 benchmark reported in our paper exchange messages among all pairs of nodes/atoms (including ourselves).

However, it is possible to limit the message exchange in different ways. A simple approach would be to just choose a distance threshold and propagate messages among nodes that are closer than a given distance. The case of a molecular graph mentioned by colormeblue1013 is a particular case where distance thresholds are defined given the relative distance, the atom types between two atoms and standard bond definition from chemistry Link here. But as jscant mentions, using different threshold values as 10Angstroms for him can work better.

In our case, instead of choosing to limit the message exchange based on a handcrafted value we leave it to the network by using attention/edge inference. This resulted in better results than the fully connected message passing case. In other words, our networks infers a scalar values in the range (0, 1) that multiplies/gates each sent message among two nodes.