普通Transformer竟是惊人的链接预测器
Plain Transformers are Surprisingly Powerful Link Predictors
AI总结:
提出PENCIL,一种仅编码器的普通Transformer,通过采样局部子图的注意力机制替代手工先验,在保持标准Transformer可扩展性的同时,隐式泛化多种启发式方法,实现高效且参数经济的链接预测。
摘要:
链接预测是图机器学习中的核心挑战,需要能够捕捉丰富且复杂的拓扑依赖关系的模型。虽然图神经网络(GNN)是标准解决方案,但最先进的流程通常依赖于显式结构启发式或内存密集型的节点嵌入——这些方法难以泛化或扩展到大规模图。新兴的图Transformer(GT)提供了一种潜在的替代方案,但由于复杂的结构编码,它们通常会产生显著的开销,阻碍了其在大规模链接预测中的应用。我们通过PENCIL挑战这些复杂的范式,这是一种仅编码器的普通Transformer,用对采样局部子图的注意力替代手工先验,保留了标准Transformer的可扩展性和硬件效率。通过实验和理论分析,我们表明PENCIL比GNN提取了更丰富的结构信号,隐式泛化了一类广泛的启发式和基于子图的表达能力。实验上,PENCIL优于启发式信息增强的GNN,并且比基于ID嵌入的替代方案参数效率高得多,同时在各种基准测试中保持竞争力——即使没有节点特征。我们的结果挑战了当前对复杂工程技术的依赖,表明简单的设计选择可能足以实现相同的能力。我们的代码公开在 https://github.com/quang-truong/pencil。
英文摘要:
Link prediction is a core challenge in graph machine learning, demanding models that capture rich and complex topological dependencies. While Graph Neural Networks (GNNs) are the standard solution, state-of-the-art pipelines often rely on explicit structural heuristics or memory-intensive node embeddings -- approaches that struggle to generalize or scale to massive graphs. Emerging Graph Transformers (GTs) offer a potential alternative but often incur significant overhead due to complex structural encodings, hindering their applications to large-scale link prediction. We challenge these sophisticated paradigms with PENCIL, an encoder-only plain Transformer that replaces hand-crafted priors with attention over sampled local subgraphs, retaining the scalability and hardware efficiency of standard Transformers. Through experimental and theoretical analysis, we show that PENCIL extracts richer structural signals than GNNs, implicitly generalizing a broad class of heuristics and subgraph-based expressivity. Empirically, PENCIL outperforms heuristic-informed GNNs and is far more parameter-efficient than ID-embedding--based alternatives, while remaining competitive across diverse benchmarks -- even without node features. Our results challenge the prevailing reliance on complex engineering techniques, demonstrating that simple design choices are potentially sufficient to achieve the same capabilities. Our code is publicly available at https://github.com/quang-truong/pencil.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。