# Graph Neural Network - Node and Global properties

I am trying to work with Graph neural networks. I am trying to use the 3d coordinates and some othe things related to those positions as features. However the whole system also has some global properties like the spread in x,y or z dimension and few others which by already know knowledge must have some dependence on target output variable. However. I don't know how to work together with node and global properties together for graph neural networks. Can anyone help.

In graph neural nets, typically there is a global pooling layer, sometimes referred as graph gather layer, at the end, which gathers all the information from all your nodes and outputs one feature vector for the graph. After doing this, you may add your global features as additional input to the next layer.

Edit: Since the area is relatively new, most of the content is in research publications. I've taken the following figure from this paper. The first few layers can change with respect to what you do with your graph (i.e. spatial approaches, spectral approaches etc.), but in the end (level 3 in the below figure), there is typically a global pooling layer that produces a fixed set of features from all the remaining vertices in the graph. There are various approaches regarding this, the simplest is just summing all the corresponding features in all the vertices in order to get an $$f\times 1$$ vector in the end, where $$f$$ is the number of features at each vertex.

What you can do is adding your global graph features at this stage, and feed them together with $$f$$ features produced in the graph convolutional layers to the next layers (e.g. dense).

• I am newbie to the subject. Can you direct me to an example. 😋
– PKL
Jul 19 '20 at 9:32
• @ParasKoundal I've tried to explain the concept more clearly with an example. It's hard to find easy examples of GNNs since they're relatively new. Jul 19 '20 at 11:01
• Thanks for the brilliant description and the link. Do you have any recommendation for how should I explore the field of GNN further.
– PKL
Jul 23 '20 at 19:19
• I mean do you recommend any specific course or website I should explore?
– PKL
Jul 23 '20 at 19:20
• I'd definitely suggest for you to start from a survey like this: arxiv.org/abs/1812.08434 There are many types of GNNs, you can deep dive into the area you want, i.e. spectral, spatial, VAE etc. Jul 23 '20 at 19:21