Abstract
Frequent graph mining (FGM) is a fundamental task in data science, used to identify recurring structural motifs in complex networks. However, the computational complexity of FGM—driven by the exponential growth of candidate patterns and the NP-hard nature of subgraph isomorphism—presents a significant bottleneck. This paper introduces a high-performance parallel framework for FGM on GPUs. By adapting the gSpan algorithm's canonical DFS coding and employing parallelized embedding lists, the proposed approach achieves substantial performance gains. Experimental results demonstrate speedups of up to 9x on real-world datasets, highlighting the efficacy of GPU acceleration for dense graph mining.
What Problem Does This Paper Address?
Frequent Graph Mining involves identifying all subgraphs (patterns) that appear in a database with a frequency above a predefined threshold. This task is critical in domains such as drug discovery, where researchers look for chemical motifs, and social network analysis. Despite its utility, FGM faces two primary computational hurdles:
- Candidate Explosion: The number of possible subgraph patterns grows exponentially as the number of vertices increases.
- Subgraph Isomorphism: Determining whether a specific pattern exists within a larger graph is a computationally expensive matching problem.
While sequential algorithms like gSpan are efficient on CPUs, they struggle to scale to modern massive datasets. GPUs offer a potential solution through their massive core counts, but they require a shift from the complex, pointer-heavy data structures (like linked lists) typically used in graph mining to a Single Instruction Multiple Threads (SIMT) model.
Methodology
The authors propose a hybrid approach that adapts state-of-the-art CPU algorithms for the GPU environment through several key techniques:
- Canonical DFS Coding: Derived from the gSpan algorithm, this technique represents graphs as unique strings (DFS codes). This allows the algorithm to prune the search space effectively by ignoring duplicate patterns.
- Embedding Lists: Unlike traditional gSpan, which re-searches for patterns from scratch, this method maintains "embeddings" (instances of where a pattern appears). This is highly conducive to GPU parallelism, as each embedding can be processed by a separate thread independently.
- Serialized Data Structures: To optimize memory access, the entire graph database is serialized into flat, contiguous arrays. This ensures memory coalescing, allowing multiple threads to read data in a single hardware clock cycle and avoiding the performance penalties of random memory access.
- Parallel Primitives: The framework relies on fast, GPU-native operations such as parallel scans (prefix sums), reductions, and sorts to manage memory allocation and count pattern frequency across thousands of threads.
Experimental Evaluation
The system was evaluated using a diverse set of real-world and synthetic benchmarks:
- Protein: 6,875 dense protein structures.
- NCI: 25,595 chemical compounds from the National Cancer Institute.
- DBLP & Citation: Social and academic networks representing co-authorship and citations.
- Synthetic (Syn500K/Syn1000K): Large-scale datasets with up to 1 million graphs to test scalability.
Key Insights and Results
- Independence and Parallelism: The shift to maintaining embedding lists allows the GPU to extend thousands of pattern instances in parallel without inter-thread communication, maximizing throughput.
- The Density Dividend: GPUs perform significantly better on dense graphs, such as the Protein dataset. Higher density provides more embeddings to process, ensuring the GPU cores remain fully utilized.
- Remapping for Speed: To efficiently count unique graph occurrences, the authors implemented a remapping strategy that compresses sparse graph IDs into a dense range, enabling the use of fast bit-vectors and reductions.
- Performance Gains: The GPU implementation achieved a 9x speedup on the Protein dataset and a 7x speedup on the NCI dataset compared to sequential CPU versions. On massive synthetic datasets (1M graphs), it maintained a consistent 3-4x speedup.
Conclusion and Future Work
This research demonstrates that GPUs can significantly accelerate frequent graph mining by carefully re-architecting data structures for SIMT execution. While I/O overhead between CPU and GPU remains a bottleneck, the results prove the scalability of the approach for "Big Data" applications. Future work will explore adapting these techniques for maximal and closed graph mining, which are even more computationally demanding subsets of the FGM problem.
Summary updated