OctoInform Beta

OpenAI preprint, September 2026 · §1. Introduction

Theorem 1.1: Deciding kk-dimensional Weisfeiler-Leman equivalence for binary-encoded dimension k≥2k \ge 2 is EXPTIME\mathrm{EXPTIME}-complete under polynomial-time many-one reductions

EXPTIME-completeness of general and subcubic Weisfeiler-Leman equivalence.

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

The kk-dimensional Weisfeiler-Leman algorithm is a canonical color-refinement test for graph isomorphism. For a fixed dimension kk, the test runs in polynomial time in the order of the input graphs. When the dimension k≥2k \ge 2 is supplied as part of the input in binary alongside two finite simple graphs GG and HH, deciding whether GG and HH are kk-dimensional Weisfeiler-Leman equivalent becomes an exponential-time problem.

Theorem 1.1 of OpenAI, Variable-dimension Weisfeiler-Leman equivalence on general and subcubic graphs, OpenAI Math Release preprint, September 25, 2026, establishes the exact complexity of both the general decision problem WL\mathrm{WL} and its restriction SubWL\mathrm{SubWL} to connected subcubic graphs of equal positive order: both languages are EXPTIME\mathrm{EXPTIME}-complete under deterministic polynomial-time many-one reductions.✦

Weisfeiler-Leman equivalence

A finite simple graph GG consists of a natural number |V(G)|∈ℕ|V(G)| \in \mathbb{N}, its order, together with a simple undirected graph on the vertex set V(G)={0,1,…,|V(G)|−1}V(G) = \{0, 1, \dots, |V(G)| - 1\}.✦ A finite simple graph GG is subcubic if every vertex of GG has degree at most 33.✦ For a natural number kk, a vertex kk-tuple of GG is an element 𝒗=(v1,…,vk)∈V(G)k\mathbf{v} = (v_1, \dots, v_k) \in V(G)^k.✦ Given i∈{1,…,k}i \in \{1, \dots, k\} and z∈V(G)z \in V(G), write 𝒗[i←z]\mathbf{v}[i \leftarrow z] for the kk-tuple obtained from 𝒗\mathbf{v} by replacing its ii-th coordinate with zz.

For each dimension k∈ℕk \in \mathbb{N} and round s∈ℕs \in \mathbb{N}, the set Ck(s)C_k(s) of round-ss colors is defined recursively. The initial color set Ck(0)C_k(0) consists of all functions from {1,…,k}2\{1, \dots, k\}^2 to {0,1}2\{0, 1\}^2, and Ck(s+1)C_k(s + 1) consists of all pairs whose first entry lies in Ck(s)C_k(s) and whose second entry is a finite multiset of kk-tuples in Ck(s)kC_k(s)^k.✦

The joint-update kk-WL tuple coloring χsG:V(G)k→Ck(s)\chi_s^G : V(G)^k \to C_k(s) is defined by recursion on ss. At round s=0s = 0, the initial color χ0G(𝒗)\chi_0^G(\mathbf{v}) sends each ordered pair (i,j)∈{1,…,k}2(i, j) \in \{1, \dots, k\}^2 to the pair of bits recording whether vi=vjv_i = v_j and whether viv_i and vjv_j are adjacent in GG. At round s+1s + 1, the color is given by χs+1G(𝒗)=(χsG(𝒗),{{(χsG(𝒗[1←z]),…,χsG(𝒗[k←z])):z∈V(G)}}),\begin{aligned} \chi_{s+1}^G(\mathbf{v}) = \Bigl( &\chi_s^G(\mathbf{v}), \\ &\bigl\{\!\!\bigl\{ (\chi_s^G(\mathbf{v}[1 \leftarrow z]), \dots, \chi_s^G(\mathbf{v}[k \leftarrow z])) : z \in V(G) \bigr\}\!\!\bigr\} \Bigr), \end{aligned}(1)✦ where double braces denote a multiset. In (1), all kk coordinate replacements associated with a single vertex zz are grouped into one kk-tuple inside the multiset.

The round-ss color histogram of GG at dimension kk is the multiset ℋs(G,k)={{χsG(𝒗):𝒗∈V(G)k}}\mathcal{H}_s(G, k) = \{\!\{\chi_s^G(\mathbf{v}) : \mathbf{v} \in V(G)^k\}\!\} of colors in Ck(s)C_k(s).✦ Two finite simple graphs GG and HH are kk-WL equivalent, written G≡kHG \equiv_k H, if ℋs(G,k)=ℋs(H,k)\mathcal{H}_s(G, k) = \mathcal{H}_s(H, k) for every s∈ℕs \in \mathbb{N}.✦

