atlas

Research map / Graph learning / Graph algorithms and clustering

SAT-Based Algorithms for Regular Graph Pattern Matching

AAAI 2024 · Graph learning › Graph algorithms and clustering · approach: Optimization algorithms for graph matching · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Regular Graph Patterns (ReGaP), a generalization of graph isomorphism with wildcard nodes for variable-length sequences and subgraphs, matched via a SAT encoding plus a node-merging preprocessing step, evaluated on control-flow graphs from CodeSearchNet.

Problem

Graph isomorphism only tests strict equality, and approximate graph matching and regular-path queries cannot express complex structural properties such as arbitrary-length sequences followed by arbitrary subgraphs, which is needed for code pattern detection.

Approach

Define Regular Graph Patterns with any-0+/1+ sequence and subgraph wildcards, decide matching by expanding wildcards into bounded copies and encoding the mapping to CNF for a SAT solver, and shrink the graph beforehand by merging nodes that cannot match any non-wildcard pattern node.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add node merging preprocessing (ablation)SAT-based ReGaP matcher · CodeSearchNet graphs and evaluated ReGaPsnumber of SAT clauses: 25.7% less clausesHelped
add node merging preprocessing (ablation)SAT-based ReGaP matcher · CodeSearchNet graphs and evaluated ReGaPsinstances solved in less than 10 seconds: 42 498 more instancesHelped
add node merging preprocessing (ablation)SAT-based ReGaP matcher · CodeSearchNet graphs and evaluated ReGaPstimeouts: 34 110 -> 26 487Helped
add node merging preprocessing (ablation)SAT-based ReGaP matcher · CodeSearchNet graphs and evaluated ReGaPstimeouts on instances solved by the base encoding: 940 instancesHurt
increase the number of wildcardsSAT-based ReGaP matcher without node merging · CodeSearchNet graphs and evaluated ReGaPsaverage execution time (s)Mixed

Surprising findings

Limitations

Experimental setup

Datasets: CodeSearchNet

Benchmarks: CodeSearchNet control-flow graphs (946,556 instances)

Metrics: execution time timeouts encoding size (variables and clauses)

Baselines: Glucose (no node merging, base encoding)

Builds on: maximum common subgraph SAT encoding conflict-driven clause learning

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy