Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Pure Transformers are Powerful Graph Learners

About

We show that standard Transformers without graph-specific modifications can lead to promising results in graph learning both in theory and practice. Given a graph, we simply treat all nodes and edges as independent tokens, augment them with token embeddings, and feed them to a Transformer. With an appropriate choice of token embeddings, we prove that this approach is theoretically at least as expressive as an invariant graph network (2-IGN) composed of equivariant linear layers, which is already more expressive than all message-passing Graph Neural Networks (GNN). When trained on a large-scale graph dataset (PCQM4Mv2), our method coined Tokenized Graph Transformer (TokenGT) achieves significantly better results compared to GNN baselines and competitive results compared to Transformer variants with sophisticated graph-specific inductive bias. Our implementation is available at https://github.com/jw9730/tokengt.

Jinwoo Kim, Tien Dat Nguyen, Seonwoo Min, Sungjun Cho, Moontae Lee, Honglak Lee, Seunghoon Hong• 2022

Related benchmarks

TaskDatasetResultRank
Node ClassificationChameleon
Accuracy38.1
936
Node ClassificationSquirrel
Accuracy29.4
815
Graph ClassificationNCI1
Accuracy76.7
707
Node ClassificationCiteseer
Accuracy47
541
Graph ClassificationIMDB-B
Accuracy80.2
455
Graph ClassificationIMDB-M
Accuracy47
434
Graph ClassificationDD
Accuracy73.9
309
Graph ClassificationNCI109
Accuracy72.1
275
Graph RegressionZINC (test)
MAE0.047
226
Node ClassificationCora
Accuracy45.6
138
Showing 10 of 43 rows

Other info

Code

Follow for update