Parallel Algorithms for Densest Subgraph Discovery Using Shared Memory Model

B. D. M. De Zoysa, Y. A. M. M. A. Ali, M. D. I. Maduranga, Indika Perera, Saliya Ekanayake, Anil VullikantiarXiv 2021

Densest Subgraph Discovery (DSD) is a critical task in network analysis, aimed at identifying the most "tightly knit" communities within massive graphs. Applications range from detecting spam clusters in social media to identifying functional modules in biological protein-protein interaction networks. However, as real-world graphs grow to millions of nodes and billions of edges, traditional exact algorithms become computationally prohibitive. Most efficient approximations are limited by a "2-approximation" ceiling, finding subgraphs only half as dense as the theoretical optimum.

This paper presents two parallel shared-memory algorithms designed to address these challenges: P-Bahmani, a scalable parallelization of a standard greedy algorithm, and CBDS-P, a novel core-based algorithm that breaks the 2-approximation barrier.

Parallelizing the Greedy Baseline: P-Bahmani

The researchers first addressed the scalability of the popular greedy algorithm by Bahmani et al. The primary innovation in P-Bahmani is the use of OpenMP Task Parallelism rather than simple loop parallelism. Real-world graphs often exhibit power-law degree distributions, meaning a few "heavy" nodes can create significant load imbalances.

Figure 3: Load balancing through task parallelism and barrier synchronization.

By utilizing task parallelism, threads can dynamically pick up new work as soon as they finish, minimizing idle time and maximizing CPU utilization across multi-core systems. The implementation also utilizes C++ atomic operations to efficiently handle degree updates in a shared-memory environment.

Breaking the 2-Approximation Ceiling: CBDS-P

The second contribution, CBDS-P (Core-based Dense Subgraphs - Parallel), moves beyond simple greedy removal. It leverages the mathematical property that a graph's $k$-core is often a strong 2-approximation of the densest subgraph.

CBDS-P operates in two phases. First, it performs a parallel $k$-core decomposition to find a high-density baseline. Second, it identifies "legitimate" vertices outside that core—nodes that, when re-inserted, increase the overall edge density of the subgraph. This refinement process allows the algorithm to consistently find subgraphs significantly denser than those identified by standard 2-approximation methods.

Figure 4: The process of identifying and re-inserting external vertices to enhance subgraph density in CBDS-P.

Experimental Results and Scalability

The algorithms were evaluated on eight real-world datasets from the Stanford Network Analysis Project (SNAP), ranging from citation networks to the Orkut social network (3M nodes, 117M edges).

Key results include:

  • Accuracy: In the as-skitter dataset (Internet topology), P-Bahmani achieved a density of 71.77, while CBDS-P reached 89.46, matching the exact theoretical maximum density.
  • Scalability: Both algorithms demonstrated excellent speedup as the number of CPU cores increased. On the massive Orkut dataset, runtimes decreased substantially when moving from 8 to 64 cores, proving the effectiveness of the task-based model.

Conclusion

By combining task-based parallelism with core-based refinement, this research provides a robust framework for large-scale DSD. While CBDS-P is more computationally intensive than P-Bahmani, its ability to break the 2-approximation limit makes it a powerful tool for high-precision community mining. Future work will focus on extending these techniques to directed and weighted graphs and optimizing memory structures, such as moving from hash tables to Compressed Sparse Rows (CSR), for even larger datasets.

Summary updated

BibTeX
@misc{zoysa2021parallel,
  author = {B. D. M. De Zoysa and Y. A. M. M. A. Ali and M. D. I. Maduranga and Indika Perera and Saliya Ekanayake and Anil Vullikanti},
  title = {{Parallel Algorithms for Densest Subgraph Discovery Using Shared Memory Model}},
  year = {2021},
  eprint = {2103.00154},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.00154},
}
Figure