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$.
翻译:暂无翻译