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

SG tested Leiden #2980

Merged
merged 101 commits into from
Apr 3, 2023
Merged

SG tested Leiden #2980

merged 101 commits into from
Apr 3, 2023

Conversation

naimnv
Copy link
Contributor

@naimnv naimnv commented Nov 25, 2022

Leiden algorithm

This PR adds Leiden implementation using cugraph primitives. It also add an implementation of maximal independent set using cugraph primitives that is used by the Leiden implementation.

  • It reuses code from Louvain implementation to find locally optimal moves for vertices.
  • Locally optimal movement creates clusters of Louvain communities
  • In refinement phase, which is the main feature of Leiden algorithm, vertices are moved only within a Louvain community to subdivide a Louvain community in multiple sub communities or Leiden communities
  • In graph contraction phase, vertices belonging to a Leiden community are merged to become a node in aggregated graph.

This code has been tested to work on SG. We aim to test MG version in next release.
Future improvement:

  • Move vertices randomly instead of greedily refinement phase
  • Test for MNMG

@naimnv naimnv changed the title Leiden on 22 12 [WIP] MG Leiden Nov 25, 2022
@BradReesWork BradReesWork added this to the 23.02 milestone Nov 28, 2022
cpp/include/cugraph/algorithms.hpp Outdated Show resolved Hide resolved
cpp/src/community/detail/common_methods.cuh Outdated Show resolved Hide resolved
cpp/src/community/detail/common_methods.cuh Outdated Show resolved Hide resolved
cpp/src/community/leiden_impl.cuh Outdated Show resolved Hide resolved
cpp/src/community/leiden_impl.cuh Outdated Show resolved Hide resolved
Copy link
Collaborator

@ChuckHastings ChuckHastings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bunch of little cosmetic comments.

cpp/src/community/detail/common_methods.cuh Outdated Show resolved Hide resolved
cpp/src/community/detail/mis.hpp Outdated Show resolved Hide resolved
cpp/src/community/detail/mis_mg.cu Outdated Show resolved Hide resolved
cpp/src/community/detail/mis_sg.cu Outdated Show resolved Hide resolved
cpp/src/community/detail/refine.hpp Outdated Show resolved Hide resolved
cpp/src/community/detail/refine_mg.cu Outdated Show resolved Hide resolved
cpp/src/community/detail/refine_sg.cu Outdated Show resolved Hide resolved
cpp/src/community/leiden_impl.cuh Outdated Show resolved Hide resolved
cpp/src/community/leiden_mg.cu Outdated Show resolved Hide resolved
cpp/tests/community/new_leiden_test.cpp Outdated Show resolved Hide resolved
@ChuckHastings
Copy link
Collaborator

/merge

@rapids-bot rapids-bot bot merged commit d0cc407 into rapidsai:branch-23.04 Apr 3, 2023
@naimnv naimnv deleted the leiden-on-22-12 branch April 4, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants