OctoInform Beta

OpenAI preprint, September 2026 · §2. Weisfeiler-Leman refinement and the bijective game

Lemma 2.2: For k≥2k \ge 2, kk-WL tuple colors determine 11-WL vertex colors at every round, and max⁡(2,n)\max(2, n)-WL identifies every nn-vertex graph

Refinement of 1-WL and identification by graph order.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The setting

Weisfeiler-Leman (WL) color refinement compares finite simple graphs by iteratively partitioning vertices in the one-dimensional algorithm (11-WL) or kk-tuples of vertices in the kk-dimensional algorithm (kk-WL). A basic structural question for this hierarchy is how higher-dimensional tuple colorings relate to ordinary vertex color refinement round by round, and at what dimension the test distinguishes an nn-vertex graph from every non-isomorphic graph.

Weisfeiler-Leman refinement and identification

A finite simple graph GG consists of a natural number n=|V(G)|∈ℕn = |V(G)| \in \mathbb{N}, called its order, on the vertex set V(G)={1,…,n}V(G) = \{1, \dots, n\} (empty when n=0n = 0), together with a symmetric, irreflexive adjacency relation on V(G)V(G), written u∼Gvu \sim_G v when uu and vv are adjacent.✦ Two finite simple graphs GG and HH are isomorphic, written G≅HG \cong H, if there exists a bijection e:V(G)→V(H)e : V(G) \to V(H) such that u∼Gvu \sim_G v if and only if e(u)∼He(v)e(u) \sim_H e(v) for all u,v∈V(G)u, v \in V(G).✦

For any set XX, write ℳ(X)\mathcal{M}(X) for the set of finite multisets with elements in XX, and denote a multiset by {{⋅}}\{\{ \cdot \}\}. For each round s∈ℕs \in \mathbb{N}, the 11-WL color space C1(s)C_1^{(s)} is defined recursively by C1(0)={*}C_1^{(0)} = \{\ast\}, a one-element set, and C1(s+1)=C1(s)×ℳ(C1(s))C_1^{(s+1)} = C_1^{(s)} \times \mathcal{M}(C_1^{(s)}).✦ The 11-WL vertex coloring χ1(s)(G,⋅):V(G)→C1(s)\chi_1^{(s)}(G, \cdot) : V(G) \to C_1^{(s)} assigns to every vertex v∈V(G)v \in V(G) the initial color χ1(0)(G,v)=*\chi_1^{(0)}(G, v) = \ast at round 00, and updates at round s+1s + 1 by χ1(s+1)(G,v)=(χ1(s)(G,v),{{χ1(s)(G,u):u∈V(G),v∼Gu}}).\begin{aligned} \chi_1^{(s+1)}(G, v) = \bigl(&\chi_1^{(s)}(G, v),\\ &\{\{ \chi_1^{(s)}(G, u) : u \in V(G),\, v \sim_G u \}\}\bigr). \end{aligned}(1)✦ The 11-WL color histogram of GG at round ss is the multiset of vertex colors ℋ1(s)(G)={{χ1(s)(G,v):v∈V(G)}}∈ℳ(C1(s)).\mathcal{H}_1^{(s)}(G) = \{\{ \chi_1^{(s)}(G, v) : v \in V(G) \}\} \in \mathcal{M}(C_1^{(s)}).(2)✦

