Efficient Link Prediction via GNN Layers Induced by Negative Sampling

Yuxin Wang, Xiannian Hu, Quan Gan, Xuanjing Huang, Xipeng Qiu +1 more
10/14/2023
cs.LGstat.ML

Official code: yxzwang/SubmissionverOfYinYanGNN (7 stars, last commit 2024-05-02).

Abstract

Graph neural networks (GNNs) for link prediction can loosely be divided into two broad categories. First, \emph{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, \emph{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 \emph{forward pass} explicitly depends on \emph{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 \textit{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.

View on arXivView PDF

Code Implementations(1)

Code for YinYanGNN

71PythonNov 30, 20232 years ago

Similar Papers

Cite this paper

@article{wang2023efficient,
  title  = {Efficient Link Prediction via GNN Layers Induced by Negative Sampling},
  author = {Yuxin Wang and Xiannian Hu and Quan Gan and Xuanjing Huang and Xipeng Qiu and David Wipf},
  year   = {2023},
  eprint = {2310.09516},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.09516v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.09516.svg)](https://codeofpaper.com/paper/2310.09516)

Discussion