Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-22-2018 10:40 AM
I run community detection algorithms(unionFind, Louvain) to partition my graph database.
However, I recently encountered some performance problem because of super nodes.
I have the linking structure like below.
(:User)-[:DEVICE]->(:Device)
and other similar structures.
Basically, we want to use the property node(like device node) the users shared to link them.
Majority(99%) of the property nodes are only linked to ONE user.
However, some extreme ones link to 10K+ users which form super nodes.
Any suggested way to solve the super node performance issue?
10-22-2018 03:30 PM
Can you share your concrete model?
Not sure if you always need property nodes.
Which procedures did you run the one in graph algorithms?
The ones in APOC are deprecated and shouldn't be used anymore.
10-22-2018 04:01 PM
(:User)-[:DEVICE]->(:Device)
(:User)-[:PHONE]->(:Phone)
(:User)-[:EMAIL]->(:Email)
(:User)-[:SHIPPED]->(:Address)
Basically, I use these four models to link users.
I ran algo.unionFind and algo.louvain to partition the graph.
eg.
CALL algo.unionFind(
'MATCH (u1:User)
RETURN id(u1) as id',
'MATCH (u1:User)-[:DEVICE|:EMAIL|:PHONE|:SHIPPED]->(middle)<-[:DEVICE|:EMAIL|:PHONE|:SHIPPED]-(u2:User)
WHERE id(u1) < id(u2)
RETURN id(u1) as source, id(u2) as target',
{graph:'cypher', write: true, partitionProperty: 'group_label', concurrency: 16}
)
10-24-2018 03:30 AM
Hi,
When you say performance issue do you mean that the algorithm isn't returning a result or it's taking longer than you expect or something else? If it's slow do you know where exactly the problem is occurring?
Is it in the running of the algorithm or in the Cypher projection? How long does it take to run this query:
MATCH (u1:User)-[:DEVICE|:EMAIL|:PHONE|:SHIPPED]->(middle)<-[:DEVICE|:EMAIL|:PHONE|:SHIPPED]-(u2:User)
WHERE id(u1) < id(u2)
RETURN count(*)
12-04-2018 06:53 AM
Is there any news about this topic ? I am having the same issue ! or sall I create a new issue ?
12-04-2018 11:06 AM
I changed the way I model the data to avoid supernodes.
@mehdi.ajroud, you should create a new issue on that. If they can solve the supernode issue in community detection algorithm that will be wonderful.
12-05-2018 01:05 AM
ok ! I will recreate it since I didn't find any explanation
12-05-2018 03:08 AM
@mlo here is the link where I created the new issue , in case you want to follow the answer that I will get 😉
12-12-2018 03:09 PM
Better use label propagation or louvain, they are better at substructuring the graph.
12-13-2018 07:54 AM
I will try those ones and I will let you know about the final results ! Thanks Micheal 🙂
03-31-2019 10:35 PM
did you get a result to this @mehdi.ajroud? would be interested to hear if these other methods worked better at avoiding supernodes
04-04-2019 12:24 AM
@mio did you see Marks question?
You also didn't use distinct or count(*) in the edge-list statement, so you get a ton of duplicate pairs.
The answer to your question is to use USING JOIN ON d
where it does a scan + expand on both sides and then a join on the middle node.
All the sessions of the conference are now available online