Lune

KDD2024Top-tier venue

LPFormer: An Adaptive Graph Transformer for Link Prediction

Harry Shomer, Yao Ma, Haitao Mao, Juanhui Li, Bo Wu, Jiliang Tang

Abstract

Link prediction is a common task on graph-structured data that has seen applications in a variety of domains. Classically, hand-crafted heuristics were used for this task. Heuristic measures are chosen such that they correlate well with the underlying factors related to link formation. In recent years, a new class of methods has emerged that combines the advantages of message-passing neural networks (MPNN) and heuristics methods. These methods perform predictions by using the output of an MPNN in conjunction with a "pairwise encoding" that captures the relationship between nodes in the candidate link. They have been shown to achieve strong performance on numerous datasets. However, current pairwise encodings often contain a strong inductive bias, using the same underlying factors to classify all links. This limits the ability of existing methods to learn how to properly classify a variety of different links that may form from different factors. To address this limitation, we propose a new method, LPFormer, which attempts to adaptively learn the pairwise encodings for each link. LPFormer models the link factors via an attention module that learns the pairwise encoding that exists between nodes by modeling multiple factors integral to link prediction. Extensive experiments demonstrate that LPFormer can achieve SOTA performance on numerous datasets while maintaining efficiency. The code is available at The code is available at https://github.com/HarryShomer/LPFormer.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Recipe for a General, Powerful, Scalable Graph Transformer cites Do Transformers Really Perform Badly for Graph Representation?
  • Recipe for a General, Powerful, Scalable Graph Transformer cites Rethinking Graph Transformers with Spectral Attention
  • A Scalable Pretraining Framework for Link Prediction with Efficient Adaptation cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • A Scalable Pretraining Framework for Link Prediction with Efficient Adaptation cites Mixture of Link Predictors on Graphs
  • Mixture of Link Predictors on Graphs cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • Do Transformers Really Perform Badly for Graph Representation? cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • Do Transformers Really Perform Badly for Graph Representation? cites Rethinking Graph Transformers with Spectral Attention
  • Rethinking Graph Transformers with Spectral Attention cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • The Underappreciated Power of Vision Models for Graph Structural Understanding cites Recipe for a General, Powerful, Scalable Graph Transformer
  • The Underappreciated Power of Vision Models for Graph Structural Understanding cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • The Underappreciated Power of Vision Models for Graph Structural Understanding cites Do Transformers Really Perform Badly for Graph Representation?
  • The Underappreciated Power of Vision Models for Graph Structural Understanding cites Rethinking Graph Transformers with Spectral Attention
  • ProGMLP: A Progressive Framework for GNN-to-MLP Knowledge Distillation with Efficient Trade-offs cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • How Attentive are Graph Attention Networks? cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. Mixture of Link Predictors on GraphsLi Ma, Haoyu Han, Juanhui Li, Harry Shomer et al.NeurIPS 2024 · 23 citations
  2. The Underappreciated Power of Vision Models for Graph Structural UnderstandingXinjian Zhao, Wei Pang, Zhongkai Xue, Xiangru Jian et al.NeurIPS 2025 · 7 citations
  3. A Scalable Pretraining Framework for Link Prediction with Efficient AdaptationYu Song, Zhigang Hua, Harry Shomer, Yan Xie et al.KDD 2025 · 1 citation
  4. ProGMLP: A Progressive Framework for GNN-to-MLP Knowledge Distillation with Efficient Trade-offsWeigang Lu, Ziyu Guan, Wei Zhao, Yaming Yang et al.AAAI 2026 · 1 citation
  5. Spectral Basis Learning for Expressive Graph Neural Networks in Link PredictionNiloofar Azizi, Nils M. Kriege, Nicholas J. A. Harvey, Horst BischofAAAI 2026

Builds on18

  1. Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
  2. How Attentive are Graph Attention Networks?Shaked Brody, Uri Alon, Eran YahavICLR 2022 · 1,717 citations
  3. Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
  4. Recipe for a General, Powerful, Scalable Graph TransformerLadislav Rampásek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu et al.NeurIPS 2022 · 1,216 citations
  5. Rethinking Graph Transformers with Spectral AttentionDevin Kreuzer, Dominique Beaini, William L. Hamilton, Vincent Létourneau et al.NeurIPS 2021 · 854 citations

Related papers

  1. Pure Message Passing Can Estimate Common Neighbor for Link PredictionKaiwen Dong, Zhichun Guo, Nitesh V. ChawlaNeurIPS 2024 · 30 citations
  2. Heuristic Learning with Graph Neural Networks: A Unified Framework for Link PredictionJuzheng Zhang, Lanning Wei, Zhen Xu, Quanming YaoKDD 2024 · 11 citations
  3. Adversarial Permutation Guided Node Representations for Link PredictionIndradyumna Roy, Abir De, Soumen ChakrabartiAAAI 2021 · 17 citations
  4. Subgraphormer: Unifying Subgraph GNNs and Graph Transformers via Graph ProductsGuy Bar-Shalom, Beatrice Bevilacqua, Haggai MaronICML 2024 · 13 citations
  5. Link Prediction on Multilayer Networks through Learning of Within-Layer and Across-Layer Node-Pair Structural Features and Node Embedding SimilarityLorenzo Zangari, Domenico Mandaglio, Andrea TagarelliWWW 2024 · 16 citations
Dusk over the sea between two cliffs drawn in fine vertical lines