Efficient Link Prediction via GNN Layers Induced by Negative Sampling

Yuxin Wang, Xiannian Hu, Quan Gan, Xuanjing Huang, Xipeng Qiu, David Wipf

Main figure for Efficient Link Prediction via GNN Layers Induced by Negative Sampling

Abstract

Graph neural networks (GNNs) for link prediction can loosely be divided into two broad categories. First, node-wise architectures pre-compute individual embeddings for each node that are later combined by a simple decoder to make predictions. While extremely efficient at inference time, model expressiveness is limited such that isomorphic nodes contributing to candidate edges may not be distinguishable, compromising accuracy. In contrast, edge-wise methods rely on the formation of edge-specific subgraph embeddings to enrich the representation of pair-wise relationships, disambiguating isomorphic nodes to improve accuracy, but with increased model complexity. To better navigate this trade-off, we propose a novel GNN architecture whereby the forward pass explicitly depends on both positive (as is typical) and negative (unique to our approach) edges to inform more flexible, yet still cheap node-wise embeddings. This is achieved by recasting the embeddings themselves as minimizers of a forward-pass-specific energy function that favors separation of positive and negative samples. Notably, this energy is distinct from the actual training loss shared by most existing link prediction models, where contrastive pairs only influence the backward pass. As demonstrated by extensive empirical evaluations, the resulting architecture retains the inference speed of node-wise models, while producing competitive accuracy with edge-wise alternatives. We released our code at https://github.com/yxzwang/SubmissionverOfYinYanGNN.

Proposed method: YinYanGNN

Benchmark Results

Tested on 4 datasets 7 baseline values reported too low

Tables show presented results in global context (best 3 papers + GCN + MLP).

OGB

#ModelHits@50 ↑Paper
1
PROXI
0.7650 ±0.0027
2
OGB Leader
0.7129 ±0.0018
3
GIDN
0.7096 ±0.0055
9
GCN
actual #9 vs paper #91 82 places worse
0.6621 ±0.0033
best reported
actual #9 vs paper #91 82 places worse
paper 0.4475 ±0.0107
best at pub: GNNBenchmark (JMLR 2023)
paper 0.4475 ±0.0107 Δ at pub 0.0421 Δ today 0.2146
10
Neo-GNN
actual #10 vs paper #32 22 places worse
0.6613 ±0.0061
best reported
actual #10 vs paper #32 22 places worse
paper 0.5752 ±0.0037
paper 0.5752 ±0.0037 Δ today 0.0861
11
YinYanGNN
0.6610 ±0.0020
This paper
14
BUDDY
0.6594 ±0.0058
This paper
20
SEAL
0.6474 ±0.0043
This paper
23
AA
actual #23 vs paper #23
0.6435
actual #23 vs paper #23
paper 0.6435
25
SUREL
0.6410 ±0.0106
This paper
26
RA
0.6400
This paper
27
CN
actual #27 vs paper #33 6 places worse
0.6137
best reported
actual #27 vs paper #33 6 places worse
paper 0.5644
28
SAGE
actual #28 vs paper #81 53 places worse
0.5944 ±0.0137
best reported
actual #28 vs paper #81 53 places worse
paper 0.4810 ±0.0081
paper 0.4810 ±0.0081 Δ at pub 0.0653 Δ today 0.1134
37
GDGNN
0.5474 ±0.0048
This paper
41
GraphSAGE
0.5463 ±0.0112
46
ComplEx
0.5391 ±0.0050
This paper
58
DistMult
0.5100 ±0.0054
This paper
68
Node2Vec
actual #68 vs paper #76 8 places worse
0.4929 ±0.0064
best reported
actual #68 vs paper #76 8 places worse
paper 0.4888 ±0.0054

Difference within reported uncertainty; not counted as underperformance.

