Graph Neural Networks for Link Prediction with Subgraph Sketching
Abstract
Many Graph Neural Networks (GNNs) perform poorly compared to simple heuristics on Link Prediction (LP) tasks. This is due to limitations in expressive power such as the inability to count triangles (the backbone of most LP heuristics) and because they can not distinguish automorphic nodes (those having identical structural roles). Both expressiveness issues can be alleviated by learning link (rather than node) representations and incorporating structural features such as triangle counts. Since explicit link representations are often prohibitively expensive, recent works resorted to subgraph-based methods, which have achieved state-of-the-art performance for LP, but suffer from poor efficiency due to high levels of redundancy between subgraphs. We analyze the components of subgraph GNN (SGNN) methods for link prediction. Based on our analysis, we propose a novel full-graph GNN called ELPH (Efficient Link Prediction with Hashing) that passes subgraph sketches as messages to approximate the key components of SGNNs without explicit subgraph construction. ELPH is provably more expressive than Message Passing GNNs (MPNNs). It outperforms existing SGNN models on many standard LP benchmarks while being orders of magnitude faster. However, it shares the common GNN limitation that it is only efficient when the dataset fits in GPU memory. Accordingly, we develop a highly scalable model, called BUDDY, which uses feature precomputation to circumvent this limitation without sacrificing predictive performance. Our experiments show that BUDDY also outperforms SGNNs on standard LP benchmarks while being highly scalable and faster than ELPH.
Benchmark Results
Tested on 3 datasets 1 baseline value reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
OGB
| # | Model | Hits@20 ↑ | Paper |
|---|---|---|---|
| 1 | ELGNN | 0.9777
±0.0037 | |
| 2 | GIDN | 0.9542 | |
| 3 | AGDN | 0.9538
±0.0094 | |
| 13 | ELPH | 0.8319
±0.0212 | This paper |
| 16 | BUDDY | 0.7851
±0.0136 | This paper |
| 20 | SAGE | 0.6719
±0.0118 best reported | best at pub: Pairwise Learning for Neural Link Prediction (2021) best today: Link Prediction with Untrained Message Passing Layers (2024) |
| 24 | GCN | 0.6476
±0.0145 best reported | best at pub: Neo-GNNs: Neighborhood Overlap-aware Graph Neural Networks for Link Prediction (NeurIPS 2022) best today: Link Prediction with Untrained Message Passing Layers (2024) |
| 26 | Neo-GNN | 0.6357
±0.0352 | This paper |
| 38 | GraphSAGE | 0.5390
±0.0474 | |
| 43 | SEAL | 0.4974
±0.0239 best reported | best at pub: Labeling Trick: A Theory of Using Graph Neural Networks for Multi-Node Representation Learning (NeurIPS 2020) best today: Link Prediction with Untrained Message Passing Layers (2024) |
| 47 | RA | 0.4401 best reported | best today: Link Prediction with Untrained Message Passing Layers (2024) |
| 50 | AA | 0.3975 best reported | best at pub: Labeling Trick: A Theory of Using Graph Neural Networks for Multi-Node Representation Learning (NeurIPS 2020) best today: Link Prediction with Untrained Message Passing Layers (2024) |
| 51 | CN | 0.3869 best reported | best at pub: Labeling Trick: A Theory of Using Graph Neural Networks for Multi-Node Representation Learning (NeurIPS 2020) best today: Link Prediction with Untrained Message Passing Layers (2024) |
| 84 | DistMult | 0.1101
±0.0049 | This paper |
| 89 | ComplEx | 0.0868
±0.0036 | This paper |
| 91 | TransE | 0.0665
±0.0020 | This paper |
| 94 | NBFnet | 0.0400
±0.0058 | This paper |
| # | Model | Hits@100 ↑ | Paper |
|---|---|---|---|
| 1 | OGB Leader | 0.6524
±0.0150 | |
| 2 | PRB | 0.6347
±0.0175 | |
| 3 | LPFormer | 0.6332
±0.0063 | |
| 9 | RA | 0.5324 best reported | best at pub: Pairwise Learning for Neural Link Prediction (2021) |
| 14 | SAGE | 0.5013
±0.0055 best reported | best at pub: Pairwise Learning for Neural Link Prediction (2021) best today: Asymmetric Learning for Graph Neural Network based Link Prediction (2023) |
| 15 | BUDDY | 0.4985
±0.0020 | This paper |
| 18 | Neo-GNN | 0.4913
±0.0060 | This paper |
| 19 | SEAL | 0.4880
±0.0316 | This paper |
| 23 | MLP | 0.4600 | |
| 39 | AA | 0.3245 | This paper |
| 45 | GCN | 0.3084
±0.0178 best reported | best at pub: Formatting Instructions for ICLR 2021 Conference Submissions (2020) best today: Link Prediction with Untrained Message Passing Layers (2024) |
| 48 | DistMult | 0.2861
±0.0147 | This paper |
| 49 | CN | 0.2765 | This paper |
| 53 | ComplEx | 0.2742
±0.0049 | This paper |
| 56 | TransE | 0.2269
±0.0049 | This paper |
| 63 | GraphSAGE | 0.1655
±0.0240 |
| # | Model | MRR ↑ | Paper |
|---|---|---|---|
| 1 | CFG | 0.8997
±0.0015 | |
| 2 | SIEG | 0.8987
±0.0018 | |
| 3 | LPFormer | 0.8981
±0.0013 | |
| 8 | SEAL | 0.8767
±0.0032 | This paper |
| 9 | BUDDY | 0.8756
±0.0011 | This paper |
| 11 | Neo-GNN | 0.8726
±0.0084 | This paper |
| 12 | GCN | 0.8705
±0.0004 best reported | best at pub: Neo-GNNs: Neighborhood Overlap-aware Graph Neural Networks for Link Prediction (NeurIPS 2022) best today: On the Impact of Feature Heterophily on Link Prediction with Graph Neural Networks (NeurIPS 2024) |
| 30 | SAGE | 0.8292
±0.0022 best reported | best at pub: Pairwise Learning for Neural Link Prediction (2021) best today: Weak Models Can be Good Teachers: A Case Study on Link Prediction with MLPs (2025) Difference within reported uncertainty; not counted as underperformance. |
| 32 | GraphSAGE | 0.8264
±0.0001 | |
| 47 | TransE | 0.7644
±0.0018 | This paper |
| 51 | RA | 0.7604 best reported | best today: Weak Models Can be Good Teachers: A Case Study on Link Prediction with MLPs (2025) |
| 52 | AA | 0.7596 best reported | best at pub: Labeling Trick: A Theory of Using Graph Neural Networks for Multi-Node Representation Learning (NeurIPS 2020) best today: Weak Models Can be Good Teachers: A Case Study on Link Prediction with MLPs (2025) |
| 54 | CN | 0.7430 best reported | best at pub: Labeling Trick: A Theory of Using Graph Neural Networks for Multi-Node Representation Learning (NeurIPS 2020) best today: Weak Models Can be Good Teachers: A Case Study on Link Prediction with MLPs (2025) |
| 55 | ComplEx | 0.7283
±0.0038 | This paper |
| 57 | DistMult | 0.6695
±0.0040 | This paper |
| 71 | MLP | 0.3917
±0.0044 |
