OctoInform Beta

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

Proposition 2.4: Membership of the binary-encoded WLdim⁡(G)≤k\operatorname{WLdim}(G) \le k language in EXPTIME\mathrm{EXPTIME}

Deciding Weisfeiler-Leman dimension in exponential time.

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

Given a nonempty finite simple undirected uncolored graph GG by its binary adjacency matrix and a positive integer kk in binary, the Weisfeiler-Leman (WL) dimension problem asks whether kk-dimensional Weisfeiler-Leman (kk-WL) color refinement distinguishes GG from every non-isomorphic graph, that is, whether the WL dimension WLdim⁡(G)\operatorname{WLdim}(G) is at most kk. Dimension k=1k = 1 uses ordinary neighbor color refinement, and dimensions k≥2k \ge 2 use the joint-update refinement rule. The complexity question addressed here is membership of this decision problem in deterministic exponential time (EXPTIME\mathrm{EXPTIME}).

Weisfeiler-Leman refinement and dimension

A finite simple graph GG consists of a natural number n=|V(G)|n = |V(G)|, its order, specifying the vertex set V(G)={1,…,n}V(G) = \{1, \dots, n\}, together with an adjacency relation EG:V(G)×V(G)→{0,1}E_G : V(G) \times V(G) \to \{0, 1\} that is symmetric (EG(u,v)=EG(v,u)E_G(u, v) = E_G(v, u) for all u,v∈V(G)u, v \in V(G)) and irreflexive (EG(u,u)=0E_G(u, u) = 0 for every u∈V(G)u \in V(G)).✦ 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 EG(u,v)=EH(e(u),e(v))E_G(u, v) = E_H(e(u), 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 of elements of XX, denoted {{⋅}}\{\!\{ \cdot \}\!\}. The 1-WL color space 𝒞1(s)\mathcal{C}_1^{(s)} at round s∈ℕs \in \mathbb{N} is defined recursively by 𝒞1(0)={•}\mathcal{C}_1^{(0)} = \{\bullet\} and 𝒞1(s+1)=𝒞1(s)×ℳ(𝒞1(s))\mathcal{C}_1^{(s+1)} = \mathcal{C}_1^{(s)} \times \mathcal{M}(\mathcal{C}_1^{(s)}).✦ The 1-WL vertex coloring c1(s)(G,⋅):V(G)→𝒞1(s)c_1^{(s)}(G, \cdot) : V(G) \to \mathcal{C}_1^{(s)} is given by c1(0)(G,v)=•,c1(s+1)(G,v)=(c1(s)(G,v),{{c1(s)(G,u):u∈V(G),EG(v,u)=1}}),\begin{aligned} c_1^{(0)}(G, v) &= \bullet, \\ c_1^{(s+1)}(G, v) &= \bigl(c_1^{(s)}(G, v),\, \{\!\{ c_1^{(s)}(G, u) : u \in V(G),\, E_G(v, u) = 1 \}\!\}\bigr), \end{aligned}(1)✦ for every v∈V(G)v \in V(G) and s∈ℕs \in \mathbb{N}. The 1-WL color histogram of GG at round ss is the multiset h1(s)(G)={{c1(s)(G,v):v∈V(G)}}h_1^{(s)}(G) = \{\!\{ c_1^{(s)}(G, v) : v \in V(G) \}\!\} of round-ss colors from (1).✦

For any natural number kk, the kk-WL color space 𝒞k(s)\mathcal{C}_k^{(s)} at round s∈ℕs \in \mathbb{N} is defined recursively by 𝒞k(0)={0,1}k×k×{0,1}k×k\mathcal{C}_k^{(0)} = \{0, 1\}^{k \times k} \times \{0, 1\}^{k \times k} and 𝒞k(s+1)=𝒞k(s)×ℳ((𝒞k(s))k)\mathcal{C}_k^{(s+1)} = \mathcal{C}_k^{(s)} \times \mathcal{M}((\mathcal{C}_k^{(s)})^k).✦ For a kk-tuple v‾=(v1,…,vk)∈V(G)k\bar{v} = (v_1, \dots, v_k) \in V(G)^k, an index i∈{1,…,k}i \in \{1, \dots, k\}, and a vertex z∈V(G)z \in V(G), write v‾[i↦z]\bar{v}[i \mapsto z] for the kk-tuple obtained from v‾\bar{v} by replacing its ii-th coordinate with zz, and write [vi=vj]∈{0,1}[v_i = v_j] \in \{0, 1\} for the equality indicator. The kk-WL tuple coloring ck(s)(G,⋅):V(G)k→𝒞k(s)c_k^{(s)}(G, \cdot) : V(G)^k \to \mathcal{C}_k^{(s)} is given by ck(0)(G,v‾)=(([vi=vj])i,j=1k,(EG(vi,vj))i,j=1k),ck(s+1)(G,v‾)=(ck(s)(G,v‾),{{(ck(s)(G,v‾[i↦z]))i=1k:z∈V(G)}}),\begin{aligned} c_k^{(0)}(G, \bar{v}) &= \bigl(([v_i = v_j])_{i,j=1}^k,\, (E_G(v_i, v_j))_{i,j=1}^k\bigr), \\ c_k^{(s+1)}(G, \bar{v}) &= \bigl(c_k^{(s)}(G, \bar{v}),\, \{\!\{ (c_k^{(s)}(G, \bar{v}[i \mapsto z]))_{i=1}^k : z \in V(G) \}\!\}\bigr), \end{aligned}(2)✦ for every v‾∈V(G)k\bar{v} \in V(G)^k and s∈ℕs \in \mathbb{N}. The kk-WL color histogram of GG at round ss is hk(s)(G)={{ck(s)(G,v‾):v‾∈V(G)k}}h_k^{(s)}(G) = \{\!\{ c_k^{(s)}(G, \bar{v}) : \bar{v} \in V(G)^k \}\!\}, computed from (2).✦

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 s∈ℕs \in \mathbb{N} we have h1(s)(G)=h1(s)(H)h_1^{(s)}(G) = h_1^{(s)}(H) when k=1k = 1, and hk(s)(G)=hk(s)(H)h_k^{(s)}(G) = h_k^{(s)}(H) when k≠1k \neq 1.✦ We say that kk-WL identifies GG if every finite simple graph HH with G≡kHG \equiv_k H satisfies G≅HG \cong H.✦ The WL dimension WLdim⁡(G)\operatorname{WLdim}(G) of GG is the least positive integer kk that identifies GG, as in (3): WLdim⁡(G)=min⁡{k∈ℕ:k>0 and k-WL identifies G}.\operatorname{WLdim}(G) = \min \{ k \in \mathbb{N} : k > 0 \text{ and } k\text{-WL identifies } G \}.(3)✦

Binary encoding and the decision language

A binary word w∈{0,1}*w \in \{0, 1\}^* is a finite sequence of bits of length |w||w|✦, and a binary language is a subset L⊆{0,1}*L \subseteq \{0, 1\}^*.✦ The binary value val⁡(b)\operatorname{val}(b) of a binary word b=b1…bmb = b_1 \dots b_m is its base-22 value most-significant bit first, given by (4): val⁡(b1…bm)=∑j=1mbj2m−j,\operatorname{val}(b_1 \dots b_m) = \sum_{j=1}^{m} b_j 2^{m - j},(4)✦ with val⁡(ε)=0\operatorname{val}(\varepsilon) = 0 for the empty word ε\varepsilon.

For a finite simple graph GG of order nn, the adjacency matrix encoding mat⁡(G)∈{0,1}n2\operatorname{mat}(G) \in \{0, 1\}^{n^2} is the binary word obtained by concatenating the rows (EG(i,1),…,EG(i,n))(E_G(i, 1), \dots, E_G(i, n)) for i=1,…,ni = 1, \dots, n.✦ Together with a binary word b∈{0,1}*b \in \{0, 1\}^*, the input encoding enc⁡(G,b)∈{0,1}*\operatorname{enc}(G, b) \in \{0, 1\}^* is defined by (5): enc⁡(G,b)=1n0mat⁡(G)b,\operatorname{enc}(G, b) = 1^n \, 0 \, \operatorname{mat}(G) \, b,(5)✦ concatenating nn copies of 11, a separating 00, the adjacency matrix encoding, and bb. The WL dimension language LWL⊆{0,1}*L_{\mathrm{WL}} \subseteq \{0, 1\}^* is the binary language defined by (6): LWL={enc⁡(G,b):|V(G)|>0,b∈1{0,1}*,val⁡(b)>0,WLdim⁡(G)≤val⁡(b)},\begin{aligned} L_{\mathrm{WL}} = \bigl\{ \operatorname{enc}(G, b) : {} &|V(G)| > 0,\; b \in 1\{0, 1\}^*, \\ &\operatorname{val}(b) > 0,\; \operatorname{WLdim}(G) \le \operatorname{val}(b) \bigr\}, \end{aligned}(6)✦ collecting the input encodings of nonempty graphs GG and positive binary words bb starting with 11 whose binary value is at least WLdim⁡(G)\operatorname{WLdim}(G).

Turing machines and exponential time

A head move μ∈{left,stay,right}\mu \in \{\text{left}, \text{stay}, \text{right}\} has head displacement δ(μ)∈ℤ\delta(\mu) \in \mathbb{Z} equal to −1-1 for left, 00 for stay, and 11 for right.✦ A Turing machine MM is specified by natural numbers nΣn_\Sigma and nQn_Q, giving a finite tape alphabet ΣM={0,1,…,nΣ+2}\Sigma_M = \{0, 1, \dots, n_\Sigma + 2\} and a finite state set QM={0,1,…,nQ+2}Q_M = \{0, 1, \dots, n_Q + 2\}, together with a transition function τM\tau_M of the form (7): τM:QM×ΣM→QM×ΣM×{left,stay,right}.\tau_M : Q_M \times \Sigma_M \to Q_M \times \Sigma_M \times \{\text{left}, \text{stay}, \text{right}\}.(7)✦

A machine configuration of MM is a triple c=(q,p,θ)c = (q, p, \theta) consisting of a state q∈QMq \in Q_M, a head position p∈ℤp \in \mathbb{Z}, and a tape θ:ℤ→ΣM\theta : \mathbb{Z} \to \Sigma_M.✦ A configuration c=(q,p,θ)c = (q, p, \theta) is a halted configuration if q∈{1,2}q \in \{1, 2\}, where 11 is the accepting state and 22 is the rejecting state.✦ For a bit x∈{0,1}x \in \{0, 1\}, the input tape symbol σM(x)∈ΣM\sigma_M(x) \in \Sigma_M is 22 when x=1x = 1 and 11 when x=0x = 0, leaving 00 as the blank symbol.✦ On a binary word w=w0w1…wm−1w = w_0 w_1 \dots w_{m-1} of length mm, the initial configuration c0(M,w)=(0,0,θ0)c_0(M, w) = (0, 0, \theta_0) has state 00, head position 00, and tape θ0\theta_0 given by (8): θ0(ℓ)={σM(wℓ)if 0≤ℓ<m,0otherwise.\theta_0(\ell) = \begin{cases} \sigma_M(w_\ell) & \text{if } 0 \le \ell < m, \\ 0 & \text{otherwise.} \end{cases}(8)✦

The one-step transition step⁡M\operatorname{step}_M leaves a halted configuration cc unchanged; for a non-halted configuration c=(q,p,θ)c = (q, p, \theta) with τM(q,θ(p))=(q′,γ,μ)\tau_M(q, \theta(p)) = (q', \gamma, \mu), it returns (q′,p+δ(μ),θ′)(q', p + \delta(\mu), \theta'), where θ′(p)=γ\theta'(p) = \gamma and θ′(ℓ)=θ(ℓ)\theta'(\ell) = \theta(\ell) for all ℓ≠p\ell \neq p.✦ For t∈ℕt \in \mathbb{N}, the configuration after tt steps of MM on ww is the tt-fold iterate run⁡M(w,t)=step⁡Mt(c0(M,w))\operatorname{run}_M(w, t) = \operatorname{step}_M^t(c_0(M, w)).✦

A Turing machine MM decides a binary language LL within a time bound T:ℕ→ℕT : \mathbb{N} \to \mathbb{N} if for every w∈{0,1}*w \in \{0, 1\}^* there exists t≤T(|w|)t \le T(|w|) such that run⁡M(w,t)\operatorname{run}_M(w, t) is halted and has state 11 if and only if w∈Lw \in L.✦ A binary language LL belongs to EXPTIME\mathrm{EXPTIME}, written L∈EXPTIMEL \in \mathrm{EXPTIME}, if there exist a Turing machine MM and natural numbers CC and dd such that MM decides LL within the time bound (9): T(m)=2C(m+1)d.T(m) = 2^{C(m + 1)^d}.(9)✦

The claim

Proposition 2.4. The WL dimension language LWLL_{\mathrm{WL}} belongs to EXPTIME\mathrm{EXPTIME}: LWL∈EXPTIME.L_{\mathrm{WL}} \in \mathrm{EXPTIME}.(10)✦

What is checked

In the Lean library, Proposition 2.4 states (10) for the WL dimension language LWLL_{\mathrm{WL}} defined over the binary input encoding of nonempty finite simple graphs and positive binary dimensions, using ordinary neighbor color refinement at dimension 11, joint-update kk-WL refinement for k≠1k \neq 1, and the deterministic Turing machine model with the exponential time bound (9).