---
title: Geometric Simplicial WL Test
url: https://www.emergentmind.com/topics/geometric-simplicial-weisfeiler-lehman-gswl-test
type: topic
---

# Geometric Simplicial WL Test

The Geometric Simplicial Weisfeiler–Lehman (GSWL) test is a color refinement scheme for distinguishing geometric and combinatorial structures in simplicial complexes and hypergraphs. It extends the classical Weisfeiler–Lehman (WL) and Simplicial WL (SWL) tests by incorporating vertex embedding data into the refinement process, thereby achieving discrimination between complexes not only in terms of combinatorial connectivity but also geometric realization. GSWL provides theoretical upper and lower bounds on the expressive power of geometry-aware message passing neural networks and connects directly to complete geometric invariants through the Euler Characteristic Transform (ECT).

## 1. Formal Definition and Methodology

The GSWL test operates on an embedded simplicial complex, $(K,x)$, where $K$ is a (possibly lifted) simplicial complex and $x: \mathrm{vert}(K) \to \mathbb{R}^d$ injectively assigns coordinates to each vertex. For every $k$-dimensional simplex $\sigma = \{v_0, \ldots, v_k\}$ in $K$, a permutation-invariant feature map $\Phi_k(x_{v_0}, ..., x_{v_k}) \in \mathbb{R}^{p_k}$ is computed. Initialization assigns colorings by:
\[
c_\sigma^{(0)} =
\begin{cases}
(0, x_v) \in \{0\} \times \mathbb{R}^d                    & \text{if } \sigma = \{v\} \\
(k, \Phi_k(x_{v_0},...,x_{v_k})) \in \{k\} \times \mathbb{R}^{p_k} & \text{if } \dim \sigma = k \ge 1
\end{cases}
\]
Each refinement step applies an injective multiset aggregation $\mathrm{HASH}$:
\[
c_\sigma^{(\ell+1)} := \mathrm{HASH}\Bigl(
    c_\sigma^{(\ell)},
    \{\!\{c_\tau^{(\ell)} : \tau \in \partial \sigma\}\!\},
    \{\!\{c_\rho^{(\ell)} : \rho \in \text{coface}(\sigma)\}\!\}
\Bigr)
\]
where $\partial\sigma$ denotes the faces of $\sigma$ of dimension $k-1$, and $\text{coface}(\sigma)$ denotes the $k+1$-dimensional cofaces containing $\sigma$.

Two embedded complexes $(K_1, x_1), (K_2, x_2)$ are declared GSWL-$L$ equivalent if their multisets $\{\!\!\{c_\sigma^{(L)} : \sigma \in K_i\}\!\!\}$ are equal after $L$ rounds.

## 2. Connection to Categorical and Combinatorial Lifts

GSWL generalizes the categorical WL (CatWL) framework [2602.06787], in which hypergraphs are lifted to the category of graded posets via a symmetric simplicial complex functor. For a hypergraph $H=(V,E,f)$, the symmetric simplicial lift $S(H)$ forms $n$-simplices $\sigma_e$ from subsets $\sigma\subset f(e)$ for each hyperedge $e$, endowing the collection with a graded poset structure via face inclusion.

The update in this setting, corresponding to a four-adjacency GWL, aggregates colors from:
- Boundary faces,
- Coboundary (cofaces),
- Lower adjacency (peers sharing a face),
- Upper adjacency (peers sharing a coface),

