论文标题
使用相关代理模型优化机器学习推理查询
Optimizing Machine Learning Inference Queries with Correlative Proxy Models
论文作者
论文摘要
我们考虑在非结构化数据集上加速机器学习(ML)推理查询。昂贵的运算符(例如提取器和分类器)被部署为用户定义的功能(UDF),这些功能(UDF)无法通过经典的查询优化技术(例如谓词按下)渗透。最近的优化方案(例如,概率谓词或PP)假定查询谓词之间的独立性,为每个谓词离线建立一个代理模型,并通过在昂贵的ML UDF的前面注入这些廉价的代理模型来重写新的查询。以这样的方式,不满足的查询谓词的不太可能输入会提早过滤以绕过ML UDF。我们表明,在这种情况下执行独立性假设可能会导致次优计划。在本文中,我们提出了Core,这是一种查询优化器,可以更好地利用谓词相关性并加速ML推理查询。我们的解决方案在线建立代理模型以进行新的查询,并利用分支机构和结合的搜索过程来降低建筑物的成本。与PP相比,与运行查询相比,三个现实世界文本,图像和视频数据集的结果表明,核心将查询吞吐量提高了63%,高达80%。
We consider accelerating machine learning (ML) inference queries on unstructured datasets. Expensive operators such as feature extractors and classifiers are deployed as user-defined functions(UDFs), which are not penetrable with classic query optimization techniques such as predicate push-down. Recent optimization schemes (e.g., Probabilistic Predicates or PP) assume independence among the query predicates, build a proxy model for each predicate offline, and rewrite a new query by injecting these cheap proxy models in the front of the expensive ML UDFs. In such a manner, unlikely inputs that do not satisfy query predicates are filtered early to bypass the ML UDFs. We show that enforcing the independence assumption in this context may result in sub-optimal plans. In this paper, we propose CORE, a query optimizer that better exploits the predicate correlations and accelerates ML inference queries. Our solution builds the proxy models online for a new query and leverages a branch-and-bound search process to reduce the building costs. Results on three real-world text, image and video datasets show that CORE improves the query throughput by up to 63% compared to PP and up to 80% compared to running the queries as it is.