Can we use GraphSAGE with an initial embedding of each node?

Hi, I am trying to use GraphSAGE to train the embeddings of nodes. The nodes I included in my graph are household objects, which means that they already have some meanings and can be embedded as vectors using word2vec, or miniLM or other NLP methods. However, I build different relationships between the nodes, therefore, I want to train the embedding of them using GraphSAGE with taking the word2vec embedding as initial embedding, so the embeddings are likely to contain both information from a language perspective and a graph relation perspective.

So I searched the GraphSAGE doc here, GraphSAGE - Neo4j Graph Data Science, but I cannot seem to find out whether the GraphSAGE could train the embeddings with an initial embedding.

I am curious if GraphSAGE can suffice my expectations, or should I try other embedding aggregation methods instead?

Much thanks!

Hi @zpanar,

It does support taking pre-trained initial embeddings via the parameter featureProperties. You need to first project you graph with your initial embeddings as a property on the nodes, and the pass that to graphSAGE. The detail is in GraphSAGE - Neo4j Graph Data Science (Table 2 Configurations)

An alternative is to train graphSAGE purely on the graph topology, and afterwards concatenate with your (NLP) embeddings yourself, and send the concatenated embeddings to your downstream models/tasks. This could work well too.

Thanks,
Brian