---
title: Homomorphism-Indistinguishability
url: https://www.emergentmind.com/topics/homomorphism-indistinguishability
type: topic
---

# Homomorphism-Indistinguishability

Homomorphism-indistinguishability is the equivalence relation obtained by fixing a class \(\mathcal F\) of test graphs and requiring equality of all homomorphism counts from \(\mathcal F\): two graphs \(G,H\) are indistinguishable over \(\mathcal F\) when \(\hom(F,G)=\hom(F,H)\) for every \(F\in\mathcal F\). This reformulates Lovász’s homomorphism-count characterization of isomorphism as a general schema and has become a unifying language for graph isomorphism, quantum isomorphism, cospectrality, counting-logic equivalences, and several SDP hierarchies [2302.11290][2402.08989][2505.07922].

## 1. Fundamental definition and canonical examples

For graphs \(F,G\), a graph homomorphism is a vertex map preserving edges, and \(\hom(F,G)\) denotes the number of such maps. Given a graph class \(\mathcal F\), the associated equivalence relation is
\[
G \equiv_{\mathcal F} H
\quad\Longleftrightarrow\quad
\hom(F,G)=\hom(F,H)\ \text{for all }F\in\mathcal F.
\]
The fundamental starting point is Lovász’s theorem:
\[
G \cong H \iff \hom(K,G)=\hom(K,H)\ \text{for all graphs }K.
\]
A major strengthening due to Dvořák says that it already suffices to test against all \(2\)-degenerate graphs [2602.08738].

Representative test classes already yield several standard equivalence relations.

| Test class \(\mathcal F\) | Induced equivalence | Representative source |
|---|---|---|
| All graphs | Isomorphism | Lovász |
| Planar graphs | Quantum isomorphism | Mančinska–Roberson |
| Bounded-treewidth graphs | \(C^k\)- / WL-type equivalence | Dvořák and successors |
| Tree-depth-\(\le k\) graphs | \(\mathrm C_k\)-equivalence | Grohe |
| GHW-\(\le k\) hypergraphs | \(GC^k\)-equivalence | Hypergraph generalization |

These examples show that homomorphism-indistinguishability is not a single invariant but a parameterized family of invariants indexed by test classes. In particular, restricting the source class weakens the relation in ways that often match logical, spectral, quantum, or optimization-theoretic relaxations [2407.10635][2003.08164][2303.10980].

## 2. Closure operators, maximality, and distinguishing closedness

A central structural notion is the homomorphism distinguishing closure
\[
\operatorname{cl}(\mathcal F)
=
\left\{
K\ \middle|\
\forall G,H,\ 
G=_{\mathcal F}H \Rightarrow \hom(K,G)=\hom(K,H)
\right\}.
\]
This is the largest graph class inducing the same indistinguishability relation as \(\mathcal F\). A class is homomorphism distinguishing closed if \(\operatorname{cl}(\mathcal F)=\mathcal F\). Equivalently, adding any graph outside \(\mathcal F\) strictly refines the induced equivalence relation [2302.11290].

The general closure theory identifies exact correspondences between graph-class closure properties and preservation properties of the induced equivalence relation.

| Closure property of \(\mathcal F\) | Preservation property of \(=_{\mathcal F}\) |
|---|---|
| taking minors | complements |
| taking summands | disjoint unions |
| taking subgraphs | full complements |
| taking induced subgraphs | left lexicographic products |
| contracting edges | right lexicographic products |

For homomorphism distinguishing closed classes, minor-closedness is equivalent to preservation under complements [2302.11290]. This yields a structural explanation for the persistent role of minor-closed classes in the subject.

Roberson’s maximality program fits naturally into this framework. For bounded treewidth, the classes \(\mathcal T_k\) of graphs of tree-width at most \(k\) are homomorphism-distinguishing closed for all \(k\ge 1\), confirming Roberson’s conjecture for this family [2304.07011]. A different route uses oddomorphisms: if a family is closed under disjoint unions, restrictions to connected components, and weak oddomorphisms, then it is homomorphism distinguishing closed. This criterion yields, among other consequences, that for every fixed \(d\), homomorphism indistinguishability over graphs of maximum degree at most \(d\) is strictly weaker than isomorphism, and the bounded-degree class is already maximal for its induced relation [2206.10321].

