Using Graph Algorithms to Detect Supernodes

Hi there,

I am trying to establish a process to detect supernodes using one of the graph algorithms. I'm currently using Degree Centrality, and am running into performance issues. I'm working with a very large graph >2 billion nodes, and when testing the degree centrality algorithm on a node of degree ~500, it's taking about 3 minutes to run. Of course, it won't be possible to get a degree for each node if that kind of performance is the norm. The whole purpose of this exercise is to detect supernodes, so once I get to one, if the degree centrality can't make the calculation, this approach isn't going to work.

Additionally, I am looking at using APOC to batch out the process.

Is anyone else trying to solve this problem? Any suggestions on how to approach it are most welcome.

Thanks!
Evan

Hi,

There are already some APOC routines that can help you with this.
https://neo4j-contrib.github.io/neo4j-apoc-procedures/#node-functions

You could use apoc.periodic.iterator to run several in parallel.

David

In case anyone stumbles on this, I found this query to be helpful:

MATCH (n)
WHERE apoc.nodes.isDense(n)
WITH labels(n) AS labelsList
UNWIND labelsList AS label
RETURN label, COUNT(*) AS denseNodesCount
ORDER BY denseNodesCount DESC
2 Likes