Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whether Leiden supports incremental update? #341

Open
AugustLHHHHHH opened this issue Dec 17, 2024 · 1 comment
Open

Whether Leiden supports incremental update? #341

AugustLHHHHHH opened this issue Dec 17, 2024 · 1 comment
Labels
feature request A suggestion for a new feature

Comments

@AugustLHHHHHH
Copy link

Whether the current implementation of the community detection algorithms (e.g., Leiden, Louvain, etc.) in GDS support an incremental update mechanism?
For example:

  • Retain the already detected community structure for an existing graph.
  • Allow newly added nodes and edges to be integrated into the graph. Then perform community detection only on the new nodes and edges.
    Thanks!
@AugustLHHHHHH AugustLHHHHHH added the feature request A suggestion for a new feature label Dec 17, 2024
@IoannisPanagiotas
Copy link
Contributor

IoannisPanagiotas commented Dec 23, 2024

Hi @AugustLHHHHHH ,

Unfortunately currently GDS does not support incremental updates in-memory graph.
This means that if you need to update your graph you will have to reproject again, and running any algorithm on the new graph will end computing a value for each node.

What GDS offers for most of community algorithms is a seedProperty . This is a way to pre-assign communities to some nodes, which can help the algorithm converge faster, because when only few nodes/relationships are added the pre-existing communities should not change much, hence the outcome should stabilize with fewer iterations.

So while it won't be as fast as calculating the communities only for new entities, using the seedProperty could make it faster than running the algorithm on the re-projected graph from scratch.

In your case, you could do a gds.louvain.write to write back the community of each node in your neo4j database as a node property, and then load that property when you next project.

I hope that clears things out for you
Let me know if you have any other question,

Best regards,
Ioannis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A suggestion for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants