Link prediction is a common task on graph-structured data that has seen applications in a variety of domains. Classically, hand-crafted heuristics were used for this task. Heuristic measures are chosen such that they correlate well with the underlying factors related to link formation. In recent years, a new class of methods has emerged that combines the advantages of message-passing neural networks (MPNN) and heuristics methods. These methods perform predictions by using the output of an MPNN in conjunction with a "pairwise encoding" that captures the relationship between nodes in the candidate link. They have been shown to achieve strong performance on numerous datasets. However, current pairwise encodings often contain a strong inductive bias, using the same underlying factors to classify all links. This limits the ability of existing methods to learn how to properly classify a variety of different links that may form from different factors. To address this limitation, we propose a new method, LPFormer, which attempts to adaptively learn the pairwise encodings for each link. LPFormer models the link factors via an attention module that learns the pairwise encoding that exists between nodes by modeling multiple factors integral to link prediction. Extensive experiments demonstrate that LPFormer can achieve SOTA performance on numerous datasets while maintaining efficiency. The code is available at The code is available at https://github.com/HarryShomer/LPFormer.
翻译:链接预测是图结构数据上的一项常见任务,已在多个领域得到应用。传统上,该任务使用手工设计的启发式方法。启发式度量的选择原则是使其与链接形成相关的底层因素高度相关。近年来,出现了一类新方法,它结合了消息传递神经网络(MPNN)和启发式方法的优势。这些方法通过将MPNN的输出与捕获候选链接中节点间关系的"成对编码"相结合来进行预测。已有研究表明,它们在众多数据集上实现了强大的性能。然而,当前的成对编码通常包含强烈的归纳偏置,即使用相同的底层因素对所有链接进行分类。这限制了现有方法学习如何正确分类可能由不同因素形成的各种不同链接的能力。为了解决这一局限性,我们提出了一种新方法LPFormer,它尝试自适应地学习每个链接的成对编码。LPFormer通过一个注意力模块对链接因素进行建模,该模块通过建模对链接预测至关重要的多个因素来学习节点间存在的成对编码。大量实验表明,LPFormer能在保持高效的同时,在众多数据集上实现最先进的性能。代码可在 https://github.com/HarryShomer/LPFormer 获取。