Distributed Subgraph Matching on Timely Dataflow

Longbin Lai, Zhu Qing, Zhengyi Yang, Xin Jin, Zhengmin Lai, Ran Wang, Kongzhang Hao, Xuemin Lin, Lu Qin, Wenjie Zhang, Ying Zhang, Zhengping Qian, Jingren Zhou

TL;DR

This paper tackles the challenge of efficiently finding subgraph patterns within massive, distributed graph datasets. The authors provide a systematic, strategy-level comparison of existing distributed subgraph matching algorithms, implementing them on the Timely dataflow system and offering a practical guide for choosing the right approach.

What Problem Does This Paper Address?

Subgraph matching, the problem of finding instances of a smaller query graph within a larger data graph, is a fundamental operation in graph analysis with applications ranging from social network analysis to bioinformatics. As datasets grow beyond the capacity of single machines, distributed algorithms are crucial. However, existing comparisons of these algorithms are often unsystematic, making it difficult to understand the trade-offs between different strategies and optimizations. This paper aims to bridge this gap by providing a unified framework and empirical analysis to guide the selection of distributed subgraph matching algorithms.

Methods

The authors categorize existing distributed subgraph matching algorithms into four main strategies: BINJOIN (binary-join-based subgraph-growing), WOPTJOIN (worst-case optimal vertex-growing), SHRCUBE (shares of hypercube), and OTHERS. They then implement representative algorithms for each strategy on the Timely dataflow system, a distributed dataflow system known for its low overhead. To further refine performance, they incorporate three general-purpose optimizations: Batching (dividing computation into sub-tasks), TrIndexing (precomputing and indexing triangles), and Compression (maintaining intermediate results in a compressed form). Their implementation is generic, handling arbitrary queries without hardcoded optimizations, and allows for flexible configuration of these optimizations.

Datasets

The paper uses a variety of datasets for evaluation:

  • Unlabelled Datasets: GO, LJ, UK, FS, GP, US, EU (real-world social networks, road networks, and web graphs), and a synthetic dataset (SY) generated to mimic real-graph characteristics and exceed single-machine memory.
  • Labelled Datasets: Datasets generated using the LDBC Social Network Benchmark (SNB) standard, scaled to different sizes (DG10, DG60).

Key Insights and Ideas

  • Systematic Comparison is Crucial: Algorithm-level comparisons are insufficient due to intertwined strategies and optimizations. A unified, strategy-level benchmarking is needed.
  • Timely Dataflow as a Good Platform: The choice of Timely dataflow system helps minimize system-specific overhead, allowing for a clearer comparison of algorithmic strategies.
  • Optimizations Matter Significantly: Batching, TrIndexing, and Compression can dramatically improve performance, especially for BINJOIN and WOPTJOIN.
  • No One-Size-Fits-All: The "best" strategy depends heavily on the query structure, data graph characteristics (density, size), and available resources.
  • Computation Dominates Communication (in good networks): With fast networks and efficient overlapping of computation and communication, computation often becomes the bottleneck.

Key Results

  • FULLREP (maintaining the whole graph on each machine) is the preferred choice when memory permits, offering the best scalability.
  • WOPTJOIN and BINJOIN are strong alternatives for graphs exceeding machine memory. WOPTJOIN often performs well, but BINJOIN can outperform it by avoiding costly sub-queries through query decomposition, especially for complex queries.
  • SHRCUBE generally performs worse than other strategies, particularly on challenging queries, due to overheads like deduplication.
  • Optimizations:
    • Batching: Generally beneficial, especially when intermediate results are large.
  • TrIndexing: Critical for BINJOIN and significantly improves WOPTJOIN by reducing communication. Requires sufficient memory for "triangle partition."
    • Compression: A primary performance booster for BINJOIN and WOPTJOIN, especially on non-sparse graphs, but can add overhead on very sparse data.
  • Challenging Queries: For queries with very large result sets, strategies like FULLREP excel. The paper highlights cases where cost estimation for join plans can be suboptimal.

Limitations and Future Work

  • Optimal Join Plan: Determining the truly optimal join plan remains a challenge, as existing methods don't consistently account for all factors (worst-case bounds, cost estimation, optimization impact, partial orders, label frequencies). Future work could explore hybrid strategies combining BINJOIN and WOPTJOIN, or leverage techniques like "Empty Headed" for a more integrated approach.
  • Hardware Advancements: Future research should consider new hardware like GPUs for co-processing.
  • Dynamic Graphs: The current work focuses on static graphs; extending to dynamic graphs is an area for future exploration.
  • Labelled Matching: While some labelled experiments were conducted, further research into optimizing labelled subgraph matching is warranted.
  • Practical Guide Refinement: The proposed practical guide is based on current progress and requires further validation and refinement as research evolves.

Summary updated

BibTeX
@article{lai2019distributed,
  author = {Longbin Lai and Zhu Qing and Zhengyi Yang and Xin Jin and Zhengmin Lai and Ran Wang and Kongzhang Hao and Xuemin Lin and Lu Qin and Wenjie Zhang and Ying Zhang and Zhengping Qian and Jingren Zhou},
  title = {{Distributed Subgraph Matching on Timely Dataflow}},
  journal = {Proc. VLDB Endow.},
  year = {2019},
  url = {https://openreview.net/forum?id=sd9skCgxIg},
}
Figure