paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Geo: A Query Rewrite Framework for Graph Pattern Mining

Geo:面向图模式挖掘的查询重写框架
OOPSLA 10(OOPSLA1)2026匹配度 2/10 · 该论文研究图模式挖掘中的查询重写与等价饱和优化,属于PL/编译器与DSL方向,但未涉及LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,与用户核心交叉方向不匹配。引用 0 inbox
Nazanin Yousefian, Kasra Jamshidi, Keval Vora, Anders Miltner
crossref: 2026-09-10

AI 速览

一句话:提出可编程查询优化框架 Geo,用重写规则与等价饱和自动组合图模式等价,并保持结果正确与可重构。

图模式挖掘通常需要回答模式匹配查询,其中子图同构问题是 NP 完全的。领域专家常基于模式间的子结构相似性手写优化器,但模式的子对称等复杂结构性质使优化器开发困难,也限制了不同优化策略的交互探索与持续扩展。本文提出可编程模式匹配查询优化器 Geo,它提供简洁而灵活的语言,将模式等价表示为重写规则,并自动管理规则间交互、保证结果正确性。Geo 在等价饱和过程中维护生成模式的规范表示,避免同构模式的语法差异问题;同时提出嵌入式可重构性 EmRec,跨等价关系跟踪 provenance,以满足不同输出的可重构需求。评估显示,Geo 能通过复杂规则组合发现新查询等价,使优化查询成本较先前工作最多降低 99%;在近似模式匹配和准团挖掘两个案例中,成本最多降低 71%。

问题
图模式挖掘依赖子图同构查询,其 NP 完全性促使领域专家开发定制优化策略;但模式的子对称等复杂结构性质使优化器开发困难,不同策略的交互难以探索,也难持续加入新的模式等价。
方法
Geo 是一个可编程模式匹配查询优化器,允许用重写规则表达模式等价;它通过等价饱和自动管理规则交互、以规范表示处理同构模式,并用 EmRec 跟踪 provenance 来保证可重构性与结果正确。
评估
实验表明 Geo 能通过规则组合发现新查询等价,使优化查询成本较先前工作最多降低 99%;在近似模式匹配与准团挖掘案例中,成本最多降低 71%。
原文摘要(Abstract)

Graph pattern mining is important for analyzing graph data. Graph mining systems typically require answering pattern matching queries, which involve solving the NP-complete subgraph isomorphism problem. To address this, domain experts often develop custom pattern matching query optimization strategies based on exploiting substructural similarities across different patterns. While these optimizers can be effective, their development is challenging due to the complex structural properties of the patterns (e.g., subsymmetries), which are difficult to address. This complexity limits the exploration of interactions between different optimization strategies and restricts experts from continuously improving the optimizers—such as by incorporating additional custom or general pattern-based equivalences over time. In this paper, we present a programmable pattern matching query optimizer called Geo , which automatically manages the interactions between various equivalences, ensures the optimizations maintain correctness of results, and simplifies the management of substructure equivalences. Geo exposes a simple but flexible language for expressing pattern equivalences as rewrite rules. By maintaining canonical representations of generated patterns during equality saturation, Geo avoids issues arising from syntactic differences in isomorphic patterns. Additionally, we develop embedded reconstructablility ( EmRec ) that tracks provenance across equivalences to ensure various reconstructability needs of desired outputs. Our evaluation demonstrates that Geo can discover novel query equivalences through complex composition of various rewrite rules, enabling our optimized queries to achieve a cost reduction of up to 99% compared to the queries in prior work. We further test Geo ’s effectiveness at speeding up practical graph mining problems by using it in two representative case studies – approximate pattern matching and quasi-clique mining, and find it is highly effective at optimizing these tasks, enabling cost reductions of up to 71%.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot3844,
  title = {Geo: A Query Rewrite Framework for Graph Pattern Mining},
  author = {Nazanin Yousefian and Kasra Jamshidi and Keval Vora and Anders Miltner},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA1},
  year = {2026},
  doi = {10.1145/3798239}
}