Graph embedding for smiliarity measurements of hierarchical graphs

Hello beautitful Neo4j community.

I want to adress you as I am trying to solve an issue for my thesis and I am struggling with the implementation.

Lets say I have two graphs, which represent the structure of two variations of the same product that I want to compare for similarity. As these variations are inside of a huge manufacturing traceability database which contains thousends of these product variations structures, process structures and order structures, I firstly split the content in a projected graph with only the product related components so I can easily traverse it to get a product structure like shown bellow:

first for the assemblyID 'W0128'

then for the assemblyID 'W0120'

Now my intention is to embbed these two product structures into two different vectors where I can then run the similarity algorithms and compare these two. For me to embbed a product structure (like represented above) I need to create a projected graph for each as the library requests so.

My question would be:

  1. how can i create a subgraph in neo4j after having traversed another subgraph within a query?

I appreciate a lot your support as I am not coming foward.

Thankyou so much and I wish you a nice day :slight_smile:

Erik Thomas