End-to-end Optimization of Machine Learning Prediction Queries
Kwanghyun Park, Karla Saur, Dalitso Banda, Rathijit Sen, Matteo Interlandi, Konstantinos Karanasos
Abstract
Prediction queries are widely used across industries to perform advanced analytics and draw insights from data. They include a data processing part (e.g., for joining, filtering, cleaning, featurizing the datasets) and a machine learning (ML) part invoking one or more trained models to perform predictions. These parts have so far been optimized in isolation, leaving significant opportunities for optimization unexplored. We present Raven, a production-ready system for optimizing prediction queries. Raven follows the enterprise architectural trend of collocating data and ML runtimes. It relies on a unified intermediate representation that captures both data and ML operators in a single graph structure to unlock two families of optimizations. First, it employs logical optimizations that pass information between the data part (and the properties of the underlying data) and the ML part to optimize each other. Second, it introduces logical-to-physical transformations that allow operators to be executed on different run-times (relational, ML, and DNN) and hardware (CPU, GPU). Novel data-driven optimizations determine the runtime to be used for each part of the query to achieve optimal performance. Our evaluation shows that Raven is able to improve performance of prediction queries on Apache Spark and SQL Server by up to 13.1x and 330x, respectively. Finally, for complex models where GPU acceleration is beneficial, Raven provides up to 8× speedup compared to state-of-the-art systems.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0b15e163-e0f2-4fbd-9899-edc59bdb9f5dCited by top-tier papers16
- SkyPilot: An Intercloud Broker for Sky ComputingZongheng Yang, Zhanghao Wu, Michael Luo, Wei-Lin Chiang et al.NSDI 2023 · 135 citations
- Automating and Optimizing Data-Centric What-If Analyses on Native Machine Learning PipelinesStefan Grafberger, Paul Groth, Sebastian SchelterSIGMOD 2023 · 18 citations
- Containerized Execution of UDFs: An Experimental EvaluationKarla Saur, Tara Mirmira, Konstantinos Karanasos, Jesús Camacho-RodríguezVLDB 2022 · 14 citations
- InferDB: In-Database Machine Learning Inference Using IndexesRicardo Salazar-Díaz, Boris Glavic, Tilmann RablVLDB 2024 · 13 citations
- Quantum Data Management in the NISQ EraRihan Hai, Shih-Han Hung, Tim Coopmans, Tim Littau et al.VLDB 2025 · 10 citations
Builds on8
- A Tensor Compiler for Unified Machine Learning Prediction ServingSupun Nakandala, Karla Saur, Gyeong-In Yu, Konstantinos Karanasos et al.OSDI 2020 · 60 citations
- Jointly Optimizing Preprocessing and Inference for DNN-based Visual AnalyticsDaniel Kang, Ankit Mathur, Teja Veeramacheneni, Peter Bailis et al.VLDB 2021 · 50 citations
- Tensors: An abstraction for general data processingDimitrios Koutsoukos, Supun Nakandala, Konstantinos Karanasos, Karla Saur et al.VLDB 2021 · 38 citations
- Pushing Data-Induced Predicates Through Joins in Big-Data ClustersLaurel J. Orr, Srikanth Kandula, Surajit ChaudhuriVLDB 2020 · 35 citations
- Distributed Deep Learning on Data Systems: A Comparative Analysis of ApproachesYuhao Zhang, Frank Mcquillan, Nandish Jayaram, Nikhil Kak et al.VLDB 2021 · 35 citations
Related papers
- Mitigating the Impedance Mismatch between Prediction Query Execution and Database EngineChenyang Zhang, Junxiong Peng, Chen Xu, Quanqing Xu et al.SIGMOD 2025 · 7 citations
- Towards Automatic and Efficient Prediction Query Processing in Analytical DatabaseYuchen Peng, Zhongle Xie, Ke Chen, Gang Chen et al.ICDE 2025 · 3 citations
- Aero: Adaptive Query Processing of ML QueriesGaurav Tarlok Kakkar, Jiashen Cao, Aubhro Sengupta, Joy Arulraj et al.SIGMOD 2025 · 2 citations
- Query Processing on Tensor Computation RuntimesDong He, Supun Chathuranga Nakandala, Dalitso Banda, Rathijit Sen et al.VLDB 2022 · 54 citations
- Optimizing Machine Learning Inference Queries with Correlative Proxy ModelsZhihui Yang, Zuozhi Wang, Yicong Huang, Yao Lu et al.VLDB 2022 · 33 citations
