Explaining Inference Queries with Bayesian Optimization
Brandon Lockhart, Jinglin Peng, Weiyuan Wu, Jiannan Wang, Eugene Wu
Abstract
Obtaining an explanation for an SQL query result can enrich the analysis experience, reveal data errors, and provide deeper insight into the data. Inference query explanation seeks to explain unexpected aggregate query results on inference data; such queries are challenging to explain because an explanation may need to be derived from the source, training, or inference data in an ML pipeline. In this paper, we model an objective function as a black-box function and propose BOExplain, a novel framework for explaining inference queries using Bayesian optimization (BO). An explanation is a predicate defining the input tuples that should be removed so that the query result of interest is significantly affected. BO --- a technique for finding the global optimum of a black-box function --- is used to find the best predicate. We develop two new techniques (individual contribution encoding and warm start) to handle categorical variables. We perform experiments showing that the predicates found by BOExplain have a higher degree of explanation compared to those found by the state-of-the-art query explanation engines. We also show that BOExplain is effective at deriving explanations for inference queries from source and training data on a variety of real-world datasets. BOExplain is open-sourced as a Python package at https://github.com/sfu-db/BOExplain.
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.
Cited by top-tier papers4
- XInsight: eXplainable Data Analysis Through The Lens of CausalityPingchuan Ma, Rui Ding, Shuai Wang, Shi Han et al.SIGMOD 2023 · 20 citations
- On Explaining Confounding BiasBrit Youngmann, Michael J. Cafarella, Yuval Moskovitch, Babak SalimiICDE 2023 · 7 citations
- Stress-Testing ML Pipelines with Adversarial Data CorruptionJiongli Zhu, Geyang Xu, Felipe Lorenzi, Boris Glavic et al.VLDB 2025 · 2 citations
- SDEcho: Efficient Explanation of Aggregated Sequence DifferenceFei Ye, Zikang Liu, Xi Zhang, Yinan Jing et al.VLDB 2025
Builds on4
- Bayesian Optimisation over Multiple Continuous and Categorical InputsBin Xin Ru, Ahsan S. Alvi, Vu Nguyen, Michael A. Osborne et al.ICML 2020 · 119 citations
- Bayesian Optimization for Categorical and Category-Specific Continuous InputsDang Nguyen, Sunil Gupta, Santu Rana, Alistair Shilton et al.AAAI 2020 · 59 citations
- Looking for Trouble: Analyzing Classifier Behavior via Pattern DivergenceEliana Pastor, Luca de Alfaro, Elena BaralisSIGMOD 2021 · 51 citations
- Complaint-driven Training Data Debugging for Query 2.0Weiyuan Wu, Lampros Flokas, Eugene Wu, Jiannan WangSIGMOD 2020 · 36 citations
Related papers
- Putting Things into Context: Rich Explanations for Query Answers using Join GraphsChenjie Li, Zhengjie Miao, Qitian Zeng, Boris Glavic et al.SIGMOD 2021 · 16 citations
- To Not Miss the Forest for the Trees - A Holistic Approach for Explaining Missing Answers over Nested DataRalf Diestelkämper, Seokki Lee, Melanie Herschel, Boris GlavicSIGMOD 2021 · 15 citations
- Predicate Pushdown for Data Science PipelinesCong Yan, Yin Lin, Yeye HeSIGMOD 2023 · 15 citations
- OBELISK: Efficient Offline Query Planning with Bayesian Optimization-Informed Language Model ReasoningZhicheng Pan, Wenwen Sun, Yuanjia Zhang, Terence Purcell et al.VLDB 2026
- Optimizing Machine Learning Inference Queries with Correlative Proxy ModelsZhihui Yang, Zuozhi Wang, Yicong Huang, Yao Lu et al.VLDB 2022 · 33 citations
