English

The Weisfeiler-Leman Dimension of Conjunctive Queries

Discrete Mathematics 2024-03-12 v2 Databases Logic in Computer Science

Abstract

The Weisfeiler-Leman (WL) dimension of a graph parameter ff is the minimum kk such that, if G1G_1 and G2G_2 are indistinguishable by the kk-dimensional WL-algorithm then f(G1)=f(G2)f(G_1)=f(G_2). The WL-dimension of ff is \infty if no such kk exists. We study the WL-dimension of graph parameters characterised by the number of answers from a fixed conjunctive query to the graph. Given a conjunctive query φ\varphi, we quantify the WL-dimension of the function that maps every graph GG to the number of answers of φ\varphi in GG. The works of Dvor\'ak (J. Graph Theory 2010), Dell, Grohe, and Rattan (ICALP 2018), and Neuen (ArXiv 2023) have answered this question for full conjunctive queries, which are conjunctive queries without existentially quantified variables. For such queries φ\varphi, the WL-dimension is equal to the treewidth of the Gaifman graph of φ\varphi. In this work, we give a characterisation that applies to all conjunctive qureies. Given any conjunctive query φ\varphi, we prove that its WL-dimension is equal to the semantic extension width sew(φ)\mathsf{sew}(\varphi), a novel width measure that can be thought of as a combination of the treewidth of φ\varphi and its quantified star size, an invariant introduced by Durand and Mengel (ICDT 2013) describing how the existentially quantified variables of φ\varphi are connected with the free variables. Using the recently established equivalence between the WL-algorithm and higher-order Graph Neural Networks (GNNs) due to Morris et al. (AAAI 2019), we obtain as a consequence that the function counting answers to a conjunctive query φ\varphi cannot be computed by GNNs of order smaller than sew(φ)\mathsf{sew}(\varphi).

Keywords

Cite

@article{arxiv.2310.19006,
  title  = {The Weisfeiler-Leman Dimension of Conjunctive Queries},
  author = {Andreas Göbel and Leslie Ann Goldberg and Marc Roth},
  journal= {arXiv preprint arXiv:2310.19006},
  year   = {2024}
}

Comments

39 pages, 4 figures, abstract shortened due to ArXiv requirements, an extended abstract of this work is accepted for publication in the proceedings of PODS 24