Graph Transformers for Large Graphs

Vijay Prakash Dwivedi, Yozen Liu, Anh Tuan Luu, Xavier Bresson, Neil Shah +1 more
12/18/2023
cs.LG

No official code found. Best implementation: snap-research/LargeGT (22 stars, last commit 2024-04-26).

Abstract

Transformers have recently emerged as powerful neural networks for graph learning, showcasing state-of-the-art performance on several graph property prediction tasks. However, these results have been limited to small-scale graphs, where the computational feasibility of the global attention mechanism is possible. The next goal is to scale up these architectures to handle very large graphs on the scale of millions or even billions of nodes. With large-scale graphs, global attention learning is proven impractical due to its quadratic complexity w.r.t. the number of nodes. On the other hand, neighborhood sampling techniques become essential to manage large graph sizes, yet finding the optimal trade-off between speed and accuracy with sampling techniques remains challenging. This work advances representation learning on single large-scale graphs with a focus on identifying model characteristics and critical design constraints for developing scalable graph transformer (GT) architectures. We argue such GT requires layers that can adeptly learn both local and global graph representations while swiftly sampling the graph topology. As such, a key innovation of this work lies in the creation of a fast neighborhood sampling technique coupled with a local attention mechanism that encompasses a 4-hop reception field, but achieved through just 2-hop operations. This local node embedding is then integrated with a global node embedding, acquired via another self-attention layer with an approximate global codebook, before finally sent through a downstream layer for node predictions. The proposed GT framework, named LargeGT, overcomes previous computational bottlenecks and is validated on three large-scale node classification benchmarks. We report a 3x speedup and 16.8% performance gain on ogbn-products and snap-patents, while we also scale LargeGT on ogbn-papers100M with a 5.9% performance improvement.

View on arXivView PDF

Code Implementations(1)

Graph Transformers for Large Graphs

224Shell, PythonOct 4, 20232 years agoNOASSERTION
gnngraph-transformermachinelearningtransformer

Similar Papers

Cite this paper

@article{dwivedi2023graph,
  title  = {Graph Transformers for Large Graphs},
  author = {Vijay Prakash Dwivedi and Yozen Liu and Anh Tuan Luu and Xavier Bresson and Neil Shah and Tong Zhao},
  year   = {2023},
  eprint = {2312.11109},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.11109v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.11109.svg)](https://codeofpaper.com/paper/2312.11109)

Discussion