Reproduce “GraphiT: Encoding Graph Structure in Transformers” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Grégoire Mialon, Dexiong Chen, Margot Selosse, Julien Mairal

GraphiT introduces a Transformer architecture for graph-structured data that incorporates structural and positional information through enriched node features and modulated self-attention mechanisms. The model achieves competitive performance against Graph Neural Networks on various graph classification and regression tasks, demonstrating a notable improvement on the ZINC molecular regression dataset.

Key insights

  • Transformers can achieve competitive or superior performance to GNNs on graph prediction tasks when effectively augmented with structural and positional information.
  • A synergistic combination of local substructure encoding (via GCKN features) and kernel-based relative positional encoding within the attention mechanism proves most effective.
  • The attention scores generated by GraphiT offer a natural visualization tool for identifying discriminative graph motifs, enhancing interpretability for scientific applications.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.