The decision problems

A binary word ww is a finite sequence of bits in {0,1}\{0, 1\} with length |w|∈ℕ|w| \in \mathbb{N}✦, and a formal language LL is a set of binary words.✦ For a natural number n∈ℕn \in \mathbb{N}, let bits(n)\mathrm{bits}(n) denote its binary bit sequence. The prefix-free integer encoding int(n)\mathrm{int}(n), the graph encoding enc(G)\mathrm{enc}(G), and the instance encoding enc(G,H,k)\mathrm{enc}(G, H, k) for finite simple graphs G,HG, H and k∈ℕk \in \mathbb{N} are given by int(n)=1|bits(n)|0bits(n),enc(G)=int(|V(G)|)⋅a0,0a0,1⋯a|V(G)|−1,|V(G)|−1,enc(G,H,k)=enc(G)⋅enc(H)⋅int(k),\begin{aligned} \mathrm{int}(n) &= 1^{|\mathrm{bits}(n)|} 0 \, \mathrm{bits}(n), \\ \mathrm{enc}(G) &= \mathrm{int}(|V(G)|) \cdot a_{0,0} a_{0,1} \cdots a_{|V(G)|-1,|V(G)|-1}, \\ \mathrm{enc}(G, H, k) &= \mathrm{enc}(G) \cdot \mathrm{enc}(H) \cdot \mathrm{int}(k), \end{aligned}(2) where concatenation is denoted by juxtaposition and centered dots, and a0,0a0,1⋯a|V(G)|−1,|V(G)|−1a_{0,0} a_{0,1} \cdots a_{|V(G)|-1,|V(G)|-1} is the row-major flattening of the adjacency matrix of GG (with ai,j=1a_{i,j} = 1 if ii and jj are adjacent in GG and ai,j=0a_{i,j} = 0 otherwise).

Using the instance encoding (2), the general Weisfeiler-Leman equivalence problem WL\mathrm{WL} and its connected subcubic restriction SubWL\mathrm{SubWL} are the formal languages WL={enc(G,H,k):k≥2,G≡kH},SubWL={enc(G,H,k):k≥2,|V(G)|=|V(H)|>0,G,H connected and subcubic,G≡kH},\begin{aligned} \mathrm{WL} &= \{ \mathrm{enc}(G, H, k) : k \ge 2,\ G \equiv_k H \}, \\ \mathrm{SubWL} &= \bigl\{ \mathrm{enc}(G, H, k) : k \ge 2,\ |V(G)| = |V(H)| > 0, \\ &\qquad G, H \text{ connected and subcubic},\ G \equiv_k H \bigr\}, \end{aligned}(3) where GG and HH range over all finite simple graphs and kk ranges over ℕ\mathbb{N}.

Multitape Turing machines

A head motion is an element of {left,stay,right}\{\mathrm{left}, \mathrm{stay}, \mathrm{right}\} with integer displacement Δ(left)=−1\Delta(\mathrm{left}) = -1, Δ(stay)=0\Delta(\mathrm{stay}) = 0, and Δ(right)=1\Delta(\mathrm{right}) = 1. A deterministic multitape Turing machine MM consists of natural numbers QQ, AA, and mm together with a partial transition function δ\delta: the control states are SQ={0,1,…,Q}S_Q = \{0, 1, \dots, Q\}, the tape alphabet is ΣA={0,1,…,A+2}\Sigma_A = \{0, 1, \dots, A + 2\}, the machine has m+1m + 1 two-way infinite tapes indexed by {0,1,…,m}\{0, 1, \dots, m\}, and δ\delta maps each pair (q,σ)∈SQ×ΣAm+1(q, \sigma) \in S_Q \times \Sigma_A^{m+1} either to no value (halting) or to a next control state q′∈SQq' \in S_Q together with, for each tape j∈{0,…,m}j \in \{0, \dots, m\}, a symbol aj∈ΣAa_j \in \Sigma_A to write and a head motion djd_j.✦

