Creating an embedding for a specific node only

My question is quite straightforward. I'm looking for a way to generate the embedding for just a single node from the graph projection, rather than for all nodes as is usually the default.

Is this feature already available in any GDS algorithm?

Thanks.

1 Like

Hi,

GDS does not have a generic way to run algorithms on just a single source node, unless it is explicitly mentioned in the configuration documentation.

If you only need this for a single, or a few nodes, you can project each node with a different label and use a label filter for the embedding algorithm (check the docs for a nodeLabels key).

Cheers

Hi Paul, Thanks for your response.

Actually, Iโ€™m already doing something similar. The process Iโ€™m using works as follows: I project a subgraph based on the target node, perform graph embedding on this subgraph, and retain only the embedding of the target node.

Although this approach allows for more efficient embedding creation, itโ€™s not deterministic when using models that rely on random walks (e.g., Node2Vec). In such cases, a full graph projection is necessary to ensure fairness in the process.

Iโ€™ll keep reading the documentation, but this seems like a great feature to develop: allowing node selection within a projection to generate specific embeddings.

Cheers

Hi,

I've forwarded the feature request to our inbox, but I can't make any promises about whether it's gonna be implemented or what the time frame is, those answers are out of my hand.

Cheers