---
title: Weisfeiler-Leman Dimension Overview
url: https://www.emergentmind.com/topics/weisfeiler-leman-dimension
type: topic
---

# Weisfeiler-Leman Dimension Overview

The Weisfeiler-Leman dimension (WL-dimension) quantifies the minimal dimension $k$ such that the $k$-dimensional Weisfeiler-Leman algorithm uniquely distinguishes a graph or combinatorial structure up to isomorphism. As such, it serves as a central measure of combinatorial and descriptive complexity, directly connecting graph isomorphism algorithms, coherent configurations, logic, and algebraic graph theory. The WL-dimension is deeply tied to the expressive power of fixed-variable first-order logics with counting, the pebble game paradigm, parameterized complexity, and recent developments in representation learning.

## 1. Definition and General Framework

The $k$-dimensional WL algorithm $\mathrm{WL}_k$ acts on $k$-tuples of vertices of a graph $G = (V, E)$, maintaining an isomorphism-invariant coloring. At initialization, each $k$-tuple is colored according to its equality pattern and the induced subgraph. Iterative refinement recolors each tuple based on the multiset of colors of its one-coordinate neighbors. The process stabilizes to a final coloring, canonically partitioning $V^k$. Two graphs are $\mathrm{WL}_k$-equivalent if their multisets of stabilized colors coincide.

**WL-dimension** $\dim_{\mathrm{WL}}(G)$ is the smallest $k$ for which $G$ is $\mathrm{WL}_k$-distinguishable from all non-isomorphic graphs. Equivalently, it is the number of variables needed to define $G$ up to isomorphism in first-order logic with counting, or the number of pebbles required for Spoiler to win the bijective pebble game [2402.03274], [2403.12581]. For graph parameters $f$, WL-dimension is the least $k$ such that $f$ is invariant under $\mathrm{WL}_k$-equivalence [2310.19006].

## 2. Connections to Logic and Homomorphism Counts

There is a tight equivalence between the WL-dimension and descriptive complexity theory. The algorithm $\mathrm{WL}_k$ matches the expressive power of $\mathrm{FO}^{k+1}[\mathbf{C}]$—first-order logic with at most $k+1$ variables and counting quantifiers [2003.13745], [2402.03274]. For graph parameters such as the answer count of conjunctive queries (CQs), $\mathrm{WL}_k$ distinguishes graphs iff they differ in the number of homomorphisms from all graphs of treewidth at most $k$ [2310.19006]. For full CQs, the WL-dimension coincides with the treewidth of the pattern graph; for general CQs, the key is the *semantic extension width* $\mathrm{sew}(\varphi)$, a combination of treewidth and quantified star size.

| Structure/Class                          | WL-dimension bound      | Reference          |
|-------------------------------------------|------------------------|--------------------|
| General $n$-vertex graphs                 | $\leq 0.25n + o(n)$    | [2402.03274]       |
| General $n$-vertex graphs                 | $\leq 0.15n + o(n)$    | [2403.12581]       |
| Distance-hereditary graphs                | $2$                    | [2005.11766]       |
| Planar graphs                            | $ \leq 3$              | [1708.07354], [2305.17302] |
| Polyhedral/3-connected planar graphs      | $ \leq 2$ (if schurian)| [2305.17302]       |
| Bounded genus $g$                        | $\leq 4g + 3$          | [1904.07216]       |
| Orientable genus $g$                     | $\leq 2g + 3$          | [1904.07216]       |
| Circulant graphs (order $n$)              | $\leq \Omega(n)+3$     | [2406.15822]       |
| Circulant graphs (lower bound)            | $\geq c\sqrt{\log n}$  | [2507.10116]       |
| Permutation graphs                        | $ \leq 18 $            | [2305.15861]       |
| Strongly regular graphs (Fon-Der-Flaass)  | $\leq 4 $              | [2312.00460]       |
| Abelian groups                            | $2$                    | [2111.11908]       |
| Finite groups (general)                   | $\leq 5$               | [2111.11908]       |

## 3. Structural Bounds and Extremal Constructions

The WL-dimension is tightly linked to graph structural parameters. For graphs of treewidth $k$, the dimension is at most $k$ (normalized variant: at most $3k+4$ for logarithmic-round stabilization [2303.07985], at most $4k+3$ in prior work). For graphs of genus $g$, a linear upper bound $4g+3$ holds, or $2g+3$ on orientable surfaces [1904.07216]. For planar graphs, dimension $3$ is tight; for polyhedral graphs with schurian coherent configurations, it drops to $2$, yet no explicit example attains $3$ [1708.07354], [2305.17302]. Abundant families of strongly regular graphs with constant dimension are now known [2312.00460].

