Pangolin: An Efficient and Flexible Graph Mining System on CPU and GPU

Xuhao Chen, Roshan Dathathri, Gurbinder Gill, Keshav Pingali

Introduction

Graph Pattern Mining (GPM) is the process of discovering structural motifs—such as triangles, cliques, or frequent subgraphs—within large-scale networks. Unlike simpler graph analytics like PageRank, GPM is a "computational nightmare" characterized by a combinatorial explosion of intermediate data. It requires expensive isomorphism tests to ensure that the same subgraph is not counted multiple times, making it significantly more resource-intensive than standard graph processing.

Example of Graph Pattern Mining (GPM) showing input graph, target pattern, and resulting embeddings.

Existing frameworks like Arabesque or RStream prioritize ease of use but often lag behind hand-optimized, application-specific solvers by orders of magnitude. These systems frequently hide low-level execution details, preventing developers from applying domain-specific pruning or skipping redundant isomorphism tests. Furthermore, many are designed for distributed environments, failing to fully exploit the parallel potential of modern shared-memory CPUs and GPUs.

The Pangolin System

Pangolin addresses these challenges by introducing a high-performance framework that bridges the gap between general-purpose systems and hand-optimized code. It utilizes a flexible programming model called Extend-Reduce-Filter:

  1. Extend: Generates new subgraphs (embeddings) by adding a vertex or edge. Users can define custom pruning functions to narrow the search space early.
  2. Reduce: Extracts statistical information, such as pattern frequency. Custom logic can often replace expensive general isomorphism tests with simpler property checks.
  3. Filter: Removes embeddings that are no longer relevant to the mining task.
The Pangolin system architecture, illustrating the layers from applications down to hardware execution.

Technical Innovations

Pangolin is the first GPM system to provide high-level abstractions specifically for GPUs. Key innovations include:

  • Structure of Arrays (SoA): Pangolin uses an SoA layout instead of an Array of Structures (AoS) to store subgraphs. This ensures that memory requests are "coalesced," significantly boosting GPU bandwidth.
  • Inspection-Execution: To manage unpredictable memory needs without slow global locks, Pangolin uses a two-pass approach. It first "inspects" memory requirements per thread and then "executes" the allocation and writing using parallel prefix sums.
  • Adaptive Pruning: The system supports techniques like DAG Orientation to eliminate redundant search paths by construction.

Performance and Scalability

The system was evaluated on a diverse set of real-world graphs, ranging from small collaboration networks to the massive Gsh-2015 web-crawl graph, which contains over 51 billion edges.

Key Results:

  • CPU Performance: On a 28-core CPU, Pangolin outperformed Arabesque by 49x and RStream by 88x on average.
  • GPU Acceleration: Transitioning from a 28-core CPU to an NVIDIA V100 GPU provided an additional 15x speedup.
  • Record-Breaking Scale: Pangolin successfully mined 4-cliques on the 51-billion-edge Gsh graph in approximately 6.5 hours—the largest graph ever subjected to such mining to the authors' knowledge.
  • Efficiency: Despite being a general framework, Pangolin remains competitive with state-of-the-art hand-optimized solvers like KClist and PGD.

Conclusion

Pangolin demonstrates that the "generality tax" in graph mining can be significantly reduced by providing the right abstractions. By exposing the "Extend" and "Reduce" phases and leveraging GPU-specific optimizations, Pangolin enables efficient mining at a scale previously unreachable for general frameworks. While GPU memory remains a bottleneck for the most complex tasks, Pangolin's BFS-based approach provides the parallelism and load balancing necessary to saturate modern hardware.

Summary updated

BibTeX
@article{chen2020pangolin,
  author = {Xuhao Chen and Roshan Dathathri and Gurbinder Gill and Keshav Pingali},
  title = {{Pangolin: An Efficient and Flexible Graph Mining System on CPU and GPU}},
  journal = {Proc. VLDB Endow.},
  year = {2020},
  doi = {10.14778/3389133.3389137},
}
Figure