Training an inductive embedding algorithm
GraphSAGE is another type of algorithm. Instead of learning the embeddings themselves, which prevents making predictions on new nodes, it learns the function to compute the embeddings, which, once learned, can be applied to unknown nodes. It also has the ability to take into account node properties, making it an interesting algorithm to mix the graph structure and node characteristics into one single vector. In this section, we are going to give some more details about GraphSAGE internals, before using it with our data stored in Neo4j.
Understanding GraphSAGE
GraphSAGE relies on the principle of message propagation in a graph, from one node to its neighbors, and aggregates the received information to iteratively build node representations. It is also known to be scalable due to its neighbor-sampling technique.
Message propagation
Using again the graph represented in Figures 7.1 and 7.2, we are first going to create a one-hot encoding...