Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Transformers over Directed Acyclic Graphs

About

Transformer models have recently gained popularity in graph representation learning as they have the potential to learn complex relationships beyond the ones captured by regular graph neural networks. The main research question is how to inject the structural bias of graphs into the transformer architecture, and several proposals have been made for undirected molecular graphs and, recently, also for larger network graphs. In this paper, we study transformers over directed acyclic graphs (DAGs) and propose architecture adaptations tailored to DAGs: (1) An attention mechanism that is considerably more efficient than the regular quadratic complexity of transformers and at the same time faithfully captures the DAG structure, and (2) a positional encoding of the DAG's partial order, complementing the former. We rigorously evaluate our approach over various types of tasks, ranging from classifying source code graphs to nodes in citation networks, and show that it is effective in two important aspects: in making graph transformers generally outperform graph neural networks tailored to DAGs and in improving SOTA graph transformer performance in terms of both quality and efficiency.

Yuankai Luo, Veronika Thost, Lei Shi• 2022

Related benchmarks

TaskDatasetResultRank
Node ClassificationCora
Accuracy90.49
885
Node ClassificationCiteseer
Accuracy78.24
804
Node ClassificationPubmed
Accuracy89.44
742
Graph property predictionOGBG-CODE2 (test)
F120.2
57
Graph property predictionOGBG-CODE2 (val)
F1 Score18.5
25
Node Classificationself-citation (test)
AP64.9
16
Regression(test)
RMSE0.253
12
Showing 7 of 7 rows

Other info

Code

Follow for update