The Weisfeiler-Leman (WL) dimension of a graph parameter $f$ is the minimum $k$ such that, if $G_1$ and $G_2$ are indistinguishable by the $k$-dimensional WL-algorithm then $f(G_1)=f(G_2)$. The WL-dimension of $f$ is $\infty$ if no such $k$ 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 $G$ to the number of answers of $\varphi$ in $G$. 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 $\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 $\mathsf{sew}(\varphi)$.
翻译:图参数$f$的Weisfeiler-Leman (WL) 维数是满足如下条件的最小整数$k$:如果图$G_1$和$G_2$无法被$k$维WL算法区分,则$f(G_1)=f(G_2)$。若不存在这样的$k$,则$f$的WL维数为$\infty$。本文研究由图中固定合取查询的答案数量所刻画的图参数的WL维数。给定合取查询$\varphi$,我们量化将每个图$G$映射到$\varphi$在$G$中答案数量的函数的WL维数。Dvořák (J. Graph Theory 2010)、Dell、Grohe和Rattan (ICALP 2018) 以及Neuen (ArXiv 2023) 的工作已对全合取查询(即不含存在量化变量的合取查询)回答了该问题。对于此类查询$\varphi$,WL维数等于$\varphi$的Gaifman图的树宽。本文给出适用于所有合取查询的特征刻画。给定任意合取查询$\varphi$,我们证明其WL维数等于语义扩张宽度$\mathsf{sew}(\varphi)$——一种新颖的宽度度量,可视为$\varphi$的树宽与量化星型大小(Durand和Mengel (ICDT 2013) 引入的不变量,描述$\varphi$的存在量化变量与自由变量之间的连接方式)的组合。利用Morris等人 (AAAI 2019) 近期建立的WL算法与高阶图神经网络 (GNN) 之间的等价性,我们得到如下推论:计数合取查询$\varphi$答案的函数无法被阶数小于$\mathsf{sew}(\varphi)$的GNN计算。