Adaptive Work-Efficient Connected Components on the GPU

Michael Sutton, Tal Ben-Nun, Amnon Barak, Sreepathi Pai, Keshav PingaliarXiv 2016

Introduction

Finding Connected Components (CC) is a cornerstone of graph theory, essential for applications ranging from social network analysis to image processing. While Graphics Processing Units (GPUs) offer immense parallel computing power, they often underperform on irregular graph algorithms. Traditional parallel approaches, such as the Shiloach-Vishkin algorithm, rely on "Hooking" (connecting trees) and "Shortcutting" (flattening trees). However, existing GPU implementations frequently suffer from significant CPU-GPU communication overhead and a lack of adaptability to varying graph densities.

Proposed Methodology

Researchers from the Hebrew University of Jerusalem and UT Austin have developed a "device-centric" approach that shifts control logic from the CPU to the GPU, minimizing idle time. The proposed framework introduces three primary technical innovations:

  1. Multi-Jump Kernel: This kernel implements an internal while loop on the GPU to perform multiple levels of tree flattening in a single pass, transforming component trees into depth-one "stars" without returning control to the CPU.
  2. Atomic-Hook: By utilizing Atomic Compare-And-Swap (CAS) operations, the algorithm handles tree connections internally. This eliminates the need for the CPU to manage the convergence loop, further reducing bottlenecks.
  3. Adaptive Segmentation: To mitigate "atomic contention"—where multiple threads compete for the same memory location—the algorithm intelligently segments graph edges.

The core of this approach is the AdaptiveConnectedComponents procedure, which uses a heuristic based on the graph's average degree ($2|E|/|V|$) to determine the number of segments.

The AdaptiveConnectedComponents algorithm segments edges based on average degree to balance hooking and jumping operations.

Experimental Evaluation

The algorithm was evaluated across four distinct graph topologies:

  • Road Maps: usa-osm and euro-osm-karls (large scale, low average degree).
  • Social Networks: soc-live-journal (high average degree, irregular structure).
  • Synthetic Graphs: kron-logn21 (extremely high average degree, power-law distribution).

Key Results and Insights

The adaptive strategy demonstrated superior performance across all test cases, achieving speedups of 4.15x to 6.76x over the state-of-the-art Soman et al. baseline.

Runtime comparison across various graph datasets shows the Adaptive approach consistently outperforming baselines.

The results highlight several critical insights:

  • Density-Aware Strategy: The "cost" of graph operations shifts with density. Sparse graphs are bottlenecked by tree compression, while dense graphs suffer from atomic contention during hooking. The adaptive segmentation effectively balances these trade-offs.
  • Reduced Divergence: The Multi-Jump kernel significantly reduces thread divergence, ensuring more efficient GPU utilization.
  • Robustness: While individual optimizations like Multi-Jump or Atomic-Hook excel in specific scenarios (sparse vs. dense), only the Adaptive version maintains peak performance across the entire spectrum of graph types.

Conclusion

By moving convergence logic to the GPU and employing a simple yet effective density-based heuristic, this research provides a robust solution for high-performance graph processing. Future work may explore scaling these techniques to multi-GPU or distributed systems and refining segmentation heuristics based on local rather than global graph density.

Summary updated

BibTeX
@misc{sutton2016adaptive,
  author = {Michael Sutton and Tal Ben-Nun and Amnon Barak and Sreepathi Pai and Keshav Pingali},
  title = {{Adaptive Work-Efficient Connected Components on the GPU}},
  year = {2016},
  eprint = {1612.01178},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1612.01178},
}
Figure