paperbot · PL 论文追踪

全部论文 待读 收藏

P2 GenSQL: A Probabilistic Programming System for Querying Generative Models of Database Tables

GenSQL:一个用于查询数据库表生成模型的概率编程系统
PLDI 8(PLDI)2024匹配度 3/10 · 该论文属于概率编程与贝叶斯推断系统,包含类型系统和指称语义,形式上与 PL 理论偏好有交集;但其核心是数据库表格生成模型的查询,与静态分析、Agentic/LLM、浮点程序分析以及贝叶斯程序分析和 LLM 的交叉都较远。引用 8 inbox
Mathieu Huot, Matin Ghavami, Alexander K. Lew, Ulrich Schaechtle, Cameron E. Freer, Zane Shelby, Martin C. Rinard, Feras A. Saad, Vikash K. Mansinghka
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:在 SQL 上增加少量概率查询原语,构建可查询表格数据生成模型的概率编程系统 GenSQL,并给出类型系统、指称语义与可靠性证明。

GenSQL 是一个用于查询数据库表概率生成模型的概率编程系统。它只在 SQL 上增加少量关键原语,就能简洁地表达复杂的贝叶斯推断工作流。其查询规划器基于统一的编程接口与表格数据概率模型交互,从而可复用多种面向特定工作流的概率编程语言所编写的模型;模型可经概率程序合成自动学习、人工设计,或两者结合。作者用新的类型系统与指称语义对 GenSQL 进行形式化,并据此证明其可靠性保证。在临床试验异常检测与虚拟湿实验室条件合成数据两个真实案例中,GenSQL 比常见基线更准确地刻画数据复杂性,其声明式语法比若干替代方案更简洁、更不易出错;在代表性基准集上,它比最接近的竞品快 1.7–6.8 倍,运行时间与手写代码相当,部分得益于可复用的优化与代码特化。

问题
如何让用户以声明式查询的方式,对数据库表的概率生成模型实施复杂的贝叶斯推断工作流,并复用用不同概率编程语言编写的模型。
方法
在 SQL 上扩展少量概率查询原语,设计统一的概率模型编程接口与查询规划器(含可复用优化和代码特化),并用新的类型系统与指称语义对其形式化,以证明可靠性保证。
评估
在临床试验异常检测与虚拟湿实验室条件合成数据两个真实案例上与常见基线对比精度,并评估声明式语法的简洁性与易错性,以及在代表性基准集上相对最接近竞品的加速比(1.7–6.8 倍)和与手写代码相当的运行时间。
原文摘要(Abstract)

This article presents GenSQL, a probabilistic programming system for querying probabilistic generative models of database tables. By augmenting SQL with only a few key primitives for querying probabilistic models, GenSQL enables complex Bayesian inference workflows to be concisely implemented. GenSQL’s query planner rests on a unified programmatic interface for interacting with probabilistic models of tabular data, which makes it possible to use models written in a variety of probabilistic programming languages that are tailored to specific workflows. Probabilistic models may be automatically learned via probabilistic program synthesis, hand-designed, or a combination of both. GenSQL is formalized using a novel type system and denotational semantics, which together enable us to establish proofs that precisely characterize its soundness guarantees. We evaluate our system on two case real-world studies—an anomaly detection in clinical trials and conditional synthetic data generation for a virtual wet lab—and show that GenSQL more accurately captures the complexity of the data as compared to common baselines. We also show that the declarative syntax in GenSQL is more concise and less error-prone as compared to several alternatives. Finally, GenSQL delivers a 1.7-6.8x speedup compared to its closest competitor on a representative benchmark set and runs in comparable time to hand-written code, in part due to its reusable optimizations and code specialization.

链接与引用

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

BibTeX
@article{HuotGLSFSRSM24,
  title = {GenSQL: A Probabilistic Programming System for Querying Generative Models of Database Tables},
  author = {Mathieu Huot and Matin Ghavami and Alexander K. Lew and Ulrich Schaechtle and Cameron E. Freer and Zane Shelby and Martin C. Rinard and Feras A. Saad and Vikash K. Mansinghka},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656409}
}