A Generalization of Transformer Networks to Graphs

By Vijay Prakash Dwivedi, Xavier Bresson. arXiv.org, 2020

1,129 citations recorded by the source corpus.

We propose a generalization of transformer neural network architecture for arbitrary graphs. The original transformer was designed for Natural Language Processing (NLP), which operates on fully connected graphs representing all connections between the words in a sequence. Such architecture does not leverage the graph connectivity inductive bias, and can perform poorly when the graph topology is important and has not been encoded into the node features. We introduce a graph transformer with four new properties compared to the standard model. First, the attention mechanism is a function of the neighborhood connectivity for each node in the graph. Second, the positional encoding is represented by the Laplacian eigenvectors, which naturally generalize the sinusoidal positional encodings often used in NLP. Third, the layer normalization is replaced by a batch normalization layer, which provides faster training and better generalization performance. Finally, the architecture is extended to edge feature representation, which can be critical to tasks s.a. chemistry (bond type) or link prediction (entity relationship in knowledge graphs). Numerical experiments on a graph benchmark demonstrate the performance of the proposed graph transformer architecture. This work closes the gap between the original transformer, which was designed for the limited case of line graphs, and graph neural networks, that can work with arbitrary graphs. As our architecture is simple and generic, we believe it can be used as a black box for future applications that wish to consider transformer and graphs.

Subfields: Artificial Intelligence, Materials Chemistry

View Paper: https://www.semanticscholar.org/paper/849b88ddc8f8cabc6d4246479b275a1ee65d0647

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Yoshua Bengio
  2. William L. Hamilton
  3. Vijay Prakash Dwivedi
  4. Tie-Yan Liu
  5. Anh Tuan Luu
  6. Uri Alon
  7. Di He
  8. Eran Yahav

In Materials Chemistry

  1. Vijay Prakash Dwivedi
  2. Dominique Beaini
  3. Anh Tuan Luu
  4. Xavier Bresson
  5. Thomas Laurent
  6. Yoshua Bengio
  7. Karsten M. Borgwardt
  8. Guy Wolf

Citations in the corpus