louvain-communities-cuda
Design of CUDA-based Louvain algorithm for community detection.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org, nature.com, ieee.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.3%) to scientific vocabulary
Repository
Design of CUDA-based Louvain algorithm for community detection.
Basic Info
- Host: GitHub
- Owner: puzzlef
- License: mit
- Language: C++
- Default Branch: main
- Homepage: https://arxiv.org/abs/2501.19004
- Size: 80.1 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Design of CUDA-based Louvain algorithm for community detection.
Community detection involves identifying natural divisions in networks, a crucial task for many large-scale applications. This report presents GVE-Louvain, one of the most efficient multicore implementations of the Louvain algorithm, a high-quality method for community detection. Running on a dual 16-core Intel Xeon Gold 6226R server, GVE-Louvain outperforms Vite, Grappolo, NetworKit Louvain, and cuGraph Louvain (on an NVIDIA A100 GPU) by factors of 50x, 22x, 20x, and 5.8x, respectively, achieving a processing rate of 560M edges per second on a 3.8B-edge graph. Additionally, it scales efficiently, improving performance by 1.6x for every thread doubling. The paper also presents ν-Louvain, a GPU-based implementation. When evaluated on an NVIDIA A100 GPU, ν-Louvain performs only on par with GVE-Louvain, largely due to reduced workload and parallelism in later algorithmic passes. These results suggest that CPUs, with their flexibility in handling irregular workloads, may be better suited for community detection tasks.
Below we plot the time taken by Grappolo, NetworKit Louvain, Nido, cuGraph Louvain, and ν-Louvain on 13 different graphs. ν-Louvain surpasses Grappolo, NetworKit Louvain, Nido, and cuGraph Louvain by 20×, 17×, 61×, and 5.0× respectively, achieving a processing rate of 405M edges/s on a 2.2𝐵 edge graph.
Below we plot the speedup of ν-Louvain wrt Grappolo, NetworKit Louvain, Nido, and cuGraph Louvain.
Finally, we plot the modularity of communities identified by Grappolo, NetworKit Louvain, Nido, cuGraph Louvain, and ν-Louvain. ν-Louvain on average obtains 1.1%, 1.2%, and 1.3% lower modularity than Grappolo, NetworKit
Louvain, and cuGraph Louvain (where cuGraph Louvain runs), but 45% higher modularity than Nido.
Refer to our technical report for more details: \ CPU vs. GPU for Community Detection: Performance Insights from GVE-Louvain and ν-Louvain.
[!NOTE] You can just copy
main.shto your system and run it. \ For the code, refer tomain.cxx.
Code structure
The code structure of ν-Louvain is as follows:
bash
- inc/_*.hxx: Utility functions
- inc/**.hxx: Common graph functions
- inc/csr.hxx: Compressed Sparse Row (CSR) data structure functions
- inc/Graph.hxx: Graph data structure
- inc/louvian.hxx: OpenMP-based Louvian algorithm
- inc/louvainCuda.hxx: CUDA-based Louvian algorithm
- inc/hashtableCuda.hxx: CUDA-based hybrid quadratic-double hashtable
- inc/mtx.hxx: Graph (MTX format) file reader
- inc/properties.hxx: Graph property functions (e.g., modularity)
- inc/symmetrize.hxx: Make graph symmetric
- inc/update.hxx: Graph update functions
- inc/main.hxx: Main header
- main.cxx: Experimentation code
- main.sh: Experimentation script
- process.js: Node.js script for processing output logs
Note that each branch in this repository contains code for a specific experiment. The main branch contains code for the final experiment. If the intention of a branch in unclear, or if you have comments on our technical report, feel free to open an issue.
References
- Fast unfolding of communities in large networks; Vincent D. Blondel et al. (2008)
- Community Detection on the GPU; Md. Naim et al. (2017)
- Scalable Static and Dynamic Community Detection Using Grappolo; Mahantesh Halappanavar et al. (2017)
- From Louvain to Leiden: guaranteeing well-connected communities; V.A. Traag et al. (2019)
- CS224W: Machine Learning with Graphs | Louvain Algorithm; Jure Leskovec (2021)
- The University of Florida Sparse Matrix Collection; Timothy A. Davis et al. (2011)
- Fetch-and-add using OpenMP atomic operations
Owner
- Name: puzzlef
- Login: puzzlef
- Kind: organization
- Website: https://puzzlef.github.io/
- Repositories: 10
- Profile: https://github.com/puzzlef
A summary of experiments.
Citation (CITATION.bib)
@article{sahu2025nulouvain,
title={CPU vs. GPU for Community Detection: Performance Insights from GVE-Louvain and ν-Louvain},
author={Sahu, Subhajit},
journal={arXiv preprint arXiv:2501.19004},
year={2025}
}
GitHub Events
Total
- Issues event: 1
- Delete event: 2
- Public event: 1
- Push event: 13
- Create event: 2
Last Year
- Issues event: 1
- Delete event: 2
- Public event: 1
- Push event: 13
- Create event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: 24 days
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 10.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: 24 days
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 10.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- wolfram77 (1)
