Weak Models Can be Good Teachers: A Case Study on Link Prediction with MLPs

Zongyue Qin, Shichang Zhang, Mingxuan Ju, Tong Zhao, Neil Shah, Yizhou Sun

Main figure for Weak Models Can be Good Teachers: A Case Study on Link Prediction with MLPs

Abstract

Link prediction is a crucial graph-learning task. Distilling Graph Neural Network (GNN) teachers into Multi-Layer Perceptron (MLP) students has emerged as an effective approach to achieve strong performance and reducing computational cost by removing graph dependency in the inference stage, especially in applications such as citation prediction and product recommendation where node features are abundant. However, existing distillation methods only use standard GNNs. Do stronger models such as those specially designed for link prediction (e.g., GNN4LP) lead to better students? Are heuristic-based methods (e.g., common neighbors) bad teachers as they are weak models? This paper first explores the impact of different teachers in MLP distillation. Surprisingly, we find that stronger models do not always produce stronger students: MLPs distilled from GNN4LP can underperform those distilled from simpler GNNs, while weaker heuristic methods can teach MLPs to near-GNN performance with drastically reduced training costs. We provide both theoretical and empirical analysis to explain this phenomenon, revealing that a teacher is only as good as its teachable knowledge, the portion of its knowledge that can be transferred through the features accessible to the student. Building on these insights, we propose Ensemble Heuristic-Distilled MLPs (EHDM), which eliminates costly GNN training while effectively training complementary MLP predictors via different heuristic teachers. Our extensive experiments show EHDM reduces the total training time by 1.95-3.32$ $ while achieve an average 7.93\ Link prediction is crucial for many web applications (e.g., friend recommendation). Though Graph Neural Networks (GNNs) excel at this task, they impose high computational cost. A promising solution is distilling GNNs into Multi-Layer Perceptrons (MLPs) to remove graph dependency. But most such methods rely on standard GNNs as teachers and overlook other teacher options. In this paper, we first explore how different teacher models, spanning standard GNNs, specialized GNNs for Link Prediction (GNN4LP), and heuristic methods (e.g., common neighbors), affect the accuracy of the distilled MLP. Counterintuitively, we find that stronger teachers do not always produce stronger students: MLPs distilled from GNN4LP can underperform those distilled from simpler GNNs. Conversely, underperforming heuristic methods can guide MLPs to near-GNN performance while drastically reducing training costs. Building on these insights, we propose a simple yet effective Ensemble Heuristic-Distilled MLPs (EHDM). Our design avoids reintroducing graph dependencies while effectively harnessing complementary signals via a gating mechanism. Experiments on ten datasets show an average 7.93\ Graph neural networks (GNNs) have demonstrated strong performance in link prediction but are often computationally expensive, making them impractical for large-scale web applications. Recent work distills GNNs into multi-layer perceptrons (MLPs) to improve inference efficiency while maintaining comparable effectiveness. However, training GNNs as teachers remains computationally expensive, and a bottleneck in large-scale applications. Meanwhile, heuristic methods, although simple to compute, yield surprisingly good performance on some datasets. Besides, they capture proximity in graph structure, offers complementary information to node features. So in this work, we explore the potential of heuristic methods as lightweight teachers for MLP distillation. Surprisingly, experiments across ten real-world datasets, including three large (million-scale) datasets, show generating distillation guidance with heuristic methods is ten times faster than using GNNs. Moreover, heuristic-distilled MLPs achieve comparable or even superior performance to GNN-distilled MLPs, even on datasets where heuristic methods themselves perform poorly. To further enhance effectiveness, we introduce an ensemble method that aggregates the strengths of different heuristic-distilled MLPs, achieving performance comparable to GNNs while maintaining same inference complexity as MLPs. Our findings suggest that heuristic-based distillation is a promising direction for efficient and scalable link prediction in real-world applications.

Proposed method: MLP

Benchmark Results

Tested on 2 datasets SOTA at publication on 2 5 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 #33 24 places worse
0.6621 ±0.0033
best reported
actual #9 vs paper #33 24 places worse
paper 0.5675 ±0.0139
paper 0.5675 ±0.0139 Δ at pub 0.0946
23
AA
actual #23 vs paper #24 1 place worse
0.6435
best reported
actual #23 vs paper #24 1 place worse
paper 0.6417
26
RA
actual #26 vs paper #26
0.6400
best reported
actual #26 vs paper #26
paper 0.6381
27
CN
0.6137
This paper
28
SAGE
actual #28 vs paper #28
0.5944 ±0.0137
best reported
actual #28 vs paper #28
paper 0.5914 ±0.0164

Difference within reported uncertainty; not counted as underperformance.

paper 0.5914 ±0.0164 Δ at pub 0.0030
29
Best GNN
0.5914 ±0.0164
This paper
34
GAT
actual #34 vs paper #34
0.5643 ±0.0086
best reported
actual #34 vs paper #34
paper 0.5590 ±0.0122

Difference within reported uncertainty; not counted as underperformance.

paper 0.5590 ±0.0122 Δ at pub 0.0053
41
GraphSAGE
0.5463 ±0.0112
67
Best LLP
0.4930 ±0.0079
This paper
69
EHDM
0.4927 ±0.0088
This paper
75
CSP MLP
0.4899 ±0.0069
This paper
76
RA MLP
0.4893 ±0.0066
This paper
80
CN MLP
0.4823 ±0.0089
This paper
85
AA MLP
0.4733 ±0.0102
This paper
88
CSP
0.4649
This paper
94
MLP
actual #94 vs paper #94
0.4438 ±0.0347
actual #94 vs paper #94
paper 0.4438 ±0.0347
prev best: GNNBenchmark (JMLR 2023)
paper 0.4438 ±0.0347 Δ at pub 0.2403
#ModelMRR ↑Paper
1
CFG
0.8997 ±0.0015
2
SIEG
0.8987 ±0.0018
3
LPFormer
0.8981 ±0.0013
12
GCN
actual #12 vs paper #20 8 places worse
0.8705 ±0.0004
best reported
actual #12 vs paper #20 8 places worse
paper 0.8490 ±0.0006
paper 0.8490 ±0.0006 Δ at pub 0.0215
21
Best GNN
0.8490 ±0.0006
This paper
30
SAGE
actual #30 vs paper #30
0.8292 ±0.0022
best reported
actual #30 vs paper #30
paper 0.8292 ±0.0022
32
GraphSAGE
0.8264 ±0.0001
51
RA
actual #51 vs paper #51
0.7604
actual #51 vs paper #51
paper 0.7604
paper 0.7604 Δ at pub 0.2406
52
AA
actual #52 vs paper #52
0.7596
actual #52 vs paper #52
paper 0.7596
54
CN
actual #54 vs paper #54
0.7430
actual #54 vs paper #54
paper 0.7430
65
EHDM
0.4658 ±0.0010
This paper
66
AA MLP
0.4330 ±0.0008
This paper
67
CSP MLP
0.4317 ±0.0011
This paper
68
CN MLP
0.4305 ±0.0023
This paper
69
RA MLP
0.4290 ±0.0012
This paper
70
Best LLP
0.4278 ±0.0010
This paper
71
MLP
actual #71 vs paper #71
0.3917 ±0.0044
actual #71 vs paper #71
paper 0.3917 ±0.0044
paper 0.3917 ±0.0044 Δ at pub 0.1011
80
CSP
0.0028
This paper
SOTA performance (not significantly different from the best) 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