Topology-Informed Graph Transformer

Yun Young Choi, Sun Woo Park, Minho Lee, Youngho Woo

TL;DR

Standard Graph Transformers and Message-Passing Neural Networks (MPNNs) often struggle to distinguish topologically distinct, non-isomorphic graphs due to expressive power limits bounded by the 1-Weisfeiler-Lehman (1-WL) test. This paper introduces the Topology-Informed Graph Transformer (TIGT), an architecture that injects cycle basis information via clique adjacency matrices into positional encodings and message-passing layers. By explicitly modifying the universal covering spaces of graphs, TIGT proves strictly more expressive than 3-WL on key graph families while outperforming modern Graph Transformers on large real-world benchmarks.

What Problem Does This Paper Address?

Standard MPNNs are bounded in expressive power by the 1-WL graph isomorphism test, frequently failing to detect higher-order substructures such as cycles or cut-vertices. While Graph Transformers address message-passing bottlenecks (such as over-smoothing and over-squashing) via all-to-all global attention, they lack strong inductive biases and rely heavily on positional/structural encodings (e.g., Laplacian eigenvectors, random walks).

The authors demonstrate theoretically that standard random-walk positional encodings (like RRWP) converge geometrically to stationary distributions, causing their discriminative power to decay as walks or network layers grow. As a result, existing Graph Transformers often fail to distinguish non-isomorphic graphs when networks become deep.

Methods

TIGT integrates topological invariants directly into the network architecture across four primary modules:

  1. Topological Positional Embedding Layer: Computes representations from both the original adjacency matrix $A$ and a clique adjacency matrix $A_C$ (derived by turning cycle bases of the graph into fully connected cliques). Because the universal covers of cycle graphs are merely infinite lines, converting cycles into cliques creates topologically non-isomorphic universal covers. Node embeddings are passed through shared-weight MPNNs over both $A$ and $A_C$ and fused with a $\tanh$ activation.
  2. Dual-Path Message-Passing Layer: In each encoder layer, representations are computed simultaneously across the original connectivity ($A$) and cycle-clique connectivity ($A_C$), preventing topological signals from washing out as network depth increases.
  3. Global Attention Layer: Standard vanilla Transformer multi-head self-attention applied globally across all nodes to capture long-range dependencies.
  4. Graph Information Layer: A channel-wise recalibration block inspired by Squeeze-and-Excitation networks. Graph-level pooled representations are compressed and expanded via MLP bottlenecks to scale node features adaptively.

Datasets

The authors evaluate TIGT across synthetic and real-world benchmarks:

  • Expressive Power Benchmark: Circular Skip Link (CSL) dataset (isomorphism classification across strongly regular-like skip graphs).
  • Benchmarking GNNs: ZINC (12k subset), MNIST, CIFAR10, PATTERN, and CLUSTER.
  • Long-Range Graph Benchmark (LRGB): Peptides-func (multi-label classification) and Peptides-struct (regression).
  • Large-Scale Graph Benchmarks: ZINC-full (250k graphs) and PCQM4Mv2 (3.7M molecules for quantum chemical regression).
  • Note: No new datasets were introduced.

Key Insights and Ideas

  • Covering Space Theory for Expressive Power: Conventional GNNs map two graphs to identical embeddings if their universal covers are isomorphic. Turning cycle bases into cliques changes the geometry of these universal covers, proving that TIGT can distinguish graph pairs that even the 3-WL test cannot (such as the 4×4 Rook's graph vs. the Shrikhande graph), as well as vertex- and edge-biconnectivity.
  • Decay of Random Walk Encodings: The authors prove (Theorem 3.4) that relative random walk probabilities (RRWP) converge at a geometric rate $\gamma^l$ to a fixed stationary distribution for non-bipartite graphs sharing node degree profiles. Thus, relying solely on random walks cannot prevent representations from collapsing in deeper networks.
  • Preserving Topology at Depth: While prior models lose performance on CSL as layers increase (e.g., GPS+RWSE drops from 88.3% to 75.0% when scaled to 10 layers; Cy2C-GIN drops from 98.3% to 7.5%), TIGT maintains 100% accuracy from 2 up to 10 layers due to continuous dual-path topological propagation.

Key Results

  • Synthetic CSL: TIGT reaches 100.0% accuracy across 2, 5, and 10 layers, whereas GRIT+RRWP completely fails (10.0% accuracy across all depths).
  • ZINC (12k): Achieves 0.057 MAE, beating GraphGPS (0.070) and GRIT (0.059).
  • Large-Scale Graphs (ZINC-full & PCQM4Mv2):
  • On ZINC-full, TIGT reaches state-of-the-art 0.014 MAE (compared to GRIT’s 0.023 and Graphormer-GD's 0.025).
  • On PCQM4Mv2, TIGT achieves 0.0826 validation MAE with only 13.0M parameters, outperforming Graphormer (0.0864, 48.3M params) and GraphGPS-medium (0.0858, 19.4M params).
  • Vision & Long-Range Benchmarks: Achieves top performance on MNIST (98.230% accuracy) and competitive second-place finishes on CIFAR10 (73.955%) and Peptides-struct (0.2485 MAE).

Limitations and Future Work

  • Computational Complexity: The global self-attention mechanism imposes $\mathcal{O}(N^2)$ time and memory complexity with respect to the number of nodes, in addition to cycle extraction costs $\mathcal{O}(N^2 + N_E + N_C)$. Attempts to use linear-complexity approximations (like Performer) degraded performance to levels equivalent to removing global attention entirely.
  • Task Scope: The model was tested strictly on graph-level classification and regression benchmarks; extension to node classification and edge link prediction remains unexplored.

Summary updated

BibTeX
@inproceedings{choi2024topology,
  author = {Yun Young Choi and Sun Woo Park and Minho Lee and Youngho Woo},
  title = {{Topology-Informed Graph Transformer}},
  booktitle = {GRaM @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=O5q2B2sGZe},
}
Figure