3D Weisfeiler-Leman Algorithm
- The 3-dimensional WL algorithm is a refinement method that colors vertex triples to capture higher-order structural information in graphs and relational systems.
- It employs iterative multiset hashing and efficient encoding procedures that provide strong discriminative power and clear bounds on iteration rounds.
- Applications span graph isomorphism testing, logical characterization in finite model theory, and connections to cellular algebras in algebraic combinatorics.
The 3-dimensional Weisfeiler-Leman algorithm (3-WL) is a canonical combinatorial refinement procedure that operates on ordered triples of vertices in a graph or, more generally, within a finite relational structure. As a central tool in graph isomorphism testing, algebraic combinatorics, and finite model theory, 3-WL generalizes the color refinement algorithm (often termed 1-WL), providing substantially greater discriminative power by considering colored structures and homomorphism counts of treewidth at most 2. Recent work has deepened the understanding of its complexity, lower and upper bounds on iteration counts, its logical characterization, extensions to graphons, and connections to coherent algebras.
1. Formal Definition and Iterative Procedure
The 3-WL algorithm associates a coloring to the set of ordered vertex triples of a given relational structure , iteratively refining this coloring to encode increasingly fine-grained structural information.
- Initialization ():
where is the isomorphism type of the induced substructure on (including equality patterns and edge-relations).
- Refinement (one round):
where is a multiset over all of the triples:
- Termination and Stability:
The process stabilizes after a finite number of rounds when the coloring ceases to change (). The stabilized coloring is denoted .
- Distinguishing Power:
Two structures and are distinguished by 3-WL if the multiset of stabilized 3-colors differs between and (Grohe et al., 2023, Babel et al., 2010, Grohe et al., 2023).
2. Algorithmic Implementation and Complexity
Algorithmic instantiations center on iteratively updating the coloring of triples via hashing, multisets, and efficient encoding schemes:
- Pseudocode highlights:
- For each triple , build multiset of all triples formed by replacing one coordinate with .
- New color is given by an injective encoding of previous color and sorted multiset (Kiefer et al., 2017, Babel et al., 2010).
1 2 3
for t in V^3: M_t = { (χ(w,v2,v3), χ(v1,w,v3), χ(v1,v2,w)) for w in V } newχ[t] = encode(χ[t], sort_multiset(M_t))
- Complexity:
- Number of triples: for graph of vertices.
- Per round: in careful implementations.
- Number of rounds: Upper bound (Grohe et al., 2023), with naive theoretical bound (Kiefer et al., 2017).
- Total runtime: Typically in naive form, but is attainable through careful splitting and data structures (Babel et al., 2010).
3. Upper and Lower Bounds on Iteration Number
Recent work provides the first nontrivial bounds on the required number of refinement rounds for stabilization:
Upper Bound (3-WL):
This result uses algebraic embedding techniques, associating partitions of to semisimple matrix algebras, and leverages the chain length bound for increasing chains of semisimple subalgebras (Grohe et al., 2023).
Lower Bound (Worst-case):
Another construction gives larger lower bounds on relational structures:
The lower bounds are realized through Cay–Fürer–Immerman (CFI) constructions and compressed XOR gadgets that force the color refinement process to survive super-linear (and even polynomial) numbers of rounds.
Summary Table (Specialized to ):
| Bound Type | Structure Type | Lower Bound | Upper Bound |
|---|---|---|---|
| Worst-case Graph | Simple graphs | ||
| Relational | 3-ary structures |
4. Logical Characterizations and Connections to First-order Counting
The iteration number required by the 3-WL procedure to distinguish and corresponds precisely to the quantifier rank of sentences in the 4-variable fragment of first-order logic with counting quantifiers. Formally:
- 3-WL splits after rounds iff there exists a -sentence of quantifier rank at most distinguishing them (Grohe et al., 2023).
- Therefore, upper and lower bounds on translate into bounds on the quantifier rank necessary in . Specifically:
$\text{Separation in $C_4$} \implies \text{Quantifier rank } O(n^2 \log n)$
- Dually, lower bounds show the existence of graph pairs requiring quantifier rank in .
5. Extensions: Graphons, Homomorphism Densities, and Linear Equation Systems
The 3-WL algorithm generalizes naturally to graphons (measurable symmetric functions as limit objects for dense graphs):
- Color refinement for graphons:
Colors points by distributions of edge values and recursively refines using probability measures over multisets derived from (Böker, 2021).
- Homomorphism-density characterization:
3-WL indistinguishability of graphons is equivalent to equality of homomorphism densities for every multigraph of treewidth .
- Parallel edges:
In the graphon setting, parallel edges affect homomorphism densities; thus, the multigraph version of -WL is strictly stronger than its simple graph variant. For ordinary graphs, the distinction vanishes due to integrality (Böker, 2021).
- Linear/fractional isomorphism system:
Non-distinguishability by 3-WL is equivalent to the solvability of a system of linear equations on partial isomorphisms between graphs (and their infinite-dimensional analogue for graphons).
6. Algebraic Combinatorics and Cellular Algebras
The output of stabilized 3-WL colorings corresponds to the cellular algebra generated by the adjacency matrix , encapsulating automorphism orbits and providing a powerful algebraic invariant:
- For most molecular and combinatorial graphs, coincides with the centralizer algebra of the automorphism group .
- The stable partition returned by 3-WL (or its equivalent depth-one stabilization) matches the orbit partition of in generic cases (Babel et al., 2010, Chen et al., 2023).
- Efficient implementations allow handling graphs of several thousand vertices in practice.
7. Applications, Special Classes, and Limitations
Planar Graphs:
The WL-dimension of all finite planar graphs is at most 3, meaning 3-WL suffices to characterize them up to isomorphism. This improves previously best-known bounds from dimension 14 to 3 and ensures definability in first-order logic with counting using at most 4 variables. Exceptional 3-connected planar graphs with fixing number 3 require individualization of certain vertices, but 3-WL still resolves their orbits correctly (Kiefer et al., 2017).
Coherent Configurations and Depth-1 Stabilization:
A simplified depth-1 version of Weisfeiler’s deep stabilization ("W₁⁄₂", Editor's term) matches the distinguishing power of non-recursive 3-WL projected to pairs, both in terms of coherent configurations and computational complexity (Chen et al., 2023).
Limitations:
Some structures, such as incidence graphs of projective planes of order with at least two non-isomorphic planes, require WL-dimension at least 4 for identification.
References
- "The Iteration Number of the Weisfeiler-Leman Algorithm" (Grohe et al., 2023)
- "Compressing CFI Graphs and Lower Bounds for the Weisfeiler-Leman Refinements" (Grohe et al., 2023)
- "The Weisfeiler-Leman Dimension of Planar Graphs is at most 3" (Kiefer et al., 2017)
- "Algebraic Combinatorics in Mathematical Chemistry. Methods and Algorithms. II. Program Implementation of the Weisfeiler-Leman Algorithm" (Babel et al., 2010)
- "On the Weisfeiler algorithm of depth-$1$ stabilization" (Chen et al., 2023)
- "Weisfeiler-Leman Indistinguishability of Graphons" (Böker, 2021)