arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.04606cs.DBcs.LO
收藏

数据库查询中参数的重要性

The Importance of Parameters in Database Queries

Amir Gilad, Martin Grohe, Benny Kimelfeld, Peter Lindner, Christoph Standke

AI总结:

本文提出基于SHAP分数的框架量化数据库查询中参数值选择对结果的重要性,设计了多项式时间算法计算无环合取查询的SHAP分数,并扩展至参数化过滤器与“为什么没有”解释应用。

摘要:

我们提出并研究了一个框架,用于量化参数值的选择对数据库查询结果的重要性。这些参数在逻辑查询(例如合取查询)中作为常量出现。在我们的框架中,参数的重要性由其 SHAP 分数衡量——这是博弈论 Shapley 值在机器学习模型中用于衡量特征值重要性的一种流行实例。我们通过解释 SHAP 背后的直觉,并展示在两种不同的、看似对立的量化参数贡献的方法中都能得出该分数,从而论证了使用该分数的合理性。应用 SHAP 除了需要查询和数据库外,还需要两个组件:(a) 参数值组合上的概率分布,以及 (b) 衡量原始参数结果与假设参数结果之间相似度的效用函数。本文探讨的主要问题是针对不同分布和相似度度量计算 SHAP 分数的复杂性。具体而言,我们针对某些(自然的)相似度函数,为完全无环合取查询的情况设计了多项式时间算法。我们将结果扩展到带有参数化过滤器(例如变量与参数之间的不等式)的合取查询。我们还展示了将结果应用于“为什么没有”解释(旨在解释查询答案缺失的原因),其中我们考虑量化查询组件对消除所考虑的非答案的贡献的任务。最后,我们讨论了针对相关参数情况的一种简单近似技术。

英文摘要:

We propose and study a framework for quantifying the importance of the choices of parameter values to the result of a query over a database. These parameters occur as constants in logical queries, such as conjunctive queries. In our framework, the importance of a parameter is its SHAP score - a popular instantiation of the game-theoretic Shapley value to measure the importance of feature values in machine learning models. We make the case for the rationale of using this score by explaining the intuition behind SHAP, and by showing that we arrive at this score in two different, apparently opposing, approaches to quantifying the contribution of a parameter. The application SHAP requires two components in addition to the query and the database: (a) a probability distribution over the combinations of parameter values, and (b) a utility function that measures the similarity between the result for the original parameters and the result for hypothetical parameters. The main question addressed in the paper is the complexity of calculating the SHAP score for different distributions and similarity measures. In particular, we devise polynomial-time algorithms for the case of full acyclic conjunctive queries for certain (natural) similarity functions. We extend our results to conjunctive queries with parameterized filters (e.g., inequalities between variables and parameters). We also illustrate the application of our results to "why-not" explanations (aiming to explain the absence of a query answer), where we consider the task of quantifying the contribution of query components to the elimination of a non-answer in consideration. Finally, we discuss a simple approximation technique for the case of correlated parameters.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