For k∈ℕk \in \mathbb{N}, write [k]={1,…,k}[k] = \{1, \dots, k\} (empty when k=0k = 0) and V(G)kV(G)^k for the set of kk-tuples v=(v1,…,vk)v = (v_1, \dots, v_k) of vertices of GG. For each round s∈ℕs \in \mathbb{N}, the kk-WL color space Ck(s)C_k^{(s)} is defined recursively by Ck(0)={0,1}[k]×[k]×{0,1}[k]×[k],Ck(s+1)=Ck(s)×ℳ((Ck(s))[k]).\begin{aligned} C_k^{(0)} &= \{0, 1\}^{[k] \times [k]} \times \{0, 1\}^{[k] \times [k]},\\ C_k^{(s+1)} &= C_k^{(s)} \times \mathcal{M}\bigl((C_k^{(s)})^{[k]}\bigr). \end{aligned}(3)✦ For v∈V(G)kv \in V(G)^k, i∈[k]i \in [k], and z∈V(G)z \in V(G), write v[i↦z]∈V(G)kv[i \mapsto z] \in V(G)^k for the kk-tuple obtained from vv by replacing its ii-th coordinate viv_i with zz. Writing 𝟏P∈{0,1}\mathbf{1}_P \in \{0, 1\} for the indicator that equals 11 if PP holds and 00 otherwise, the kk-WL tuple coloring χk(s)(G,⋅):V(G)k→Ck(s)\chi_k^{(s)}(G, \cdot) : V(G)^k \to C_k^{(s)} is defined at round 00 by the equality and adjacency matrices χk(0)(G,v)=((𝟏vi=vj)i,j∈[k],(𝟏vi∼Gvj)i,j∈[k]),\chi_k^{(0)}(G, v) = \bigl((\mathbf{1}_{v_i = v_j})_{i, j \in [k]},\, (\mathbf{1}_{v_i \sim_G v_j})_{i, j \in [k]}\bigr),(4) and at round s+1s + 1 by the joint-update rule χk(s+1)(G,v)=(χk(s)(G,v),{{(χk(s)(G,v[i↦z]))i∈[k]:z∈V(G)}}).\begin{aligned} \chi_k^{(s+1)}(G, v) = \bigl(&\chi_k^{(s)}(G, v),\\ &\{\{ (\chi_k^{(s)}(G, v[i \mapsto z]))_{i \in [k]} : z \in V(G) \}\}\bigr). \end{aligned}(5)✦ The kk-WL color histogram of GG at round ss is the multiset of tuple colors ℋk(s)(G)={{χk(s)(G,v):v∈V(G)k}}∈ℳ(Ck(s)).\mathcal{H}_k^{(s)}(G) = \{\{ \chi_k^{(s)}(G, v) : v \in V(G)^k \}\} \in \mathcal{M}(C_k^{(s)}).(6)✦

For k∈ℕk \in \mathbb{N}, two finite simple graphs GG and HH are kk-WL equivalent, written G≡kHG \equiv_k H, if for every round s∈ℕs \in \mathbb{N}, ℋ1(s)(G)=ℋ1(s)(H)when k=1,ℋk(s)(G)=ℋk(s)(H)when k≠1.\begin{aligned} \mathcal{H}_1^{(s)}(G) &= \mathcal{H}_1^{(s)}(H) &&\text{when } k = 1,\\ \mathcal{H}_k^{(s)}(G) &= \mathcal{H}_k^{(s)}(H) &&\text{when } k \neq 1. \end{aligned}(7)✦ Given k∈ℕk \in \mathbb{N}, kk-WL identifies a finite simple graph GG if every finite simple graph HH satisfying G≡kHG \equiv_k H is isomorphic to GG.✦

The claim

Lemma 2.2. For any finite simple graphs GG and HH, any integer k≥2k \ge 2, any round s∈ℕs \in \mathbb{N}, any kk-tuples v∈V(G)kv \in V(G)^k and w∈V(H)kw \in V(H)^k, and any coordinate i∈[k]i \in [k], χk(s)(G,v)=χk(s)(H,w)⇒χ1(s)(G,vi)=χ1(s)(H,wi).\chi_k^{(s)}(G, v) = \chi_k^{(s)}(H, w) \;\Longrightarrow\; \chi_1^{(s)}(G, v_i) = \chi_1^{(s)}(H, w_i).(8)✦ Furthermore, for every finite simple graph GG of order nn, max⁡(2,n)\max(2, n)-WL identifies GG: for every finite simple graph HH, G≡max⁡(2,n)H⇒G≅H.G \equiv_{\max(2, n)} H \;\Longrightarrow\; G \cong H.(9)✦

In the paper, the result reads: for positive integers j≤kj \le k, the relation G≡kHG \equiv_k H implies G≡jHG \equiv_j H, and consequently a graph GG has Weisfeiler-Leman dimension WLdim⁡(G)≤k\operatorname{WLdim}(G) \le k if and only if kk-WL identifies GG.

What is checked

The Lean library states Lemma 2.2 over finite simple graphs, graph isomorphism, the recursive 11-WL vertex coloring (1) and histogram (2), the kk-WL color space (3), joint-update tuple coloring (4) and (5), and histogram (6), kk-WL equivalence (7), and kk-WL identification, with (8) stated for all k≥2k \ge 2 and s∈ℕs \in \mathbb{N} and (9) stated for every finite simple graph GG of order n∈ℕn \in \mathbb{N}.