揭示了查询相关性判断变难的根源,并给出高效计算条件。
How Hard is it to Decide if a Fact is Relevant to a Query?
- 发现自连接是导致相关性判断困难的关键因素
- 禁止或限制自连接后,相关性复杂度与查询评估一致
- 适用于需解释查询结果的数据库系统开发者
我们研究一个基础问题:给定数据库D、布尔型可满足性查询q,以及D中的事实f,判断f是否对q相关,即f是否属于某个最小子集S,使得S蕴含q。尽管该问题在查询解释中至关重要,其联合复杂度仍未被充分研究,导致难以明确其困难来源及可降低复杂度的约束条件。已有研究显示,相关性比查询评估更难——对于任意关系符号的连结查询(CQ),其复杂度为Σ²ₚ完全。本文进一步证明,即使对于无环链式查询,相关性仍是NP难。我们发现自连接(同一关系的多个原子)是问题变难的根源。若禁止或限制自连接,则相关性复杂度与查询评估相同:无结构限制时为NP,有界超树宽类时为LogCFL。在本体设置下,针对由连结查询和DL-Lite_R本体组成的本体中介查询,若限制交互宽度(推广了自连接宽度与最近提出的‘无交互’条件),则相关性复杂度不高于查询回答。因此,我们的结果精确指出了相关性比查询评估更难的原因,并识别出可高效计算相关性的自然查询类别。
原文摘要 · Abstract (English)
We consider the following fundamental problem: given a database D, Boolean conjunctive query (CQ) q, and fact f in D, decide whether f is relevant to q wrt. D, i.e., does f belong to a minimal subset S of D such that S |= q. Despite being of central importance to query answer explanation, the combined complexity of deciding query relevance has not been studied in detail, leaving open what makes this problem hard, and which restrictions can yield lower complexity. Relevance has already been shown to be harder than query evaluation: namely, $Σ^p_2$-complete for CQs, even over a binary signature. We further observe that NP-hardness applies already to (acyclic) chain CQs. Our work identifies self-joins (multiple atoms with the same relation) as the culprit. Indeed, we prove that if we forbid or bound the occurrence of self-joins, then relevance has the same complexity as query evaluation, namely, NP (without structural restrictions) and LogCFL (for bounded hypertreewidth classes). In the ontology setting, we establish an analogous result for ontology-mediated queries consisting of a CQ and DL-Lite_R ontology, namely that relevance is no harder than query answering provided that we bound the interaction width (which generalizes both self-join width and a recently introduced 'interaction-free' condition). Our results thus pinpoint what makes relevance harder than query evaluation and identify natural classes of queries which admit efficient relevance computation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。