cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Using Graph embeddings for other than training an ML model

System:
Neo4J 4.2.7 (Enterprise)
GDS 1.6.0

Can graph embeddings, when written to the graph nodes as a property, be used in algorithms other than for training a machine learning model? For example, can embeddings be used in Centrality, Community Detection and Similarity algorithms? What are the restrictions if any?

BTW: Thanks to Alicia and her team for mending the seam that existed previously from having to export graph data out of Neo4J into Python in order to perform machine learning. Looking forward to using your next GDS versions!

2 REPLIES 2

Graph embeddings (either having been written back to your database, or just mutating your in-memory graph) can be used to run K-Nearest Neighbors to build a similarity graph. Once you've done that, you can run any of the traditional graph algorithms (community detection, centrality, etc) on your new SIMILAR_TO relationship.

Graph embeddings return list properties - a bunch of numbers that describe each node relative to the rest of the graph - and those properties can be used in any algorithms that accept them (current, similarity, other embeddings, and ML). But if you use them to construct new relationships, you can run traditional algorithms over your similarity graph.

We're thrilled your enjoying the library!

Thank you Alicia.
I was just going to ask you about using cosine similarity in n-dimensional space (i.e., an embedding), but i see the KNN algorithm does that:

When the property is a list of floating-point numbers, the similarity is 
computed using the cosine similarity metric. 
See the Cosine Similarity algorithm for more details.

Very nice.