Starting from its version 1.3, the GDS contains implementations for some embedding algorithms. One of these is the GraphSAGE algorithm, which is part of the GNN family. Invented in 2017 by a group of researchers from the University of Stanford, it is one of the mostly widely used GNN architectures today.
One specificity of GNNs is that they can take node properties into account to get their representation. In the GDS, this behavior is parameterized using the nodePropertyNames property. If you prefer not to use properties, you will have to explicitly tell the algorithm to initialize itself with the node degrees with the degreeAsProperty property. So, here are two examples to run GraphSAGE from the GDS:
- Without using node properties is done as follows:
CALL gds.alpha.graphSage.stream("proj_graph", {degreeAsProperty: true})
- Using node properties is done as follows:
CALL gds.alpha.graphSage.stream("proj_graph", {nodePropertyNames...