An Edge-Based Weisfeiler Leman Test for Hypergraphs

John Paul Cardenas, Chunjiang ZhuLOG 2026 Poster 2026

TL;DR

Classic Hypergraph Neural Networks (HNNs) are limited by the expressive power of the 1-dimensional generalized Weisfeiler–Leman test (1-GWL), while higher-dimensional $k$-GWL tests are too slow ($O(n^k)$) to scale. This paper introduces EB-GWL, an edge-based test for hypergraphs that colors pairs of vertices sharing a hyperedge, along with its neural counterpart EB-HNN. On major benchmarks, EB-HNN beats state-of-the-art $k$-GWL models while slashing preprocessing time from 12–24 hours down to 21–143 seconds.

What Problem Does This Paper Address?

Standard graphs only capture pairwise relationships—like two people being friends. Hypergraphs generalize this by using hyperedges to connect any number of vertices at once, making them ideal for modeling group chats, co-authorship, or metabolic reactions.

While Hypergraph Neural Networks (HNNs) like UniGNN, AllSet, and ED-HNN perform well in practice, their ability to distinguish different hypergraphs is fundamentally capped by the 1-GWL isomorphism test. Higher-dimensional $k$-GWL tests break this ceiling, but they require tracking $k$-tuples of vertices at a prohibitive $O(n^k)$ computational cost.

In standard graphs, a recent method called EB-1WL bridged the gap between cheap 1-WL and costly 2-WL by coloring edges rather than all possible pairs of vertices. The authors ask: can we bring that same edge-based efficiency to hypergraphs?

Methods

The authors introduce EB-GWL (Edge-Based Generalized Weisfeiler–Leman), which colors ordered pairs of vertices $(u, v)$ that co-occur in at least one hyperedge.

  • What is standard: The message-passing refinement step mirrors EB-1WL. At each iteration, a pair $(u, v)$ updates its color by hashing four things: its own previous color, the colors of pairs sharing a hyperedge with $u$, the colors of pairs sharing a hyperedge with $v$, and the pairs of colors forming triangles with $u$ and $v$.
  • What is new: A naive way to apply EB-1WL to a hypergraph is to turn every hyperedge into a clique (connecting all pairs inside it) and run EB-1WL. However, this clique expansion erases hyperedge size information. EB-GWL solves this at initialization: each pair $(u, v)$ is initialized with the multiset of sizes of all hyperedges containing both $u$ and $v$ (e.g., {{2, 3}} if they co-occur in one size-2 and one size-3 hyperedge).

They also build EB-HNN, the neural counterpart of EB-GWL, by applying EB-GNN to the hypergraph's clique expansion with these hyperedge-size multisets as initial pair embeddings.

Datasets

The authors evaluate EB-HNN on three existing hypergraph benchmarks from the $k$-GWL literature, using the same 5-fold cross-validation splits and training protocols:

  • Steam-Player
  • Twitter-Friend
  • IMDB (specifically IMDB-Dir and IMDB-Wri, each evaluated on Form and Genre tasks)

No new datasets are introduced.

Key Insights and Ideas

  • Clean reduction to graphs: On simple (2-uniform) graphs, EB-GWL reduces identically to EB-1WL.
  • Strictly stronger than clique expansion: EB-GWL is strictly more expressive than running EB-1WL on a clique expansion. For instance, a single 3-vertex hyperedge and three 2-vertex hyperedges produce the exact same clique expansion, yet EB-GWL tells them apart immediately at initialization.
  • Separates 1-GWL: EB-GWL can distinguish hypergraphs that 1-GWL cannot. In a 6-vertex example where both hypergraphs have identical vertex degrees and hyperedge sizes ({{2, 2, 3, 3}}), EB-GWL separates them because a specific pair of vertices co-occurs in two hyperedges in one graph, but only one in the other.
Figure 1: Left: witness for Theorem 2. Right: witness for Theorem 3.

Key Results

  • State-of-the-art accuracy on two benchmarks: EB-HNN achieves the highest reported accuracy on Twitter-Friend ($70.31 \pm 2.52\%$ vs. $64.12\%$ for the best baseline) and Steam-Player ($69.19 \pm 1.23\%$ vs. $67.53\%$ for 2-FHNN).
  • Initialization matters: Ablating the hyperedge-size initialization (reverting to a plain clique expansion + EB-GNN) drops accuracy from $67.43\%$ to $56.49\%$ on Steam-Player and from $70.31\%$ to $60.53\%$ on Twitter-Friend.
  • Massive speedup: Preprocessing completes in 21–143 seconds across all datasets, compared to 12–24 hours reported for $k$-GWL (though the authors note these were run on different hardware and implementations).
  • Mixed results on IMDB: On IMDB-Dir and IMDB-Wri, EB-HNN lands in the middle of the pack compared to $k$-GWL baselines.

Limitations and Future Work

  • Scaling to huge hyperedges: Because EB-GWL aggregates over co-membership neighborhoods, its cost per round is cubic in hyperedge size ($\Theta(|e|^3)$). On IMDB-Wri-Genre, outlier hyperedges of size $> 200$ caused memory bottlenecks, forcing the authors to cap hyperedge sizes at 150—likely hurting accuracy. Scaling to large hyperedges remains open.
  • Open theoretical conjectures: While the authors prove EB-GWL can separate hypergraphs that 1-GWL cannot, they have not yet proved that EB-GWL is strictly more expressive than 1-GWL (Conjecture 1) or that it is upper-bounded by 2-GFWL (Conjecture 2).

Summary updated

BibTeX
@inproceedings{cardenas2026edge,
  author = {John Paul Cardenas and Chunjiang Zhu},
  title = {{An Edge-Based Weisfeiler Leman Test for Hypergraphs}},
  booktitle = {LOG 2026 Poster},
  year = {2026},
  url = {https://openreview.net/forum?id=TSQ4wleOnv},
}
Figure