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

Laplacian Canonization: A Minimalist Approach to Sign and Basis Invariant Spectral Embedding

George Ma, Yifei Wang, Yisen Wang

Graph Neural Networks (GNNs) are the workhorses of modern graph machine learning, but standard message-passing architectures suffer from a fundamental limitation: they cannot distinguish between certain non-isomorphic graphs (known as the 1-WL limit). To overcome this, researchers often augment GNNs with Spectral Embeddings (SE)—positional encodings derived from the eigenvectors of a graph's Laplacian matrix. These embeddings give nodes unique "coordinates," significantly boosting the model's expressive power.

However, spectral embeddings introduce two major mathematical headaches that can confuse neural networks: sign and basis ambiguity. In this paper, researchers introduce Laplacian Canonization (LC) and an efficient algorithm called Maximal Axis Projection (MAP). This minimalist pre-processing technique resolves these ambiguities directly, allowing standard GNNs to achieve universal expressive power with significantly less computational overhead than previous state-of-the-art methods.

The Problem: Sign and Basis Ambiguity

When we compute the eigenvectors of a graph to use as embeddings, the math doesn't give us a single, unique answer.

  1. Sign Ambiguity: An eigenvector $u$ is mathematically identical to $-u$. A GNN might see these as completely different inputs, even though they represent the exact same underlying graph structure.
  2. Basis Ambiguity: When a graph has multiple identical eigenvalues (multiplicity > 1), any orthogonal transformation (rotation) of the corresponding eigenvectors is equally valid.

Previous solutions, such as SignNet or BasisNet, attempted to "learn" these invariances by building complex, high-order neural network modules. These approaches are computationally expensive—sometimes reaching $O(n^4)$ complexity—and scale poorly to larger graphs.

The Solution: Laplacian Canonization

Instead of forcing the neural network to learn complex invariances, the authors ask a simpler question: Can we just fix the eigenvectors in a pre-processing step?

The proposed Laplacian Canonization (LC) transforms the eigenvectors into a standardized, "canonical" form before training even begins. The core of this approach is the Maximal Axis Projection (MAP) algorithm:

  • Axis Projection: MAP takes standard basis vectors (the axes of Euclidean space) and projects them onto the eigenspace. Because these axes are permutation-equivariant, their projections provide a stable, consistent reference point.
  • MAP-Sign: To fix the sign ambiguity, the algorithm finds a summary vector that is not perpendicular to the eigenvector and simply chooses the sign that makes the projection positive.
  • MAP-Basis: For the more complex basis ambiguity, MAP iteratively selects a basis that is "closest" to the projected axes in a specific, deterministic order.

To ensure the resulting embeddings are "universal" (capable of distinguishing any two graphs), the authors also introduce Reweighted Spectral Embedding (RSE). RSE scales each eigenvector by the square root of its eigenvalue, ensuring the GNN receives crucial information about both the graph's "shape" and "scale."

Comparison of spectral embedding methods.

As shown above, MAP provides a comprehensive solution that addresses both sign and basis ambiguity while maintaining a minimal feature dimension ($n$), unlike previous methods that inflate the feature space or require heavier computation. While the overall pre-processing time remains $O(n^3)$ due to the initial eigendecomposition, the MAP algorithm itself only adds a negligible $O(n^2 \log n)$ overhead.

Key Insights: Real-World Graphs are "Messy"

A fascinating theoretical hurdle in canonization is that perfectly symmetric graphs can produce vectors that are mathematically "uncanonizable." However, the authors discovered that real-world data is rarely that perfect.

In practice, over 90% of eigenvectors in standard datasets can be successfully canonized. Real-world molecular graphs possess enough structural "messiness" that the perfect mathematical symmetries causing failure simply don't appear often. For the small percentage of vectors that cannot be canonized, the authors suggest falling back on random sign flipping during training.

Key Results and Performance

The minimalist philosophy of MAP pays off significantly in both performance and efficiency across standard benchmarks like ZINC, OGBG-MOLTOX21, OGBG-MOLPCBA, and the synthetic EXP dataset.

  • State-of-the-Art Accuracy: MAP-canonized GNNs consistently matched or outperformed more complex models. On the ZINC dataset, MAP paired with a GatedGCN achieved a Mean Absolute Error (MAE) of 0.120, setting a new standard for spectral methods.
  • Computational Efficiency: Because MAP handles the heavy lifting during pre-processing, training is vastly accelerated. On the large-scale MOLPCBA dataset, a GatedGCN model trained 41% faster with MAP compared to SignNet, saving approximately 44 hours of GPU time.
  • Breaking the 1-WL Limit: On the synthetic EXP dataset—designed specifically to test expressivity—the Reweighted Spectral Embedding (RSE) achieved near 100% accuracy, proving it successfully bypasses the 1-WL limit where standard GNNs fail (stuck at 50% accuracy).
Performance on the ZINC dataset.

Conclusion and Future Work

Laplacian Canonization demonstrates that a smart, mathematically grounded data-cleaning step is often superior to building a more complex neural network. By resolving sign and basis ambiguities before the data ever reaches the GNN, MAP offers a lightweight, highly effective boost to graph representation learning.

While the authors have proven that MAP-Sign is theoretically complete, a fully complete algorithm for basis canonization remains an open challenge. Future work will likely explore how to handle the rare, highly symmetric graphs that currently resist canonization, further solidifying this minimalist approach to spectral embedding.

Summary updated

BibTeX
@inproceedings{ma2023laplacian,
  author = {George Ma and Yifei Wang and Yisen Wang},
  title = {{Laplacian Canonization: A Minimalist Approach to Sign and Basis Invariant Spectral Embedding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=1mAYtdoYw6},
}
Figure