One of the other advantages of GNNs compared to the other node embedding algorithms we have seen in this chapter is their ability to take into account node features on top of the graph structure. Indeed, in the previous section, I have not given any details about the network input, h0. If you do not have node features, you would simply use the one-hot encoded node ID or something similar. However, if your nodes have features, xi, the input becomes as follows:
hi0 = xi
You can then propagate this feature vector along the graph, using the graph structure as a propagation path. This is the best way to generate a vector representation of nodes carrying the characteristics of the entities, such as the age of a person or the price of a product, and the relationships between these entities, encoded in the graph structure.
Even though GNNs appeared in the machine learning landscape quite recently, they already had plenty of applications. In the...