Geodesic Graph Neural Network for Efficient Graph Representation Learning

Lecheng Kong, Yixin Chen, Muhan Zhang

TL;DR

GDGNN (Geodesic Graph Neural Network) is a novel framework designed to break the efficiency-expressiveness tradeoff in graph representation learning. By running a standard Graph Neural Network (GNN) only once and then pooling node embeddings along shortest paths (geodesics), GDGNN achieves the high structural awareness of expensive subgraph-based methods at a fraction of the computational cost.

The Problem: Expressiveness vs. Efficiency

Standard GNNs are highly efficient but are notoriously "blind" to certain structural nuances. Their expressive power is theoretically capped by the 1-Weisfeiler-Lehman (1-WL) test. This means they cannot distinguish between different graph structures if the nodes share the same neighborhood subtrees (e.g., a 3-cycle versus a 4-cycle).

Examples of graphs indistinguishable by the 1-WL test, such as a 3-cycle and a 4-cycle.

To overcome this limitation, researchers have developed more "expressive" GNNs, but these come with a heavy computational price tag:

  1. Higher-order GNNs involve complex tensor operations that fail to scale to large graphs.
  2. Subgraph-based methods (like SEAL or ID-GNN) extract subgraphs for every single node or edge and run GNNs on them repeatedly. Because these subgraphs overlap significantly, the redundant computation is massive, making them nearly impossible to deploy on real-world graphs with millions of nodes.

GDGNN aims to provide the structural punch of these advanced methods while maintaining the single-run efficiency of a basic GNN.

The GDGNN Methodology

The core innovation of GDGNN is the decoupling of node representation learning from structural conditioning. The process follows three main steps:

The GDGNN framework pipeline: from a single GNN run to geodesic extraction and pooling.
  1. Single GNN Run: The model runs a standard GNN (such as GCN or GIN) exactly once on the entire graph to generate base node embeddings.
  2. Geodesic Extraction: For a specific task (like predicting a link between node A and B), the model identifies the "geodesics"—the shortest paths—between the target nodes. The authors propose two types of geodesics:
  3. Horizontal Geodesics: Directly extracting nodes along one shortest path. This captures "depth" and long-range dependencies.
  4. Vertical Geodesics: Extracting all direct neighbors of the target nodes that lie on any shortest path between them. This captures "breadth" and local structural thickness.
  5. Geodesic Pooling: A specialized pooling layer combines the pre-computed GNN embeddings of the nodes found on these geodesics. This injects the conditional relationship between nodes into the final representation without needing to re-run the GNN.

By using the embeddings of nodes on the path as context, the model can "see" the structure connecting two points, effectively bypassing the 1-WL limit.

Key Insights

  • Conditioning is the Secret Sauce: Subgraph methods work because they "label" target nodes, creating a unique coordinate system for each query. GDGNN achieves a similar effect by using the shortest path as a spatial context.
  • Efficiency through Amortization: By reusing the same node embeddings for every geodesic calculation, the per-query cost becomes negligible compared to traditional subgraph methods.
  • Breadth vs. Depth: The paper proves that Vertical Geodesics are particularly powerful. By looking at the "width" of the shortest path (how many neighbors help bridge the gap), the model can distinguish complex distance-regular graphs that even advanced distance-encoding methods miss.
  • Theoretical Superiority: The authors provide a theoretical proof showing that GDGNN with vertical geodesics can distinguish almost all $r$-regular graphs, making it strictly more powerful than plain GNNs.

Experimental Results

The authors evaluated GDGNN across a wide array of benchmarks, including inductive Knowledge Graphs, large-scale OGB datasets, and synthetic benchmarks designed to trick 1-WL GNNs.

  • Massive Speedup: On the OGBL-PPA dataset, GDGNN-Vert finished in 33 minutes, whereas the state-of-the-art SEAL took 2 hours and 20 minutes. Another competitor, NBFNet, failed entirely due to Out-of-Memory (OOM) errors.
  • State-of-the-Art Performance: GDGNN achieved SOTA results on inductive link prediction for FB15K-237 and WN18RR. On OGBL-COLLAB, it outperformed both SEAL and DeeperGCN.
  • Proven Expressiveness: On the synthetic CSL dataset (where standard GIN gets only 10% accuracy), GDGNN achieved 100% accuracy, proving it successfully moves beyond the 1-WL bottleneck.
  • Node Classification: It significantly boosted performance on airport traffic datasets, showing a ~6% improvement over basic GIN on the Brazil-Airports task.

Limitations and Future Work

While the initial GNN run is highly efficient, if the geodesic pooling layer itself becomes overly complex (e.g., using a nested GNN), it could diminish the speed advantages. Additionally, to maintain speed, the authors use a maximum search distance ($d_{max}$) for geodesics, which might limit the model's ability to capture extremely long-range structural patterns in very sparse graphs. Future work will explore more sophisticated pooling functions and extend the framework to complex tasks like subgraph-level representations.

Summary updated

BibTeX
@inproceedings{kong2022geodesic,
  author = {Lecheng Kong and Yixin Chen and Muhan Zhang},
  title = {{Geodesic Graph Neural Network for Efficient Graph Representation Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=zafL7ukulM},
}
Figure