Global Self-Attention as a Replacement for Graph Convolution

Md Shamim Hussain, Mohammed J. Zaki, Dharmashankar Subramanian
8/7/2021
cs.LG

Official code: shamim-hussain/egt_pytorch (81 stars, MIT, PyTorch, last commit 2024-02-16). 2 more implementations below.

Abstract

We propose an extension to the transformer neural network architecture for general-purpose graph learning by adding a dedicated pathway for pairwise structural information, called edge channels. The resultant framework - which we call Edge-augmented Graph Transformer (EGT) - can directly accept, process and output structural information of arbitrary form, which is important for effective learning on graph-structured data. Our model exclusively uses global self-attention as an aggregation mechanism rather than static localized convolutional aggregation. This allows for unconstrained long-range dynamic interactions between nodes. Moreover, the edge channels allow the structural information to evolve from layer to layer, and prediction tasks on edges/links can be performed directly from the output embeddings of these channels. We verify the performance of EGT in a wide range of graph-learning experiments on benchmark datasets, in which it outperforms Convolutional/Message-Passing Graph Neural Networks. EGT sets a new state-of-the-art for the quantum-chemical regression task on the OGB-LSC PCQM4Mv2 dataset containing 3.8 million molecular graphs. Our findings indicate that global self-attention based aggregation can serve as a flexible, adaptive and effective replacement of graph convolution for general-purpose graph learning. Therefore, convolutional local neighborhood aggregation is not an essential inductive bias.

View on arXivView PDF

Code Implementations(3)

PyTorchMIT

Edge-Augmented Graph Transformer

8110PythonJan 26, 20222 years agoMIT
attentiongnngraphsmachine-learningmolecular-graph-learning+5 more
shamim-hussain/tgtOfficial100%
MIT

Triplet Graph Transformer

544Shell, PythonNov 16, 20231 years agoMIT
graph-neural-networksgraph-transformermolecular-graphstransformer
shamim-hussain/egtOfficial100%
MIT

Edge-Augmented Graph Transformer

5211Shell, PythonSep 13, 20214 years agoMIT
attentiongnnsgraph-learninggraphsself-attention+1 more

Cite this paper

@article{hussain2021global,
  title  = {Global Self-Attention as a Replacement for Graph Convolution},
  author = {Md Shamim Hussain and Mohammed J. Zaki and Dharmashankar Subramanian},
  year   = {2021},
  eprint = {2108.03348},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.03348}
}

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/2108.03348.svg)](https://codeofpaper.com/paper/2108.03348)

Discussion