GenSQL: A Probabilistic Programming System for Querying Generative Models of Database Tables
Author(s)
Huot, Mathieu; Ghavami, Matin; Lew, Alexander K.; Schaechtle, Ulrich; Freer, Cameron E.; Shelby, Zane; Rinard, Martin C.; Saad, Feras A.; Mansinghka, Vikash K.; ... Show more Show less
Download3656409.pdf (2.853Mb)
Publisher with Creative Commons License
Publisher with Creative Commons License
Creative Commons Attribution
Terms of use
Metadata
Show full item recordAbstract
We present 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. This enables using models written in a variety of probabilistic programming languages tailored to specific workflow. Probabilistic models may be automatically learned via probabilistic program synthesis, hand-designed, or a combination of both. We formalize GenSQL using a novel type system and denotational semantics; together, these enable us to establish proofs that precisely characterize its soundness guarantees. We evaluate our system on two case studies, an anomaly detection in clinical trials and conditional synthetic data generation for a virtual wet lab, and show that GenSQL captures much more accurately the complexity of the data compared to GLM and CTGAN baselines. We show that GenSQL’s declarative syntax is more concise and less error-prone 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.
Date issued
2024-06-20Journal
Proceedings of the ACM on Programming Languages
Publisher
Association for Computing Machinery
Citation
Huot, Mathieu, Ghavami, Matin, Lew, Alexander K., Schaechtle, Ulrich, Freer, Cameron E. et al. 2024. "GenSQL: A Probabilistic Programming System for Querying Generative Models of Database Tables." Proceedings of the ACM on Programming Languages, 8 (PLDI).
Version: Final published version
ISSN
2475-1421
Collections
The following license files are associated with this item: