The Weisfeiler-Leman dimension of a graph $G$ is the least number $k$ such that the $k$-dimensional Weisfeiler-Leman algorithm distinguishes $G$ from every other non-isomorphic graph. The dimension is a standard measure of the descriptive complexity of a graph and recently finds various applications in particular in the context of machine learning. In this paper, we study the computational complexity of computing the Weisfeiler-Leman dimension. We observe that in general the problem of deciding whether the Weisfeiler-Leman dimension of $G$ is at most $k$ is NP-hard. This is also true for the more restricted problem with graphs of color multiplicity at most 4. Therefore, we study parameterized and approximate versions of the problem. We give, for each fixed $k\geq 2$, a polynomial-time algorithm that decides whether the Weisfeiler-Leman dimension of a given graph of color multiplicity at most $5$ is at most $k$. Moreover, we show that for these color multiplicities this is optimal in the sense that this problem is P-hard under logspace-uniform $\text{AC}_0$-reductions. Furthermore, for each larger bound $c$ on the color multiplicity and each fixed $k \geq 2$, we provide a polynomial-time approximation algorithm for the abelian case: given a relational structure with abelian color classes of size at most $c$, the algorithm outputs either that its Weisfeiler-Leman dimension is at most $(k+1)c$ or that it is larger than $k$.
翻译:图 $G$ 的 Weisfeiler-Leman 维数是使得 $k$ 维 Weisfeiler-Leman 算法能将 $G$ 与所有其他非同构图区分开的最小整数 $k$。该维数是衡量图描述复杂度的标准指标,近年来尤其在机器学习领域中得到广泛应用。本文研究计算 Weisfeiler-Leman 维数的计算复杂度。我们发现,一般情况下,判定图 $G$ 的 Weisfeiler-Leman 维数是否不超过 $k$ 是 NP 难的。即使对于颜色重数至多为 4 的图这一更受限问题,结论同样成立。因此,我们研究该问题的参数化版本与近似版本。对于每个固定的 $k \geq 2$,我们给出一个多项式时间算法,能判定给定颜色重数至多为 5 的图的 Weisfeiler-Leman 维数是否不超过 $k$。此外,我们证明对于这些颜色重数,该结果在以下意义下是最优的:该问题在 logspace 一致的 $\text{AC}_0$ 归约下是 P 难的。进一步地,对于颜色重数的每个更大上界 $c$ 以及每个固定的 $k \geq 2$,我们针对阿贝尔情形提供多项式时间近似算法:给定一个具有大小至多为 $c$ 的阿贝尔颜色类的关系结构,该算法输出其 Weisfeiler-Leman 维数要么不超过 $(k+1)c$,要么大于 $k$。