Graph modeling for node similarity search query

Hello, can someone kindly suggest me books/paper/benchmark report which mentions regarding:

Problem: suppose we have dataset S={r1, r2, r3,r4,r5} and we want to find node similarity such as {cos(r1,r2), cos(r1, r3), cos(r1, r4), Cos(r2, r3), Cos(r2,r4), cos(r3,r4)} where, each records consists of d attributes and cos stands for cosine similarity.

  1. Is graph modeling efficient as opposed to row/column modeling for such kind of node similarity query?

  2. how efficient is Neo4j’s index free adjacency as opposed to join operation+indexing in relational database for such kind of node similarity computation?

I think you might want this reference:

Cosine similarity as you describe it is one of the algorithms built into the GDS library which you can use with Neo4j.

Index free adjacency with graphs is very efficient for this kind of thing as opposed to in the relational model, you will need to recompute the joins over and over again in order to run an equivalent algorithm within relational data.