Table of Contents
Fetching ...

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

Jiangyan Ma, Yifei Wang, Yisen Wang

TL;DR

This work tackles the sign and basis invariance problems in spectral graph embeddings by introducing Laplacian Canonization (LC) and a practical algorithm, Maximal Axis Projection (MAP), to canonize eigenvectors in a pre-processing step. MAP achieves sign and basis invariance while preserving embedding dimensionality, and its theoretical analysis characterizes canonizability with conditions under which MAP is complete for signs and largely complete for bases. Empirically, MAP consistently improves performance across multiple GNN architectures on benchmarks such as ZINC, MOLTOX21, and MOLPCBA, while incurring minimal computational overhead and often reducing training time compared to prior invariant methods. The approach offers a lightweight, plug-in enhancement for spectral embeddings that strengthens permutation-equivariant learning and scalability in graph neural networks.

Abstract

Spectral embedding is a powerful graph embedding technique that has received a lot of attention recently due to its effectiveness on Graph Transformers. However, from a theoretical perspective, the universal expressive power of spectral embedding comes at the price of losing two important invariance properties of graphs, sign and basis invariance, which also limits its effectiveness on graph data. To remedy this issue, many previous methods developed costly approaches to learn new invariants and suffer from high computation complexity. In this work, we explore a minimal approach that resolves the ambiguity issues by directly finding canonical directions for the eigenvectors, named Laplacian Canonization (LC). As a pure pre-processing method, LC is light-weighted and can be applied to any existing GNNs. We provide a thorough investigation, from theory to algorithm, on this approach, and discover an efficient algorithm named Maximal Axis Projection (MAP) that works for both sign and basis invariance and successfully canonizes more than 90% of all eigenvectors. Experiments on real-world benchmark datasets like ZINC, MOLTOX21, and MOLPCBA show that MAP consistently outperforms existing methods while bringing minimal computation overhead. Code is available at https://github.com/PKU-ML/LaplacianCanonization.

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

TL;DR

This work tackles the sign and basis invariance problems in spectral graph embeddings by introducing Laplacian Canonization (LC) and a practical algorithm, Maximal Axis Projection (MAP), to canonize eigenvectors in a pre-processing step. MAP achieves sign and basis invariance while preserving embedding dimensionality, and its theoretical analysis characterizes canonizability with conditions under which MAP is complete for signs and largely complete for bases. Empirically, MAP consistently improves performance across multiple GNN architectures on benchmarks such as ZINC, MOLTOX21, and MOLPCBA, while incurring minimal computational overhead and often reducing training time compared to prior invariant methods. The approach offers a lightweight, plug-in enhancement for spectral embeddings that strengthens permutation-equivariant learning and scalability in graph neural networks.

Abstract

Spectral embedding is a powerful graph embedding technique that has received a lot of attention recently due to its effectiveness on Graph Transformers. However, from a theoretical perspective, the universal expressive power of spectral embedding comes at the price of losing two important invariance properties of graphs, sign and basis invariance, which also limits its effectiveness on graph data. To remedy this issue, many previous methods developed costly approaches to learn new invariants and suffer from high computation complexity. In this work, we explore a minimal approach that resolves the ambiguity issues by directly finding canonical directions for the eigenvectors, named Laplacian Canonization (LC). As a pure pre-processing method, LC is light-weighted and can be applied to any existing GNNs. We provide a thorough investigation, from theory to algorithm, on this approach, and discover an efficient algorithm named Maximal Axis Projection (MAP) that works for both sign and basis invariance and successfully canonizes more than 90% of all eigenvectors. Experiments on real-world benchmark datasets like ZINC, MOLTOX21, and MOLPCBA show that MAP consistently outperforms existing methods while bringing minimal computation overhead. Code is available at https://github.com/PKU-ML/LaplacianCanonization.
Paper Structure (49 sections, 25 theorems, 48 equations, 7 figures, 17 tables, 8 algorithms)

This paper contains 49 sections, 25 theorems, 48 equations, 7 figures, 17 tables, 8 algorithms.

Key Result

Theorem 1

Let $\Omega\subset\mathbb{R}^{n\times d}\times\mathbb{R}^{n\times n}$ be a compact set of graphs, $[{\bm{X}},\hat{{\bm{A}}}]\in\Omega$. Let $\mathop{\mathrm{NN}}\nolimits$ be a universal neural network on sets. Given any continuous invariant graph function $f$ defined over $\Omega$ and arbitrary $\v

Figures (7)

  • Figure 1: The dilemma where permutation-equivariance, sign-invariance and universal expressive power cannot be achieved at the same time.
  • Figure 2: #Eigenvalues w.r.t. their multiplicities in real-world datasets (in logarithmic scale).
  • Figure 3: Learning curves on Exp.
  • Figure 4: A toy example illustrating our algorithm for eliminating sign ambiguity. Top: The angle between the $z$-axis and ${\bm{u}}$ is the smallest, so we choose $+{\bm{u}}$ to maximize ${\bm{u}}^\top{\bm{e}}_z$. Bottom: The angle between both $x$ and $y$-axes and ${\bm{u}}$ are the smallest, so we choose $+{\bm{u}}$ to maximize ${\bm{u}}^\top({\bm{e}}_x+{\bm{e}}_y)$.
  • Figure 5: A toy example illustrating our algorithm for eliminating basis ambiguity. First, we sort the angles between $V$ and the standard basis vectors, and set ${\bm{x}}_1\coloneqq{\bm{e}}_x,{\bm{x}}_2\coloneqq{\bm{e}}_y$. Next, we choose ${\bm{u}}_1\in V$ that maximizes ${\bm{u}}_1^\mathrm{T}{\bm{x}}_1$. Finally, we choose ${\bm{u}}_2\in\langle{\bm{u}}_1\rangle^\perp$ that maximizes ${\bm{u}}_2^\mathrm{T}{\bm{x}}_2$. This gives us a unique basis ${\bm{u}}_1,{\bm{u}}_2$ of $V$.
  • ...and 2 more figures

Theorems & Definitions (52)

  • Theorem 1
  • Definition 1
  • Theorem 2
  • Corollary 1: Sign canonizability
  • Corollary 2: Basis canonizability
  • Remark
  • Theorem 3
  • Theorem 4
  • Remark
  • Theorem 5
  • ...and 42 more