arXiv:2608.13382cs.LOAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.13382

A Dense Weisfeiler-Leman Algorithm for Deciding Bounded-Cliquewidth Homomorphism Indistinguishability

Radu Curticapean, Daniel Neuen, Amir Nikabadi, Tim Seppelt, Ben Young

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

Two graphs GG and HH are homomorphism indistinguishable over a graph class F\mathcal{F} if they admit the same number of homomorphisms from every graph in F\mathcal{F}. A wide range of relaxations of graph isomorphism arise this way: isomorphism itself over the class of all graphs [Lovász, Acta Math. Hung. 1967], equivalence under the kk-dimensional Weisfeiler–Leman algorithm over the graphs of treewidth ≤k\leq k [Dvořák, J. Graph Theory 2010], and quantum isomorphism over planar graphs [Mančinska–Roberson, FOCS 2020]. Since the class F\mathcal{F} is typically infinite, it is not clear a priori whether homomorphism indistinguishability over F\mathcal{F} is decidable; for planar graphs it is undecidable. Every class for which decidability was previously known is sparse.

We give the first decidability results for dense graph classes: We introduce the dense Weisfeiler–Leman algorithm that decides homomorphism indistinguishability over the class of graphs of cliquewidth ≤k\leq k, the dense counterpart of treewidth. This relation was not previously known to be decidable. The algorithm colors kk-tuples of vertex subsets rather than kk-tuples of vertices.

Beyond the class of all graphs of cliquewidth ≤k\leq k, we prove a general meta-theorem: homomorphism indistinguishability over every CMSO1\mathsf{CMSO}_{1}-definable graph class of bounded cliquewidth is decidable, in randomized exponential time. For classes of bounded linear cliquewidth the bound improves to PSPACE\mathsf{PSPACE}, and we show this is tight by exhibiting such a class for which the problem is PSPACE\mathsf{PSPACE}-complete. These are the first general algorithms for homomorphism indistinguishability over dense graph classes.

1 Introduction

Deciding whether two graphs are isomorphic represents one of the most elusive problems in complexity theory. Although a breakthrough result of [1] placed graph isomorphism in quasipolynomial time, it is still not known to admit polynomial-time algorithms or to be in coNP\mathsf{coNP}. This lack of complexity-theoretic understanding and the fact that graph isomorphism is too brittle w.r.t. noise or perturbations arising in practice has led to a sustained interest in graph isomorphism relaxations, i.e., equivalence relations ≈\approx between graphs that do not distinguish isomorphic graphs, see [2].

In the past, graph isomorphism relaxations have been studied in isolation, lacking a unified theory that explains their computational complexity. Recently, homomorphism indistinguishability has been proposed as such a theory, see [3]. Two graphs GG and HH are homomorphism indistinguishable over a graph class F\mathcal{F}, in symbols G≡FHG\equiv_{\mathcal{F}}H, if GG and HH admit the same number of homomorphisms from every graph F∈FF\in\mathcal{F}. This notion subsumes a wide range of graph isomorphism relaxations: [4] showed that two graphs are isomorphic iff they are homomorphism indistinguishable over all graphs, [5] showed that two graphs are not distinguished by the kk-dimensional Weisfeiler–Leman algorithm iff they are homomorphism indistinguishable over all graphs of treewidth ≤k\leq k, and [6] showed that two graphs are quantum isomorphic iff they are homomorphism indistinguishable over all planar graphs. Moreover, a long list of graph isomorphism relaxations from algebraic graph theory, category theory, invariant theory, machine learning, and quantum information theory have been characterized as homomorphism indistinguishability relations over natural graph classes [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29].

The complexity of homomorphism indistinguishability relations can vary drastically. [30] constructed a bounded-treewidth graph class F\mathcal{F} with polynomial-time membership test for which ≡F\equiv_{\mathcal{F}} is undecidable. Moreover, by the aforementioned characterizations, deciding ≡T\equiv_{\mathcal{T}} for the class T\mathcal{T} of all trees is in almost linear time, while ≡P\equiv_{\mathcal{P}} for the class P\mathcal{P} of all planar graphs is undecidable [31, 32, 6], and ≡G\equiv_{\mathcal{G}} for the class G\mathcal{G} of all graphs is in quasipolynomial time. These examples also show that, even for “natural” graph classes, there is no apparent relation between the complexities of ≡T\equiv_{\mathcal{T}}, ≡P\equiv_{\mathcal{P}}, and ≡G\equiv_{\mathcal{G}}, despite that T⊆P⊆G\mathcal{T}\subseteq\mathcal{P}\subseteq\mathcal{G}. Making sense of this counterintuitive behavior is the objective of a line of work that studies the complexity of homomorphism indistinguishability relations ≡F\equiv_{\mathcal{F}} in terms of graph-theoretic or model-theoretic properties of the graph class F\mathcal{F} [30, 33, 25].

Except for pathological cases, all known examples for graph classes F\mathcal{F} with decidable ≡F\equiv_{\mathcal{F}} are sparse, in the sense that they exclude large bicliques as subgraphs [35]. In this work, we give the first general algorithm for deciding homomorphism indistinguishability over dense graph classes.

References (73)