Transformers Meet Directed Graphs

01/31/2023
by   Simon Geisler, et al.
0

Transformers were originally proposed as a sequence-to-sequence model for text but have become vital for a wide range of modalities, including images, audio, video, and undirected graphs. However, transformers for directed graphs are a surprisingly underexplored topic, despite their applicability to ubiquitous domains including source code and logic circuits. In this work, we propose two direction- and structure-aware positional encodings for directed graphs: (1) the eigenvectors of the Magnetic Laplacian - a direction-aware generalization of the combinatorial Laplacian; (2) directional random walk encodings. Empirically, we show that the extra directionality information is useful in various downstream tasks, including correctness testing of sorting networks and source code understanding. Together with a data-flow-centric graph construction, our model outperforms the prior state of the art on the Open Graph Benchmark Code2 relatively by 14.7

READ FULL TEXT

page 5

page 21

page 24

page 25

research
09/01/2022

MSGNN: A Spectral Graph Neural Network Based on a Novel Magnetic Signed Laplacian

Signed and directed networks are ubiquitous in real-world applications. ...
research
02/19/2014

Transduction on Directed Graphs via Absorbing Random Walks

In this paper we consider the problem of graph-based transductive classi...
research
01/31/2023

Singular Value Approximation and Reducing Directed to Undirected Graph Sparsification

In this paper, we introduce a new, spectral notion of approximation betw...
research
02/22/2021

MagNet: A Magnetic Neural Network for Directed Graphs

The prevalence of graph-based data has spurred the rapid development of ...
research
10/14/2021

sMGC: A Complex-Valued Graph Convolutional Network via Magnetic Laplacian for Directed Graphs

Recent advancements in Graph Neural Networks have led to state-of-the-ar...
research
01/28/2022

Compositionality-Aware Graph2Seq Learning

Graphs are a highly expressive data structure, but it is often difficult...

Please sign up or login with your details

Forgot password? Click here to reset