NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Weisfeiler-Leman Is Incomplete on Simple Spectrum Graphs, so Canonicalize Them

Snir Hordan, Nadav Dym, Tim SeppeltNeurIPS 2026

TL;DR

Graphs with distinct eigenvalues ("simple-spectrum" graphs) are famously easy to tell apart mathematically—you can do it in cubic time. Yet, this paper proves that the entire hierarchy of standard Graph Neural Networks (GNNs) fails to distinguish all of them, no matter how computationally heavy you make the network. To fix this blind spot, the authors introduce PRiSM, a fast preprocessing recipe that locks a graph's eigenvectors into a unique, unambiguous representation, unlocking universal approximation when paired with standard Transformers or DeepSets.

What Problem Does This Paper Address?

When you feed a molecule or social network into a GNN, you want the model to tell different graphs apart (the graph isomorphism problem). To measure a GNN’s "expressive power," researchers use a theoretical yardstick called the Weisfeiler–Leman ($k$-WL) hierarchy—a family of color-refinement algorithms. As $k$ increases, the test gets exponentially more powerful (running in $O(k^2 n^{k+1} \log n)$ time), bounding the capabilities of almost all widely-used combinatorial GNNs.

Now consider simple-spectrum graphs: graphs whose adjacency matrices have no repeated eigenvalues. Practically speaking, almost all large random graphs fall into this category, and classical algorithms can tell them apart in breezy $O(n^3)$ time. Yet, it remained an open question whether $k$-WL GNNs could reliably distinguish them.

Meanwhile, practitioners often try to bypass WL limitations by feeding eigenvector "positional encodings" into Graph Transformers. Because an eigenvector $v$ and its negation $-v$ are equally valid mathematically, you have to resolve this "sign ambiguity." Existing sign-fixing methods handle each eigenvector in isolation, which provably fails on symmetric ("uncanonicalizable") eigenvectors, leaving true completeness on simple-spectrum graphs an open problem.

Methods

The authors tackle both the theoretical blind spot and the practical fix:

  1. Proving WL Incompleteness via Spectral Encoding: Standard counterexamples used to fool $k$-WL tests are built using the Cai–Fürer–Immerman (CFI) construction, which applies a subtle "parity twist" to a base graph to create non-isomorphic twins that look locally identical.
Figure 1: The CFI construction applied to the base graph G = C3. (a) Trivial lift G∅∼= 2 C3: the (i, ∅) vertices and (i, E(i)) vertices each form an independent triangle. (b) Non-trivial lift G{0} ∼= C6: the parity twist at vertex 0 bridges the two triangles into a single 6-cycle (dashed circles mark the twisted fiber). Colors indicate base-graph vertex correspondence and are for visualization purposes only.

However, CFI graphs have lots of repeated eigenvalues. The authors' novel trick is an orthogonal integral encoding: they take a 3-regular CFI graph pair, encode its structure into an orthogonal matrix, and pair it with distinct integer eigenvalues. Reassembling this into an adjacency matrix yields a pair of simple-spectrum multigraphs (graphs with positive integer edge weights) that still completely fool $k$-WL.

  1. PRiSM (Partition, Refine, Solve, Match): Instead of fixing eigenvector signs one column at a time, PRiSM canonicalizes the $n \times k$ eigenvector matrix globally in four steps:
  2. Partition: Group nodes by the absolute values of their eigenvector entries (which are naturally sign-invariant).
  3. Refine: Run a spectral color-refinement pass using elementwise products of node rows until the node groups stabilize.
  4. Solve: Here is the magic. Require that every node group contains at least one row with all non-negative entries. Because sign flips act multiplicatively ($\pm 1$), this translates cleanly into a system of linear equations over the binary field $\mathbb{Z}_2 = \{0, 1\}$. Solving this global system fixes all eigenvector signs simultaneously up to graph symmetries!
  5. Match: Lexicographically sort the rows to lock in a canonical node ordering.

For graphs that do have repeated eigenvalues, the authors provide a heuristic extension using QR decomposition.

Datasets

No new datasets are introduced. The authors evaluate PRiSM across established benchmarks:

  • Expressivity: BREC (360 pairs of tricky, regular, and WL-indistinguishable graphs across Basic, Regular, Extension, and CFI categories).
  • Molecular Property Prediction: ZINC 12K, ALCHEMY (12-task quantum-chemistry regression), and OGB datasets (MOLTOX21, MOLPCBA, MOLHIV, MOLCLINTOX, MOLBBBP).

Key Insights and Ideas

  • Complexity vs. Expressivity Mismatch: Even if you climb to level $k=100$ in the WL hierarchy—spending $O(n^{101} \log n)$ compute—your GNN will still fail to distinguish certain simple-spectrum multigraphs that a basic $O(n^3)$ spectral algorithm solves effortlessly. Combinatorial message-passing fundamentally misses global spectral geometry.
  • Global Linear Systems Beat Local Heuristics: Prior canonicalizers (like MAP and OAP) get stuck when an eigenvector $v$ is just a permuted version of $-v$. By framing sign selection as a joint linear system over $\mathbb{Z}_2$ across all eigenvectors at once, PRiSM resolves ambiguities that are impossible to untangle column-by-column.
  • Cheap Preprocessing, Universal Power: Composing PRiSM with universal set architectures (like DeepSets or Transformers) guarantees universal approximation on compact sets of simple-spectrum graphs. Better yet, PRiSM runs once during preprocessing, often hitting a fast $O(nk \log n)$ path in practice.

Key Results

Across all benchmarks, PRiSM matches or beats vanilla Laplacian Positional Encodings (LPE), SignNet, MAP, and OAP at matched parameter budgets:

  • BREC Distinguishability: Paired with DeepSets, PRiSM distinguishes 212/360 graph pairs, beating MAP and OAP (199/360 each), driven by gains on Regular (+8) and Extension (+5) graphs. (As expected, all three methods only get 3/100 on CFI graphs due to high eigenvalue multiplicities).
  • GNN Backbones (GatedGCN & PNA): PRiSM is best or tied-best in 5 of 6 setups, lowering ZINC MAE to 0.103 (PNA) and 0.110 (GatedGCN), and hitting 0.278 AP on MOLPCBA (where SignNet runs out of memory).
  • Transformer Backbones: Feeding PRiSM's canonicalized eigenvectors and its canonical node ordering into a Graph Transformer takes first place across all four tested datasets, notably boosting MOLHIV ROC-AUC to 0.7430 (vs. 0.7221 for MAP) and MOLCLINTOX to 0.8576 (vs. 0.7905 for LPE).

Limitations and Future Work

  • Multigraphs vs. Simple Graphs: The $k$-WL incompleteness proof relies on multigraphs (integer edge weights). Proving whether the same gap holds for unweighted, simple combinatorial graphs (0/1 edges) remains an open theoretical challenge.
  • Repeated Eigenvalues: PRiSM’s completeness guarantee strictly applies to simple eigenvalues ($m=1$). Its extension to higher-multiplicity eigenspaces ($m > 1$) is purely heuristic; achieving provably complete canonicalization for arbitrary eigenvalue multiplicities is left for future work.

Summary updated

BibTeX
@inproceedings{hordan2026weisfeiler,
  author = {Snir Hordan and Nadav Dym and Tim Seppelt},
  title = {{Weisfeiler-Leman Is Incomplete on Simple Spectrum Graphs, so Canonicalize Them}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=gQCHWXz2Fu},
}
Figure