## 3. Logical characterizations

One of the main reasons the subject became central in finite model theory is that several counting logics admit exact homomorphism-count semantics.

For bounded treewidth, Dvořák’s theorem identifies \(k\)-variable counting logic with homomorphism counts from bounded-treewidth graphs. In later formulations, \(k\)-WL indistinguishability coincides with homomorphism indistinguishability over graphs of treewidth at most \(k\) [2402.08989]. For bounded quantifier rank, Grohe proved that graphs satisfy the same sentences of first-order logic with counting of quantifier rank at most \(k\) if and only if they are homomorphism-indistinguishable over the class of all graphs of tree depth at most \(k\) [2003.08164].

The combined width/depth fragment \(\mathsf C^k_q\) requires a more delicate test class. The class \(\mathcal T^k_q\) of graphs admitting a \(k\)-pebble forest cover of depth \(q\) yields the exact characterization
\[
G \equiv_{\mathsf C^k_q} H
\iff
\hom(F,G)=\hom(F,H)\quad\text{for all }F\in \mathcal T^k_q.
\]
This class is strictly smaller than \(\mathcal{TW}_{k-1}\cap \mathcal{TD}_q\) when \(q\) is sufficiently larger than \(k\), and that structural separation lifts to a strict separation of the corresponding indistinguishability relations [2308.06044].

A further structural theorem states that if a self-complementary logic admits any homomorphism-count characterization at all, then it already admits one over a minor-closed graph class. This makes minor-closed classes canonical carriers of a large family of logical equivalences [2302.11290].

The same program extends to hypergraphs. Two hypergraphs satisfy the same \(GC^k\)-sentences if and only if they are homomorphism indistinguishable over hypergraphs of generalised hypertree width at most \(k\) [2303.10980]. For bounded guard depth, the correct parameter is strict hypertree depth: two hypergraphs satisfy the same \(GC^k\)-sentences of guard depth at most \(k\) if and only if they are homomorphism indistinguishable over hypergraphs of strict hypertree depth at most \(k\) [2404.10637]. This is the hypergraph analogue of the tree-depth characterization for graphs.

## 4. Quantum isomorphism, easy quantum groups, and SDP hierarchies

A particularly influential instance is the planar case:
\[
G \cong_q H
\iff
G \equiv_{\mathcal P} H,
\]
where \(\mathcal P\) is the class of planar graphs. Thus quantum isomorphism is exactly homomorphism indistinguishability over planar graphs [2407.10635]. This result initiated a large part of the modern development.

The quantum-group perspective generalizes this phenomenon. For each orthogonal easy quantum group, one obtains a graph equivalence relation \(\approx_{\mathbb G}\) and a graph class \(\mathcal F_{\mathbb G}\) such that
\[
X \approx_{\mathbb G} Y
\iff
X \equiv_{\mathcal F_{\mathbb G}} Y.
\]
In this way, the earlier planar characterization of quantum isomorphism becomes one row in a broader correspondence between easy quantum groups, partition categories, and homomorphism-indistinguishability relations [2505.07922].

Optimization hierarchies admit analogous descriptions. For every integer \(t\ge 1\), there is a minor-closed graph class \(\mathcal L_t\) of treewidth at most \(3t-1\) such that feasibility of the \(t\)-th level of the Lasserre hierarchy for graph isomorphism is equivalent to homomorphism indistinguishability over \(\mathcal L_t\); similarly, the version with non-negativity constraints is characterized by a class \(\mathcal L_t^+\) [2302.10538]. Analyzing the treewidth of these classes yields the comparison result that the \(3t^\text{th}\) level of Sherali–Adams is as strong as the \(t^\text{th}\) level of Lasserre, and that \(3t\) cannot be lowered to \(3t-1\) [2302.10538].

There is also a quantum analogue for the NPA hierarchy. Each level of the NPA SDP relaxation for quantum isomorphism is equivalent to homomorphism indistinguishability over an appropriate class \(\mathcal P_k\) of planar graphs. The union of these classes is the set of all planar graphs, which recovers the planar characterization of quantum isomorphism and yields a randomized polynomial-time algorithm for deciding exact feasibility of each fixed level [2407.10635].

## 5. Algorithms and complexity

