There is a growing demand for supporting inference queries that combine Structured Query Language (SQL) and Artificial Intelligence / Machine Learning (AI/ML) model inferences in database systems, to avoid data denormalization and transfer, facilitate management, and alleviate privacy concerns. Co-optimization techniques for executing inference queries in database systems without accuracy loss fall into four categories: (O1) Relational algebra optimization treating AI/ML models as black-box user-defined functions (UDFs); (O2) Factorized AI/ML inferences; (O3) Tensor-relational transformation; and (O4) General cross-optimization techniques. However, we found none of the existing database systems support all these techniques simultaneously, resulting in suboptimal performance. In this work, we identify two key challenges to address the above problem: (1) the difficulty of unifying all co-optimization techniques that involve disparate data and computation abstractions in one system; and (2) the lack of an optimizer that can effectively explore the exponential search space. To address these challenges, we present CactusDB, a novel system built atop Velox - a high-performance, UDF-centric database engine, open-sourced by Meta. CactusDB features a three-level Intermediate Representations (IR) that supports relational operators, expression operators, and ML functions to enable flexible optimization of arbitrary sub-computations. Additionally, we propose a novel Monte-Carlo Tree Search (MCTS)-based optimizer with query embedding, co-designed with our unique three-level IR, enabling shared and reusable optimization knowledge across different queries. Evaluation of 12 representative inference workloads and 2,000 randomly generated inference queries on well-known datasets, such as MovieLens and TPCx-AI, shows that CactusDB achieves up to 441 times speedup compared to alternative systems.


翻译:在数据库系统中,支持结合结构化查询语言(SQL)与人工智能/机器学习(AI/ML)模型推理的查询需求日益增长,这有助于避免数据反规范化与传输、简化管理并缓解隐私担忧。在数据库系统中执行此类推理查询且不损失准确性的协同优化技术可分为四类:(O1)将AI/ML模型视为黑盒用户定义函数(UDF)的关系代数优化;(O2)因子化AI/ML推理;(O3)张量-关系转换;以及(O4)通用的交叉优化技术。然而,我们发现现有数据库系统均无法同时支持所有这些技术,导致性能未能达到最优。在本工作中,我们识别出解决上述问题的两个关键挑战:(1)在单一系统中统一涉及异构数据与计算抽象的协同优化技术存在困难;(2)缺乏能有效探索指数级搜索空间的优化器。为应对这些挑战,我们提出了CactusDB——一个构建于Meta开源的高性能、以UDF为中心的数据库引擎Velox之上的新型系统。CactusDB采用三层中间表示(IR),支持关系运算符、表达式运算符及ML函数,从而实现对任意子计算的灵活优化。此外,我们提出了一种基于蒙特卡洛树搜索(MCTS)的新型优化器,结合查询嵌入技术,并与我们独特的三层IR协同设计,实现了跨不同查询的共享与可复用优化知识。在MovieLens和TPCx-AI等知名数据集上对12个代表性推理工作负载及2,000个随机生成的推理查询进行评估的结果表明,CactusDB相比其他系统最高可实现441倍的加速。

0
下载
关闭预览

相关内容

人工智能杂志AI(Artificial Intelligence)是目前公认的发表该领域最新研究成果的主要国际论坛。该期刊欢迎有关AI广泛方面的论文,这些论文构成了整个领域的进步,也欢迎介绍人工智能应用的论文,但重点应该放在新的和新颖的人工智能方法如何提高应用领域的性能,而不是介绍传统人工智能方法的另一个应用。关于应用的论文应该描述一个原则性的解决方案,强调其新颖性,并对正在开发的人工智能技术进行深入的评估。 官网地址:http://dblp.uni-trier.de/db/journals/ai/
【SIGMOD2021】数据库与人工智能交叉技术综述
专知会员服务
70+阅读 · 2021年7月14日
【机器推理可解释性】Machine Reasoning Explainability
专知会员服务
35+阅读 · 2020年9月3日
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
孟小峰:机器学习与数据库技术融合
计算机研究与发展
14+阅读 · 2018年9月6日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月2日
VIP会员
相关VIP内容
【SIGMOD2021】数据库与人工智能交叉技术综述
专知会员服务
70+阅读 · 2021年7月14日
【机器推理可解释性】Machine Reasoning Explainability
专知会员服务
35+阅读 · 2020年9月3日
相关基金
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员