paper 0.4888 ±0.0054 Δ at pub 0.0041
94
MLP
actual #94 vs paper #110 16 places worse
0.4438 ±0.0347
best reported
actual #94 vs paper #110 16 places worse
paper 0.1927 ±0.0129
best at pub: GNNBenchmark (JMLR 2023)
paper 0.1927 ±0.0129 Δ at pub 0.0108 Δ today 0.2511
98
MF
actual #98 vs paper #101 3 places worse
0.4181 ±0.0167
best reported
actual #98 vs paper #101 3 places worse
paper 0.3886 ±0.0029
paper 0.3886 ±0.0029 Δ at pub 0.0004 Δ today 0.0295
109
TransE
0.2940 ±0.0115
This paper
#ModelHits@20 ↑Paper
1
ELGNN
0.9777 ±0.0037
2
GIDN
0.9542
3
AGDN
0.9538 ±0.0094
6
SUREL
0.8974 ±0.0018
This paper
15
YinYanGNN
0.8092 ±0.0335
This paper
16
BUDDY
0.7851 ±0.0136
This paper
20
SAGE
actual #20 vs paper #37 17 places worse
0.6719 ±0.0118
best reported
actual #20 vs paper #37 17 places worse
paper 0.5390 ±0.0474
paper 0.5390 ±0.0474 Δ today 0.1329
24
GCN
actual #24 vs paper #53 29 places worse
0.6476 ±0.0145
best reported
actual #24 vs paper #53 29 places worse
paper 0.3707 ±0.0507
paper 0.3707 ±0.0507 Δ at pub 0.1283 Δ today 0.2769
25
Node2Vec
actual #25 vs paper #68 43 places worse
0.6363 ±0.0205
best reported
actual #25 vs paper #68 43 places worse
paper 0.2326 ±0.0209
paper 0.2326 ±0.0209 Δ at pub 0.0004 Δ today 0.4037
26
Neo-GNN
0.6357 ±0.0352
This paper
31
MF
actual #31 vs paper #81 50 places worse
0.5950 ±0.0168
best reported
actual #31 vs paper #81 50 places worse
paper 0.1368 ±0.0475
paper 0.1368 ±0.0475 Δ at pub 0.0002 Δ today 0.4582
38
GraphSAGE
0.5390 ±0.0474
43
SEAL
actual #43 vs paper #59 16 places worse
0.4974 ±0.0239
best reported
actual #43 vs paper #59 16 places worse
paper 0.3056 ±0.0386
47
RA
actual #47 vs paper #62 15 places worse
0.4401
best reported
actual #47 vs paper #62 15 places worse
paper 0.2760
50
AA
actual #50 vs paper #75 25 places worse
0.3975
best reported
actual #50 vs paper #75 25 places worse
paper 0.1861
51
CN
actual #51 vs paper #78 27 places worse
0.3869
best reported
actual #51 vs paper #78 27 places worse
paper 0.1773
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
#ModelHits@100 ↑Paper
1
OGB Leader
0.6524 ±0.0150
2
PRB
0.6347 ±0.0175
3
LPFormer
0.6332 ±0.0063
7
YinYanGNN
0.5464 ±0.0049
This paper
8
SUREL
0.5432 ±0.0044
This paper
9
RA
actual #9 vs paper #16 7 places worse
0.5324
best reported
actual #9 vs paper #16 7 places worse
paper 0.4933
paper 0.4933 Δ at pub 0.0391
14
SAGE
actual #14 vs paper #62 48 places worse
0.5013 ±0.0055
best reported
actual #14 vs paper #62 48 places worse
paper 0.1655 ±0.0240
paper 0.1655 ±0.0240 Δ at pub 0.3358
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
This paper
26
GDGNN
0.4592 ±0.0214
This paper
39
AA
0.3245
This paper
42
MF
actual #42 vs paper #42
0.3230 ±0.0090
best reported
actual #42 vs paper #42
paper 0.3229 ±0.0094

Difference within reported uncertainty; not counted as underperformance.

paper 0.3229 ±0.0094 Δ at pub 0.0001
45
GCN
actual #45 vs paper #59 14 places worse
0.3084 ±0.0178
best reported
actual #45 vs paper #59 14 places worse
paper 0.1867 ±0.0132
paper 0.1867 ±0.0132 Δ at pub 0.1090 Δ today 0.1217
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
57
Node2Vec
actual #57 vs paper #57
0.2230 ±0.0080
best reported
actual #57 vs paper #57
paper 0.2226 ±0.0088

Difference within reported uncertainty; not counted as underperformance.

paper 0.2226 ±0.0088 Δ at pub 0.0004
63
GraphSAGE
0.1655 ±0.0240
#ModelMRR ↑Paper
1
CFG
0.8997 ±0.0015
2
SIEG
0.8987 ±0.0018
3
LPFormer
0.8981 ±0.0013
4
SUREL
0.8974 ±0.0018
This paper
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
actual #12 vs paper #21 9 places worse
0.8705 ±0.0004
best reported
actual #12 vs paper #21 9 places worse
paper 0.8474 ±0.0021
paper 0.8474 ±0.0021 Δ at pub 0.0005 Δ today 0.0231
13
GDGNN
0.8696 ±0.0028
This paper
15
YinYanGNN
0.8621 ±0.0009
This paper
30
SAGE
actual #30 vs paper #32 2 places worse
0.8292 ±0.0022
best reported
actual #30 vs paper #32 2 places worse
paper 0.8260 ±0.0036

Difference within reported uncertainty; not counted as underperformance.

paper 0.8260 ±0.0036 Δ today 0.0032
32
GraphSAGE
0.8264 ±0.0001
47
TransE
0.7644 ±0.0018
This paper
51
RA
actual #51 vs paper #61 10 places worse
0.7604
best reported
actual #51 vs paper #61 10 places worse
paper 0.5198
52
AA
actual #52 vs paper #61 9 places worse
0.7596
best reported
actual #52 vs paper #61 9 places worse
paper 0.5189
54
CN
actual #54 vs paper #63 9 places worse
0.7430
best reported
actual #54 vs paper #63 9 places worse
paper 0.5147
55
ComplEx
0.7283 ±0.0038
This paper
57
DistMult
0.6695 ±0.0040
This paper
59
Node2Vec
0.6141 ±0.0011
This paper
62
MF
0.5186 ±0.0443
This paper
71
MLP
actual #71 vs paper #71
0.3917 ±0.0044
best reported
actual #71 vs paper #71
paper 0.2906 ±0.0016
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers) Best at pub — reported result worse than the best known when published (best reported in green) Best at pub — reported value improved over the best known when published Best today — OK at publication; today's leaderboard best is elsewhere