and updates via:
\[
c_{t+1}(\sigma) = \mathrm{HASH}\bigl(
c_t(\sigma),
\{\!\{c_t(\tau): \tau \prec \sigma\}\!\},
\{\!\{c_t(\tau): \tau \succ \sigma\}\!\},
\{\!\{(c_t(\sigma'),c_t(\tau)): (\sigma',\tau)\in N_\downarrow(\sigma)\}\!\},
\{\!\{(c_t(\sigma'),c_t(\tau)): (\sigma',\tau)\in N_\uparrow(\sigma)\}\!\}
\bigr)
\]
[2602.06787]. In the geometric context, this structure is further enriched by the feature maps derived from embeddings $x_v$.

## 3. Expressive Power and Theoretical Guarantees

GSWL strictly refines the classical SWL and standard Hypergraph-WL (HWL) tests. In SWL, initial colorings depend only on simplex dimension and thus cannot differentiate embedded complexes with identical combinatorial structure but differing geometry. The initial coloring in GSWL, which includes geometric features, yields strictly finer partitions. Expressivity theorems establish:
- GSWL dominates HWL and CatWL, distinguishing pairs of hypergraphs or complexes that are indistinguishable to HWL by leveraging the richer adjacency structure of the simplicial lift and geometric features.
- A neural realization of GSWL with injective aggregators and update functions achieves exactly the same partitioning as the combinatorial version (i.e., achieves isomorphism identification on the lifted posets) [2602.06787, 2605.06061].
- For fixed finite families of complexes, geometry-aware boundary–coboundary message passing architectures can attain the full discrimination power of GSWL, provided all MLPs and aggregators have the finite interpolation property [2605.06061].

## 4. Relationship to Geometric Invariants: Euler Characteristic Transform

A crucial result links GSWL to the Euler Characteristic Transform (ECT), which provides a complete geometric invariant for embedded simplicial complexes. For each direction $\nu \in S^{d-1}$ and threshold $t$, the ECT is:
\[
\mathrm{ECT}(K,x)(\nu,t) = \chi\bigl(K_{\nu,t}\bigr) = \sum_{\sigma\in K} (-1)^{\dim\sigma} 1\{t_\nu(\sigma) \le t \}
\]
where $t_\nu(\sigma) = \max_{v \in \mathrm{vert}(\sigma)} \langle x_v, \nu \rangle$. Turner–Curry–Ghrist theorem establishes the injectivity of $x \mapsto \mathrm{ECT}(K,x)$ for fixed $K$, yielding completeness.

GSWL, for $L \geq \dim K$, can reproduce sampled ECT over finite grids via color refinement applied to all simplices and suitable readout, hence connects directly to geometric invariants that are sufficient to distinguish non-congruent embeddings [2605.06061].

## 5. Practical Implementation and Computational Complexity

The naïve computation of the symmetric simplicial lift $S(H)$ is $O(\sum_{e\in E} 2^{|e|})$, but practical implementations truncate at a maximum simplex dimension or hyperedge size $\tau$, leading to cost $O(\sum_{e:|e|\leq\tau} |e|^\tau)$, linear in the number of hyperedges for constant $\tau$. Each refinement round requires $O(|S(H)|+|\mathrm{covering\ edges}|)$, polynomial in the size of the poset [2602.06787]. For geometric simplicial complexes, the cost per step is $O(|C|\cdot\Delta)$, where $|C|$ is the number of cells and $\Delta$ is the maximum neighborhood size; geometric feature computation adds only constant overhead per neighbor [2605.00725].

A high-level one-round pseudocode is:

```python
# Given: hypergraph H, number of WL rounds T
# Precompute: symmetric simplicial lift S(H)
for σ in S(H):
    c_0[σ] = x_v if σ is a vertex else Φ_k(x_{v_0},...,x_{v_k})
for t in 0...T-1:
    for σ in S(H):
        Bcol = {c_t[τ]: τ ≺ σ}
        Ccol = {c_t[τ]: τ ≻ σ}
        Lcol = {(c_t[σ′],c_t[τ]): τ ≺ σ, σ′ ≺ τ, σ′ ≠ σ}
        Ucol = {(c_t[σ′],c_t[τ]): σ ≺ τ, σ′ ≺ τ, σ′ ≠ σ}
        c_{t+1}[σ] = HASH(c_t[σ], Bcol, Ccol, Lcol, Ucol)
```
For geometry-aware SMP, feature computation is added in the initialization and update steps [2602.06787, 2605.06061].

## 6. Extensions, Empirical Hierarchies, and Open Directions

Empirical results establish a monotone expressivity hierarchy: combinatorial SWL ≤ geometry-aware SMP ≤ GSWL, with geometry-aware models dramatically outperforming purely combinatorial ones on tasks where geometric structure is relevant. For instance, GSWL and geometry-aware SMP achieve perfect classification on mesh deformation tasks and outperform classical graph and set-based neural architectures on manifold triangulations and real-world mesh datasets [2605.06061].

Key limitations and open problems include:
- Injectivity requirements (wide MLPs or high-precision hash tables).
- Pure locality of features; current GSWL does not directly encode global homology.
- Integration of persistent homology and continuous cell complexes into the WL framework.
- Determining minimal $k$-skeleton depth required for geometric discrimination, handling chirality, and quantifying over-smoothing in deep geometric networks [2605.00725].

GSWL serves as a cornerstone in the development of theoretically grounded, geometry-sensitive message passing for topological learning, and continues to motivate the synthesis of combinatorial and geometric invariants in higher-order neural architectures.

Source: https://www.emergentmind.com/topics/geometric-simplicial-weisfeiler-lehman-gswl-test