arXiv:2507.07138cs.LG2025-07

用最短路径序列建模,提升图神经网络的链接预测能力

GNNs Meet Sequence Models Along the Shortest-Path: an Expressive Method for Link Prediction

  • 结合GNN节点表示与最短路径序列建模,捕捉多跳关系
  • 在多个基准上达到当前最优性能,优于主流方法
  • 理论证明比传统GNN更强大,适合结构敏感的图分析任务

图神经网络(GNN)常因基于节点的消息传递机制忽略连接节点对的子图结构,难以准确捕捉链接预测所需的特定结构模式。现有方法或计算开销大,或依赖简单启发式(如共同邻居数),无法建模多跳依赖关系。本文提出SP4LP(Shortest Path for Link Prediction)框架,先用GNN计算所有节点表示,再提取候选节点对间的最短路径,并将节点嵌入序列输入序列模型进行处理。该设计在保持计算效率的同时,可有效捕获表达性强的多跳关系模式。实验表明,SP4LP在多个链接预测基准上均达到当前最优表现。理论上,我们证明其严格优于标准消息传递GNN及若干先进结构特征方法,确立了其作为图链接预测通用且严谨的方法地位。

原文摘要 · Abstract (English)

Graph Neural Networks (GNNs) often struggle to capture the link-specific structural patterns crucial for accurate link prediction, as their node-centric message-passing schemes overlook the subgraph structures connecting a pair of nodes. Existing methods to inject such structural context either incur high computational cost or rely on simplistic heuristics (e.g., common neighbor counts) that fail to model multi-hop dependencies. We introduce SP4LP (Shortest Path for Link Prediction), a novel framework that combines GNN-based node encodings with sequence modeling over shortest paths. Specifically, SP4LP first applies a GNN to compute representations for all nodes, then extracts the shortest path between each candidate node pair and processes the resulting sequence of node embeddings using a sequence model. This design enables SP4LP to capture expressive multi-hop relational patterns with computational efficiency. Empirically, SP4LP achieves state-of-the-art performance across link prediction benchmarks. Theoretically, we prove that SP4LP is strictly more expressive than standard message-passing GNNs and several state-of-the-art structural features methods, establishing it as a general and principled approach for link prediction in graphs.

图神经网络链接预测序列建模最短路径

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。