For a fixed class \(\mathcal F\), the decision problem \(\mathrm{HomInd}(\mathcal F)\) asks whether two input graphs are homomorphism indistinguishable over \(\mathcal F\). The general algorithmic picture is highly nonuniform.

A major positive result is the meta-theorem that \(\mathrm{HomInd}(\mathcal F)\) admits a randomized polynomial-time algorithm for every graph class \(\mathcal F\) of bounded treewidth that is definable in \(\mathrm{CMSO}_2\). In the uniform version, where the \(\mathrm{CMSO}_2\)-sentence and the treewidth bound are part of the input, the problem is randomized fixed-parameter tractable for fixed \(k\), with runtime \(f(|\varphi|+k)n^{O(k)}\) [2402.08989]. For bounded pathwidth classes, the same framework yields a deterministic polynomial-time algorithm [2402.08989].

Subsequent work sharpened the pathwidth bound dramatically: for every recognisable graph class of bounded pathwidth, \(\mathrm{HomInd}(\mathcal F)\in \mathsf{C}_{=}\mathsf{L}\), and this is tight because there exists a fixed \(\mathrm{CMSO}_2\)-definable bounded-pathwidth class whose indistinguishability problem is \(\mathsf{C}_{=}\mathsf{L}\)-complete [2512.13058]. In the bounded-treewidth regime, the same work relates the problem to multiplicity tree automata and polynomial identity testing: for some fixed bounded-treewidth class, \(\mathrm{HomInd}(\mathcal F)\), multiplicity tree automata equivalence, and PIT are logspace many-one interreducible, so a general derandomization would imply PIT \(\in \mathsf{PTIME}\) [2512.13058].

The negative side is equally important. When the width parameter is part of the input, deciding \(k\)-WL indistinguishability is coNP-hard [2402.08989]. More broadly, the complexity of \(\mathrm{HomInd}(\mathcal F)\) ranges from logspace-type classes through randomized polynomial time to undecidable cases, with planar graphs providing a prominent undecidable example through their equivalence with quantum isomorphism [2512.13058][2407.10635].

## 6. Limits, counterexamples, and current frontiers

Recent work has shown that the failure of restricted homomorphism counts to characterize isomorphism is not confined to the original minor-closed examples. For every proper immersion-closed and union-closed class \(\mathcal M\), there exist non-isomorphic graphs \(G,H\) such that
\[
\hom(K,G)=\hom(K,H)\qquad \forall K\in\mathcal M.
\]
This extends the earlier bounded-degree result and shows that the “special role” of minor-closed classes, if any, is shared by a much larger family [2602.08738].

Sparse graph theory provides a parallel frontier. For every \(k\ge 0\), there exist non-isomorphic graphs that are homomorphism indistinguishable over all graphs of vortex-free Hadwiger number at most \(k\). In particular, for every genus bound \(g\), homomorphism indistinguishability over graphs of genus \(\le g\) is not the same as isomorphism, and these genus-based relations form a strict hierarchy [2601.18602].

At the same time, several natural generalizations fail. The minor-closed intuition does not extend naively to topological-minor-closed classes. Two graphs are isomorphic if and only if they are homomorphism indistinguishable over all graphs excluding \(K_5\) as a topological minor, so the restricted relation can collapse back to full isomorphism [2601.18602]. The 2026 immersion result also states that the natural topological-minor analogue cannot hold, due to a result of Neuen and Seppelt [2602.08738].

A different limitation comes from finite model theory and categorical semantics. Invertible-map equivalences \(\equiv^{\mathrm{IM}_{k,\mathbb P}}\) cannot be characterized as homomorphism indistinguishability relations for \(k\ge 6\), neither with ordinary counting in \(\mathbb N\) nor with modular counting. Consequently, there is no finite-rank comonad on graphs whose co-Kleisli isomorphisms characterize IM-equivalence [2308.05693]. This establishes a precise boundary: homomorphism-indistinguishability captures a large class of graph equivalences, but not all natural linear-algebraic refinements.

Taken together, these results place homomorphism-indistinguishability at the intersection of graph structure theory, finite model theory, quantum symmetries, and optimization. The subject is now organized around three recurrent questions: which test classes characterize a given equivalence, which classes are maximal for their induced relation, and where the framework provably stops.

Source: https://www.emergentmind.com/topics/homomorphism-indistinguishability