TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Transformers Meet Directed Graphs

Transformers Meet Directed Graphs

Simon Geisler, Yujia Li, Daniel Mankowitz, Ali Taylan Cemgil, Stephan Günnemann, Cosmin Paduraru

2023-01-31Graph Property Predictiongraph construction
PaperPDFCode(official)

Abstract

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%.

Results

TaskDatasetMetricValueModel
Graph Property Predictionogbg-code2Number of params14378069SAT++ with Magnetic Laplacian
Graph Property Predictionogbg-code2Number of params14378069SAT++ with Magnetic Laplacian

Related Papers

Efficiently Constructing Sparse Navigable Graphs2025-07-17NGTM: Substructure-based Neural Graph Topic Model for Interpretable Graph Generation2025-07-17Irec: A Metacognitive Scaffolding for Self-Regulated Learning through Just-in-Time Insight Recall: A Conceptual Framework and System Prototype2025-06-25Call Me Maybe: Enhancing JavaScript Call Graph Construction using Graph Neural Networks2025-06-22CORE-KG: An LLM-Driven Knowledge Graph Construction Framework for Human Smuggling Networks2025-06-20SemanticST: Spatially Informed Semantic Graph Learning for Clustering, Integration, and Scalable Analysis of Spatial Transcriptomics2025-06-13MasHost Builds It All: Autonomous Multi-Agent System Directed by Reinforcement Learning2025-06-10XGraphRAG: Interactive Visual Analysis for Graph-based Retrieval-Augmented Generation2025-06-10