PreprintCited by 398Advanced Graph Neural NetworksGraph Theory and AlgorithmsComputational Drug Discovery Methods

A Generalization of Transformer Networks to Graphs

Open access
Dwivedi, Vijay Prakash, Bresson, Xavier·2020·arXiv

Abstract

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.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2012.09699

Cites

4 of 4 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Transformer/attention modules have been utilized in emerging neural architecture topologies, such as image segmentation, graph neural networks, graph convolutional networks, 3D convolutional neural networks, point clouds, and spiking transformer neural networks.

    “Recently, transformer/attention modules have been utilized in emerging neural architecture topologies, such as image segmentation [262], graph neural networks (GNN) [263], graph convolutional network (GCN) [264], 3D convolutional neural networks [265], point clouds [266] and spiking transformer neural network [267].”

    From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [263]

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Dwivedi, V. P., & Bresson, X.
Affiliations
Nanyang Technological University (SG)
Venue
arXiv
Publisher
arXiv
Published
2020
ISSN
2331-8422 (ISSN-L)
OpenAlex
W3113177135
Cited by
398
References
4
Citations by year
2026: 9 · 2025: 84 · 2024: 133 · 2023: 117 · 2022: 37 · 2021: 17 · 2020: 1
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Advanced Graph Neural Networks
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Graph Theory and Algorithms
  • Physical Sciences › Computer Science › Computational Theory and Mathematics › Computational Drug Discovery Methods
Keywords
graph transformer, transformer models, graph neural networks, attention mechanism, neighborhood connectivity, Laplacian eigenvectors, positional encoding, batch normalization, edge features, link prediction, graph topology

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review