Machine Learning Inference Pipeline Execution Using Pure SQL Based on Operator Fusion
Qingfeng Pan, Jiahe Zhi, Chenyang Zhang, Chen Xu, Zhao Zhang, Anita Shao, Guanglei Bao, Qiu Cui, Xiaowei Chen, Aoying Zhou
摘要
Deploying machine learning (ML) inference pipelines in databases become increasingly prevalent in many applications. In order to avoid data transfer between the database and ML runtimes, existing ML2SQL frameworks parse ML pipelines to a graph consisting of ML operators and then translate it into pure SQL. Nevertheless, they typically rewrite the graph without operator fusion or only consider the fusion between certain operators such as StandardScaler and tree inference. However, there are various operators in ML pipelines, which have rich fusion opportunities between each other. To fully exploit operator fusion for graph rewriting, we classify widely used ML operators and design fusion rules driven by their characteristics. Moreover, rewriting the original graph by fusion rules produces candidate graphs that generate SQLs with different execution time. We employ an enumeration-based strategy to search for the graph with the lowest cost. However, this strategy may suffer from the combination explosion on search space for complex ML pipelines. To reduce this space, we propose a greedy-based strategy by exploiting the independence among ML operators. We implement a novel ML2SQL framework as a portable plugin for databases, namely Craftsman. Our experimental evaluations show that, in comparison to the existing approaches, Craftsman generates efficient SQL queries which achieves an average speedup of 2.9x on popular databases such as DuckDB.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
引用它的顶会 Paper1
问问它们各自怎么用它相关 Paper
- InferDB: In-Database Machine Learning Inference Using IndexesRicardo Salazar-Díaz, Boris Glavic, Tilmann RablVLDB 2024 · 被引用 13 次
- EncoderForge: Generating Efficient SQL for Encoders in Machine Learning Inference PipelinesQingfeng Pan, Qingyuan Jing, Chenyang Zhang, Jiahe Zhi 等SIGMOD 2026
- Eliminating Redundant Feature Tests in Decision Tree and Random Forest Inference on SQL PredicatesMingxi Liu, Zhengyuan Ding, Chenyang Zhang, Qingfeng Pan 等SIGMOD 2026
- Mitigating the Impedance Mismatch between Prediction Query Execution and Database EngineChenyang Zhang, Junxiong Peng, Chen Xu, Quanqing Xu 等SIGMOD 2025 · 被引用 7 次
- End-to-end Optimization of Machine Learning Prediction QueriesKwanghyun Park, Karla Saur, Dalitso Banda, Rathijit Sen 等SIGMOD 2022 · 被引用 50 次
