Global Graph attributes

I know global graph attributes have been discussed previously, but I could not find an actual example where such is implemented. I’m new to dgllife and I’ve been playing aroung with the MPNN and AttentiveFP models to predict some molecular property. I am looking for a way to include also global graph properties to the model. I’d really appreciate an example that points me to the right direction.

Thanks a lot for making this great tool accessible!


There are two possibilities here:

  1. You can train a GNN without global graph properties. After obtaining graph-level representations, you can concatenate them with global graph properties and pass the results to an MLP for final prediction.
  2. You can use global graph properties to augment input node features and use them directly in message passing.

I don’t think there are examples for these two possibilities right now. Let me know if you have any difficulties in implementing them.