An Efficient Pruning Process with Locality Aware Exploration and Dynamic Graph Editing for Subgraph Matching

Zite Jiang, Boxiao Liu, Shuai Zhang, Xingzhong Hou, Mengting Yuan, Haihang YouarXiv 2021

Abstract

Subgraph matching is a fundamental NP-complete problem in graph theory, essential for identifying complex patterns within large-scale data graphs. This paper presents a novel framework designed to accelerate this process by addressing the limitations of static query processing and redundant computational checks. We introduce Dynamic Graph Editing (DGE), a technique that simplifies the query graph on the fly based on a new "Assignment under Conditional Candidate Set" (ACCS) formulation. Furthermore, we propose fGQL, a locality-aware optimization that significantly reduces redundant pruning operations. Our evaluation across eight diverse real-world datasets demonstrates that this framework achieves substantial speedups and superior pruning power compared to existing state-of-the-art solvers.

Introduction

Subgraph matching is often described as the "needle in a haystack" problem of graph theory: given a small query graph and a massive data graph, the goal is to find every instance where the query's structure appears. Due to its NP-complete nature, researchers rely heavily on pruning techniques to eliminate impossible matches early in the search process.

Figure 1: Example of a query graph (a) and a data graph (b) illustrating the basic subgraph matching problem.

Despite advancements, current state-of-the-art (SOTA) solvers face two primary bottlenecks. First, most solvers treat the query graph as a fixed, static entity, failing to adapt its structure to simplify the remaining search space. Second, iterative pruning algorithms frequently perform redundant checks, ignoring the principle of locality—where changes in one part of a graph typically only affect its immediate neighborhood.

Methodology

The proposed framework addresses these bottlenecks through three key components:

fGQL (fast GraphQL)

fGQL is an optimized version of the classic GraphQL pruning algorithm. It applies the Principle of Locality to graph search using Neighborhood Updates and Pre-checks. By only re-evaluating vertices whose neighbors have changed, fGQL drastically reduces the computational overhead associated with iterative pruning.

Dynamic Graph Editing (DGE)

DGE represents the most significant innovation of this work. The authors prove that subgraph matching is equivalent to a newly formulated problem: Assignment under Conditional Candidate Set (ACCS). This framework allows the algorithm to "edit" the query graph during the search process—deleting edges that no longer provide useful constraints or adding edges that represent implicit constraints, such as ensuring a vertex is not mapped twice.

Figure 2: Search tree visualization showing the exploration of candidate mappings for query vertices $u_0, u_1, u_2$.

DGEE (Dynamic Graph Editing Enumeration)

The final search algorithm, DGEE, integrates DGE with Failing Set (FS) optimization. While FS allows the algorithm to "jump back" from dead ends, DGE simplifies the query structure as the search progresses, making those dead ends easier to identify early.

Experimental Evaluation

The framework was evaluated using 1,800 query graphs per dataset across eight real-world data graphs, including biological (hprd, yeast), social (youtube), and web-based (eu2005) networks.

Key Results

  • Execution Speed: On the dblp dataset, the DGEE-based approach reduced execution time by over 70% compared to a composite baseline of eight SOTA algorithms.
  • Pruning Efficiency: fGQL reduced the number of candidate vertices by over 40% compared to the previous leader, CFL. The fGQL filter itself is highly efficient, typically accounting for only 0.33% of total execution time.
  • Scalability: In the eu2005 dataset, the new algorithm successfully solved "hard" query graphs that forced the baseline to timeout after five minutes.

Discussion and Conclusion

A primary insight of this research is that the query graph should be viewed as a malleable structure rather than a static constraint. By leveraging the ACCS equivalence, the search process can be simplified on the fly without compromising correctness. Additionally, the application of spatial and temporal locality in fGQL demonstrates that tracking vertex updates can yield significant performance gains.

While DGE introduces some overhead in updating edges, its benefits are most pronounced in complex or dense search spaces. Future work may involve integrating DGE with techniques like Versatile Equivalences to further exploit symmetries within the graph structure and minimize redundant search paths.

Summary updated

BibTeX
@misc{jiang2021efficient,
  author = {Zite Jiang and Boxiao Liu and Shuai Zhang and Xingzhong Hou and Mengting Yuan and Haihang You},
  title = {{An Efficient Pruning Process with Locality Aware Exploration and Dynamic Graph Editing for Subgraph Matching}},
  year = {2021},
  eprint = {2112.11736},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.11736},
}
Figure