SubGraph2Vec: Highly-Vectorized Tree-like Subgraph Counting

Langshi Chen, Jiayu Li, S. Cenk Sahinalp, Madhav V. Marathe, Anil Vullikanti, Andrey Nikolaev, Egor Smirnov, Ruslan Israfilov, Judy Qiu · DOI

Abstract

Subgraph counting is a fundamental task in network analysis, yet it remains computationally intensive due to irregular memory access and high algorithmic complexity. SubGraph2Vec is a high-performance framework that accelerates tree-like subgraph counting by up to 660x compared to previous state-of-the-art tools. By reframing graph traversals as optimized linear algebra operations—specifically Sparse Matrix-Dense Vector Multiplication (SpMV) and element-wise Multiplication and Addition (eMA)—SubGraph2Vec enables massive vectorization and seamless portability across CPU and GPU architectures.

Introduction

Finding the frequency of specific "templates" or motifs within large networks is critical for fields like social network analysis and bioinformatics. However, exact subgraph counting is NP-complete. Approximation methods, such as color-coding, provide a more tractable path but often hit performance walls due to memory-bound operations and irregular data access. Existing tools like FASCIA can take days to process relatively small templates on million-vertex networks. SubGraph2Vec addresses these challenges through a hardware-software co-design approach that maximizes hardware utilization.

Methods

SubGraph2Vec introduces several technical innovations to optimize the standard color-coding algorithm. The core strategy involves Algorithmic Decoupling, where the traditional dynamic programming step is split into a vertex-neighbor traversal stage and a counts updating stage.

Template partitioning and mapping to the input graph G.

The framework maps these stages to linear algebra operations. Graph traversal is mathematically equivalent to Sparse Matrix-Dense Vector Multiplication (SpMV), while the update step corresponds to element-wise Multiplication and Addition (eMA). This mapping allows the use of highly optimized libraries like Intel MKL or NVIDIA cuSPARSE. Furthermore, SubGraph2Vec employs Massive Vectorization across millions of vertices rather than the small template, ensuring full utilization of modern SIMD units (e.g., AVX-512). To handle skewed degree distributions in real-world graphs, a custom CSC-Split format is used to improve load balancing.

Key Insights and Ideas

The primary breakthrough in SubGraph2Vec is the realization that redundant work in standard color-coding can be eliminated by "factoring out" neighbor traversals.

Factoring out neighbor traversals to eliminate redundant work and improve memory efficiency.

By reducing the frequency of memory jumps, the algorithm becomes significantly more cache-friendly. This hardware-friendly design ensures that the code is portable; the same linear algebra abstractions allow it to run efficiently on both CPUs and GPUs. This scalability allows the system to handle templates of size $k=20$, a substantial increase over previous methods.

Key Results

The researchers evaluated SubGraph2Vec on diverse datasets, including biological networks (Human, Yeast, E. coli) and large-scale social networks (Orkut, NYC). Key performance metrics include:

  • Massive Speedups: SubGraph2Vec achieved a 660x speedup on the RMAT-1M dataset compared to FASCIA.
  • Efficiency: A task that previously required 105 hours was completed in just 9.5 minutes on the same hardware.
  • Hardware Utilization: The system maintained 65-78% CPU utilization, a significant improvement over FASCIA’s sub-50% utilization.
  • Scalability: In distributed environments, SubGraph2Vec demonstrated near-linear speedup across multiple nodes.

Limitations and Future Work

While highly effective, SubGraph2Vec faces challenges with GPU memory constraints. Large templates generate count matrices that can exceed the VRAM of enterprise GPUs. Additionally, the inherent irregularity of graph data prevents 100% hardware efficiency. Future research may involve using machine learning to predict and manage these irregular access patterns more effectively.

Conclusion

SubGraph2Vec demonstrates that reframing graph problems as linear algebra operations can unlock massive performance gains. By prioritizing hardware-software co-design, the framework provides a scalable and portable solution for the demanding task of subgraph counting in massive networks.

Summary updated

BibTeX
@inproceedings{chen2019subgraph,
  author = {Langshi Chen and Jiayu Li and S. Cenk Sahinalp and Madhav V. Marathe and Anil Vullikanti and Andrey Nikolaev and Egor Smirnov and Ruslan Israfilov and Judy Qiu},
  title = {{SubGraph2Vec: Highly-Vectorized Tree-like Subgraph Counting}},
  booktitle = {IEEE BigData},
  year = {2019},
  doi = {10.1109/bigdata47090.2019.9006037},
}
Figure