A configuration C=(q,h,τ)C = (q, h, \tau) of MM records the current control state q∈SQq \in S_Q, the integer head position h(j)∈ℤh(j) \in \mathbb{Z} on each tape j∈{0,…,m}j \in \{0, \dots, m\}, and the tape symbol τ(j,i)∈ΣA\tau(j, i) \in \Sigma_A in each cell i∈ℤi \in \mathbb{Z} of tape jj.✦ The tuple of scanned symbols in CC is σ(C)=(τ(0,h(0)),…,τ(m,h(m)))\sigma(C) = (\tau(0, h(0)), \dots, \tau(m, h(m))).✦ A single transition step stepM(C)\mathrm{step}_M(C) is undefined when δ(q,σ(C))\delta(q, \sigma(C)) is undefined; otherwise, when δ(q,σ(C))=(q′,(aj,dj)j=0m)\delta(q, \sigma(C)) = (q', (a_j, d_j)_{j=0}^m), it yields the configuration (q′,h′,τ′)(q', h', \tau') with h′(j)=h(j)+Δ(dj)h'(j) = h(j) + \Delta(d_j), τ′(j,h(j))=aj\tau'(j, h(j)) = a_j, and τ′(j,i)=τ(j,i)\tau'(j, i) = \tau(j, i) for all i≠h(j)i \neq h(j).✦

For any binary word w=(w0,…,w|w|−1)w = (w_0, \dots, w_{|w|-1}), the tape encoding tapeA(w):ℤ→ΣA\mathrm{tape}_A(w) : \mathbb{Z} \to \Sigma_A is given by tapeA(w)(i)={1if 0≤i<|w| and wi=0,2if 0≤i<|w| and wi=1,0otherwise.\mathrm{tape}_A(w)(i) = \begin{cases} 1 & \text{if } 0 \le i < |w| \text{ and } w_i = 0, \\ 2 & \text{if } 0 \le i < |w| \text{ and } w_i = 1, \\ 0 & \text{otherwise.} \end{cases}(4)✦ Starting at t=0t = 0 from the initial configuration runM(w,0)\mathrm{run}_M(w, 0) on input ww, the configuration runM(w,t)\mathrm{run}_M(w, t) after t∈ℕt \in \mathbb{N} steps advances to stepM(runM(w,t))\mathrm{step}_M(\mathrm{run}_M(w, t)) whenever that transition is defined and remains fixed once halted.✦ The machine MM outputs a binary word yy on input ww within B∈ℕB \in \mathbb{N} steps if there exists t≤Bt \le B such that stepM(runM(w,t))\mathrm{step}_M(\mathrm{run}_M(w, t)) is undefined and the contents of tape 00 in runM(w,t)\mathrm{run}_M(w, t) equal tapeA(y)\mathrm{tape}_A(y) as defined in (4).✦

A formal language LL belongs to EXPTIME\mathrm{EXPTIME} if there exist a deterministic multitape Turing machine MM and natural numbers c,d∈ℕc, d \in \mathbb{N} such that, for every binary word ww, MM outputs the single-bit word (1)(1) if w∈Lw \in L and (0)(0) if w∉Lw \notin L, within at most 2c(|w|+1)d2^{c(|w| + 1)^d} steps.✦ A language LL reduces to a language RR in deterministic polynomial time, written L≤pRL \le_p R, if there exist a deterministic multitape Turing machine MM and natural numbers c,d∈ℕc, d \in \mathbb{N} such that, for every binary word ww, MM outputs a binary word yy within at most c(|w|+1)dc(|w| + 1)^d steps satisfying w∈Lw \in L if and only if y∈Ry \in R.✦ A language LL is EXPTIME\mathrm{EXPTIME}-complete if L∈EXPTIMEL \in \mathrm{EXPTIME} and R≤pLR \le_p L for every R∈EXPTIMER \in \mathrm{EXPTIME}.✦

The claim

Theorem 1.1. Both WL\mathrm{WL} and SubWL\mathrm{SubWL} are EXPTIME\mathrm{EXPTIME}-complete under deterministic polynomial-time many-one reductions: WL,SubWL∈EXPTIME,R≤pWL and R≤pSubWLfor every R∈EXPTIME.\begin{aligned} \mathrm{WL}, \mathrm{SubWL} &\in \mathrm{EXPTIME}, \\ R \le_p \mathrm{WL} \text{ and } R \le_p \mathrm{SubWL} &\quad \text{for every } R \in \mathrm{EXPTIME}. \end{aligned}(5)✦

What is checked

The Lean library states Theorem 1.1 in (5) over finite simple graphs equipped with joint-update kk-dimensional Weisfeiler-Leman equivalence, the binary-encoded languages WL\mathrm{WL} and SubWL\mathrm{SubWL} in (3), and the deterministic multitape Turing machine definitions of EXPTIME\mathrm{EXPTIME} and polynomial-time many-one reducibility.