Table of Contents
Fetching ...

GNN-based Anchor Embedding for Efficient Exact Subgraph Matching

Bin Yang, Zhaonian Zou, Jianxiong Ye

TL;DR

This paper tackles exact subgraph matching, a problem known to be $NP$-complete, by introducing GNN-AE, a learning-based framework that achieves exact results via offline anchor embeddings. It offline-indexes small feature structures—anchored subgraphs and anchored paths—and uses a Graph Isomorphism Network (GIN) to embed these anchors, enabling 100% recall for candidate retrieval and reducing online work to a DFS-guided, embedding-driven process. The approach includes an anchor-based matching mechanism, a parallel matching growth algorithm, and a cost-model-based DFS query plan, all validated by experiments on six real and three synthetic datasets that show substantial speedups over baselines. The method offers scalable, exact subgraph matching with offline indexing and efficient online querying, supporting practical deployment for graph data management tasks.

Abstract

Subgraph matching query is a fundamental problem in graph data management and has a variety of real-world applications. Several recent works utilize deep learning (DL) techniques to process subgraph matching queries. Most of them find approximate subgraph matching results without accuracy guarantees. Unlike these DL-based inexact subgraph matching methods, we propose a learning-based exact subgraph matching framework, called \textit{graph neural network (GNN)-based anchor embedding framework} (GNN-AE). In contrast to traditional exact subgraph matching methods that rely on creating auxiliary summary structures online for each specific query, our method indexes small feature subgraphs in the data graph offline and uses GNNs to perform graph isomorphism tests for these indexed feature subgraphs to efficiently obtain high-quality candidates. To make a tradeoff between query efficiency and index storage cost, we use two types of feature subgraphs, namely anchored subgraphs and anchored paths. Based on the proposed techniques, we transform the exact subgraph matching problem into a search problem in the embedding space. Furthermore, to efficiently retrieve all matches, we develop a parallel matching growth algorithm and design a cost-based DFS query planning method to further improve the matching growth algorithm. Extensive experiments on 6 real-world and 3 synthetic datasets indicate that GNN-AE is more efficient than the baselines, especially outperforming the exploration-based baseline methods by up to 1--2 orders of magnitude.

GNN-based Anchor Embedding for Efficient Exact Subgraph Matching

TL;DR

This paper tackles exact subgraph matching, a problem known to be -complete, by introducing GNN-AE, a learning-based framework that achieves exact results via offline anchor embeddings. It offline-indexes small feature structures—anchored subgraphs and anchored paths—and uses a Graph Isomorphism Network (GIN) to embed these anchors, enabling 100% recall for candidate retrieval and reducing online work to a DFS-guided, embedding-driven process. The approach includes an anchor-based matching mechanism, a parallel matching growth algorithm, and a cost-model-based DFS query plan, all validated by experiments on six real and three synthetic datasets that show substantial speedups over baselines. The method offers scalable, exact subgraph matching with offline indexing and efficient online querying, supporting practical deployment for graph data management tasks.

Abstract

Subgraph matching query is a fundamental problem in graph data management and has a variety of real-world applications. Several recent works utilize deep learning (DL) techniques to process subgraph matching queries. Most of them find approximate subgraph matching results without accuracy guarantees. Unlike these DL-based inexact subgraph matching methods, we propose a learning-based exact subgraph matching framework, called \textit{graph neural network (GNN)-based anchor embedding framework} (GNN-AE). In contrast to traditional exact subgraph matching methods that rely on creating auxiliary summary structures online for each specific query, our method indexes small feature subgraphs in the data graph offline and uses GNNs to perform graph isomorphism tests for these indexed feature subgraphs to efficiently obtain high-quality candidates. To make a tradeoff between query efficiency and index storage cost, we use two types of feature subgraphs, namely anchored subgraphs and anchored paths. Based on the proposed techniques, we transform the exact subgraph matching problem into a search problem in the embedding space. Furthermore, to efficiently retrieve all matches, we develop a parallel matching growth algorithm and design a cost-based DFS query planning method to further improve the matching growth algorithm. Extensive experiments on 6 real-world and 3 synthetic datasets indicate that GNN-AE is more efficient than the baselines, especially outperforming the exploration-based baseline methods by up to 1--2 orders of magnitude.

Paper Structure

This paper contains 22 sections, 8 theorems, 5 equations, 23 figures, 3 tables, 4 algorithms.

Key Result

Lemma 4.1

For an edge $(u, v)$ in graph $G$, if vertex $u$ has degree $d(u)$, there are $2^{d(u)-1}$ possible anchored 1-radius subgraphs.

Figures (23)

  • Figure 1: An example of the subgraph matching.
  • Figure 2: An example of GNN-AE for efficient exact subgraph matching.
  • Figure 3: An example of the possible anchored subgraphs.
  • Figure 4: An example of the possible anchored paths.
  • Figure 5: The GNN model for the anchored subgraph embedding.
  • ...and 18 more figures

Theorems & Definitions (21)

  • Definition 2.1: Graph Isomorphism
  • Definition 2.2: Subgraph Matching Query
  • Definition 4.1: Anchored Subgraph
  • Definition 4.2: Anchored Path
  • Lemma 4.1
  • proof
  • Lemma 4.2
  • Theorem 4.1
  • proof
  • Theorem 4.2
  • ...and 11 more