cs.LGFeb 2, 2026

Plain Transformers are Surprisingly Powerful Link Predictors

Authors: Quang Truong, Yu Song, Donald Loveland, Mingxuan Ju, Tong Zhao, Neil Shah, Jiliang Tang

Organizations: Department of Computer Science and Engineering, Michigan State University, East Lansing, MI, USA. · Snap Inc., Bellevue, WA, USA.

Abstract

Link prediction is a core challenge in graph machine learning, demanding models that capture rich and complex topological dependencies. While Graph Neural Networks (GNNs) are the standard solution, state-of-the-art pipelines often rely on explicit structural heuristics or memory-intensive node embeddings -- approaches that struggle to generalize or scale to massive graphs. Emerging Graph Transformers (GTs) offer a potential alternative but often incur significant overhead due to complex structural encodings, hindering their applications to large-scale link prediction. We challenge these sophisticated paradigms with PENCIL, an encoder-only plain Transformer that replaces hand-crafted priors with attention over sampled local subgraphs, retaining the scalability and hardware efficiency of standard Transformers. Through experimental and theoretical analysis, we show that PENCIL extracts richer structural signals than GNNs, implicitly generalizing a broad class of heuristics and subgraph-based expressivity. Empirically, PENCIL outperforms heuristic-informed GNNs and is far more parameter-efficient than ID-embedding--based alternatives, while remaining competitive across diverse benchmarks -- even without node features. Our results challenge the prevailing reliance on complex engineering techniques, demonstrating that simple design choices are potentially sufficient to achieve the same capabilities. Our code is publicly available at https://github.com/quang-truong/pencil.

Figures & tables

Appendix figures & tables17 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Early-Exit Graph Neural Networks for Link Prediction

    Jun 20, 2026Roman Knyazhitskiy, Andrea Giuseppe Di FrancescoZero-Shot Link PredictionGraph Neural Networks

  2. Mini-Batch Class Composition Bias in Link Prediction

    Apr 28, 2026Kieran Maguire, Srinandan DasmahapatraGraph Neural NetworksNetwork Science

  3. Link prediction on multi-relational graphs from an influence propagation perspective

    Aug 5, 2026Zidu Yin, Yuankai Qi, Dong Gong +3Zero-Shot Link PredictionEpidemiological Models