Table of Contents
Fetching ...

$Δ$-Motif: Parallel Subgraph Isomorphism via Tabular Operations

Yulun Wang, Esteban Ginez, Jamie Friel, Yuval Baum, Jin-Sung Kim, Alex Shih, Oded Green

TL;DR

This work introduces $\Delta$-Motif, a GPU-accelerated subgraph isomorphism algorithm that reformulates the task through the lens of database operations, turning subgraph isomorphism into database primitives including joins, sorts, merges, and filters.

Abstract

Subgraph isomorphism is a fundamental problem in graph analysis that seeks to find all instances of a pattern graph within a larger data graph while preserving structural relationships. This NP-complete problem is central to domains such as biological network analysis, social network mining, and quantum circuit optimization. Traditional approaches rely on backtracking algorithms like VF2, which suffer from sequential bottlenecks that limit their ability to exploit modern parallel hardware. In this work, we introduce $Δ$-Motif, a GPU-accelerated subgraph isomorphism algorithm that reformulates the task through the lens of database operations. Our key insight is to represent both data and pattern graphs in tabular form, turning subgraph isomorphism into database primitives including joins, sorts, merges, and filters. $Δ$-Motif decomposes graphs into small building blocks called motifs and systematically combines them using scalable relational operations. By leveraging mature, optimized libraries from the NVIDIA RAPIDS ecosystem and Pandas framework, our solution achieves massive parallelism while remaining portable across systems supporting standard relational primitives. Benchmarks show that $Δ$-Motif outperforms established algorithms like VF2, achieving speedups of up to $595\times$ on GPUs. We further demonstrate its impact by applying it to quantum circuit compilation, addressing a critical bottleneck in quantum computing and enabling scaling to near- and medium-term devices. Our approach democratizes high-performance graph processing by exposing it through familiar database abstractions, eliminating the need for low-level programming while delivering exceptional computational efficiency.

$Δ$-Motif: Parallel Subgraph Isomorphism via Tabular Operations

TL;DR

This work introduces -Motif, a GPU-accelerated subgraph isomorphism algorithm that reformulates the task through the lens of database operations, turning subgraph isomorphism into database primitives including joins, sorts, merges, and filters.

Abstract

Subgraph isomorphism is a fundamental problem in graph analysis that seeks to find all instances of a pattern graph within a larger data graph while preserving structural relationships. This NP-complete problem is central to domains such as biological network analysis, social network mining, and quantum circuit optimization. Traditional approaches rely on backtracking algorithms like VF2, which suffer from sequential bottlenecks that limit their ability to exploit modern parallel hardware. In this work, we introduce -Motif, a GPU-accelerated subgraph isomorphism algorithm that reformulates the task through the lens of database operations. Our key insight is to represent both data and pattern graphs in tabular form, turning subgraph isomorphism into database primitives including joins, sorts, merges, and filters. -Motif decomposes graphs into small building blocks called motifs and systematically combines them using scalable relational operations. By leveraging mature, optimized libraries from the NVIDIA RAPIDS ecosystem and Pandas framework, our solution achieves massive parallelism while remaining portable across systems supporting standard relational primitives. Benchmarks show that -Motif outperforms established algorithms like VF2, achieving speedups of up to on GPUs. We further demonstrate its impact by applying it to quantum circuit compilation, addressing a critical bottleneck in quantum computing and enabling scaling to near- and medium-term devices. Our approach democratizes high-performance graph processing by exposing it through familiar database abstractions, eliminating the need for low-level programming while delivering exceptional computational efficiency.

Paper Structure

This paper contains 25 sections, 6 figures, 2 tables, 2 algorithms.

Figures (6)

  • Figure 1: (a) Heavy-hex and (b) 2D square grid lattice structures used as data graphs in our benchmark tests. These lattices represent common qubit connectivity topologies in quantum hardware and serve as the input data graphs for quantum layout selection. The corresponding set of representative motifs is shown in (c).
  • Figure 2: A motivating example illustrating subgraph isomorphism: (a) the input data graph and (b) the pattern graph. The decomposition uses two motifs, $M_2$ and $M_4$, along with (c) their corresponding isomorphic embeddings in the data graph, $Res(M_2)$ and $Res(M_4)$. Panel (d) shows two possible decompositions of the pattern graph using $M_4$. Both are valid, but for this example, we use the second decomposition to demonstrate the workflow. Panels (e) and (f) visualize the join and filter operations in tabular form, which are used to reconstruct valid matches of the pattern graph from motif embeddings. The tables are color-coded to distinguish $Res(M_4)_L$ and $Res(M_4)_R$. The two join key constraints, labeled $C1$ and $C2$, are highlighted with arrows pointing to their corresponding columns.
  • Figure 3: Wall-clock runtimes and speedups for enumerating all $M_{3\text{-}O}$ subgraphs. The x-axis lists the target graphs (see Table \ref{['tab:large_graphs']}). Panel (a) reports end-to-end runtimes (data preparation + computation) for $\Delta$-Motif on GPU, GSI and VF2 on CPU. Panel (b) shows the corresponding speedups, computed as $T_{\text{VF2}} / T_{\text{GSI}}$ and $T_{\text{VF2}} / T_{\Delta\text{-Motif}}$.
  • Figure 4: Performance comparison on two data graph topologies: (a)–(c) heavy-hex lattice (4,485 nodes) and (d)–(f) 2D square grid (3,600 nodes), using 50 random 60-node pattern graphs. Panels show (a)(d) total execution time, (b)(e) speedup relative to VF2, and (c)(f) number of decomposition iterations. Bars represent mean values, with error bars indicating the minimum and maximum. Results are reported for VF2 and $\Delta$-Motif on CPU and GPU, as well as $\Delta$-Motif GPU$^*$ with data preparation excluded. GSI did not complete when the pattern graph had 60 vertices.
  • Figure 5: Speedup of $\Delta$-Motif over VF2 for two data graph configurations: (a) heavy-hex lattice with 4,485 nodes and (b) 2D square grid with 3,600 nodes. Results are shown for $\Delta$-Motif on CPU, GPU, and GPU with data preparation excluded (denoted GPU$^*$). The x-axis indicates the number of isomorphic solutions, and the y-axis shows the speedup relative to VF2. Each point corresponds to a distinct 60-node random pattern graph generated from one of 200 random seeds.
  • ...and 1 more figures