Expander-based Cai–Fürer–Immerman (CFI) constructions provide the canonical lower-bound families: to distinguish all $n$-vertex graphs, $\Omega(n)$ variables are required, with random graphs falling into low-dimension regimes [2308.11970], [2403.12581]. For circulant graphs, the dimension is unbounded, but lies between $\Omega(\sqrt{\log n})$ and $O(\log n)$ [2507.10116], [2406.15822]. For permutation graphs, the dimension is at most $18$ via modular decomposition and coherent configuration separability [2305.15861].

## 4. Complexity, Algorithms, and Separability

Determining WL-dimension is algorithmically and complexity-theoretically challenging. The decision problem "is $\dim_{\mathrm{WL}}(G) \leq k$?" is NP-hard, via reduction from TREEWIDTH and CFI encoding; this applies even for color multiplicity $4$ or less [2402.11531]. Fixed-$k$ algorithms exist in polynomial time for graphs of color multiplicity up to $5$, using coherent configuration separability, modular reduction and automorphism group calculations. For abelian color classes of arbitrary multiplicity, approximation algorithms run in $n^{O(k)}$ time and provide explicit bounds [2402.11531].

Separability of the (coherent) configuration produced by $k$-WL is central: a configuration is separable iff every algebraic isomorphism arises from a combinatorial isomorphism. WL-dimension is tightly coupled to the separability number; for permutation graphs, modular decomposition and the analysis of uniquely orientable components yield the $s(\mathrm{WL}_2(X)) \leq 6$ bound [2305.15861].

## 5. Algorithmic and Parameterized Implications

The WL-dimension governs the parameterized complexity of a range of graph problems. For conjunctive query answer counting, the WL-dimension coincides with semantic extension width; thus, fixed-parameter tractability is equivalent to bounded WL-dimension for classes of queries [2310.19006]. For circulant graphs, isomorphism can be decided in $n^{O(\log n)}$ time via the $\Omega(n)+3$ WL bound [2406.15822]. For classes with bounded vertex cover $t$, the dimension is at most $(2/3)t+3$ [2402.03274].

For distance-hereditary graphs, only $2$ dimensions are required, making conventional color refinement sufficient for isomorphism [2005.11766]. For polyhedral graphs with a schurian automorphism group, $2$-dimensional WL suffices. For general graphs, successive refinement and local reductions in the potential function enable breaking the linear upper bound barrier [2403.12581].

## 6. Connections to Algebra, Group Theory, and Machine Learning

The WL algorithm has powerful applications in finite group theory: many classic isomorphism invariants—including the center, commutator subgroup, derived/upper/lower central series, socle, and composition factors—are detectable by low-dimensional WL algorithms, typically with $k\leq5$ [2111.11908]. Direct products increase the WL-dimension additively by at most $1$. The graph-to-group correspondence (Mekler’s construction) allows transfer of lower bounds from graphs to nilpotent class-$2$ exponent-$p$ groups, yet in specific cases the group WL-dimension is much smaller than the underlying graph construction would suggest [2003.13745].

Recent work links WL-dimension to Graph Neural Networks (GNNs): order-$k$ GNNs can be no more powerful than $k$-dimensional WL; thus, the minimal order necessary to count answers of CQs is exactly $\mathrm{sew}(\varphi)$ [2310.19006]. Consequently, the dimension provides rigorous limits on GNN expressiveness.

## 7. Open Problems and Future Directions

Key unresolved questions and research frontiers include:

- **Asymptotic bounds for general graphs**: The best lower bounds for $n$-vertex graphs remain at $\Omega(n)$, but the upper bound is now $0.15n + o(n)$; narrowing the gap or discovering sharper families is a major challenge [2403.12581], [2402.03274].
- **Circulant graphs and Cayley graph families**: Determining whether circulant graph WL-dimension is truly $O(\log n)$ or can be improved, and mapping the relationship to group-theoretic invariants [2507.10116], [2406.15822].
- **Broader combinatorial designs**: Whether other abundant combinatorial structures (e.g., Latin squares, Steiner systems) admit constant or bounded WL-dimension [2312.00460].
- **Algorithmic extraction of short distinguishing dimension**: Efficiently finding minimal $k$ for individual graphs is an open algorithmic problem [2403.12581].
- **Extension to tensors and higher-arity relational structures**: Suitable analogues of WL for general relational systems with higher arity remain largely unexplored [2310.19006].
- **Descriptive complexity and logic**: Further pinning down the variable requirements for FO+C definitions of graphs, and the interaction with counting quantifiers and circuit lower bounds [2402.03274].

The Weisfeiler-Leman dimension thus remains at the core of combinatorial, logical, and algorithmic graph theory, offering a precise technical lens to study isomorphism, symmetry, and structure at both theoretical and applied levels.

Source: https://www.emergentmind.com/topics/weisfeiler-leman-dimension