NeurIPS 2026QuestionsPapersAreasAboutMarkdown

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

Francesco Ferrini, Veronica Lachi, Antonio Longa, Bruno Lepri, Andrea Passerini

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: Graphs, OOD Detection & Medical Imaging › Graph Neural Network Signal Propagation · Type: new method · Keywords: graph neural networks, link prediction, shortest path, sequence modeling, multi-hop relational patterns

Areas: Model Architectures & Sequence Modeling › Dynamic and relational architectures › Graph Structural Encoding; Graph Learning › Graph Analysis Methods › Structural Encoding

Summary

SP4LP combines GNN node encodings with sequence modeling over shortest paths to capture expressive multi-hop patterns for link prediction.

Explained to a 5-year-old

We want to guess which two friends should become friends in a social network. The computer looks at each person and learns a picture of them. Then it finds the shortest route between two people and reads the pictures along that route. By putting those pictures together, it makes a guess about whether they will be friends. This helps the computer make better guesses than before.

Explained to a 5-year-old, longer

Imagine a big network where each person is a dot and a line between two dots means they know each other. Sometimes we want to guess if two people who don’t know each other yet might become friends. The computer first learns a hidden picture for each person by looking at their friends. Then it looks for the shortest path that connects the two people we are interested in. It follows the line from one person to the next, step by step, until it reaches the other. Along this path, the computer collects the hidden pictures of all the people it meets. It then puts those pictures together in order, like a story, to see how they are related. By reading this story, the computer can understand more complex relationships than just counting common friends. This helps it make better guesses about new friendships. The method works for any kind of network, like disease spread, web pages, or animal habitats. It also works when the network is huge, because it only needs the shortest route. In the end, the computer can predict new links more accurately than older methods.

For a technical reader

The paper addresses the limitation of standard GNNs in capturing link-specific structural patterns for link prediction. It proposes a framework that first obtains node embeddings via a GNN, then extracts the shortest path between candidate node pairs and processes the sequence of embeddings with a sequence model. This design enables expressive multi-hop relational reasoning while remaining computationally efficient. Theoretical analysis shows the framework is strictly more expressive than conventional message-passing GNNs and leading structural feature methods. Empirically, the approach achieves state-of-the-art performance on multiple standard link prediction benchmarks.

Problem

Graph Neural Networks often fail to capture link-specific structural patterns needed for accurate link prediction because their node-centric message passing overlooks subgraph structures. Existing approaches either are computationally expensive or use simplistic heuristics that cannot capture multi-hop dependencies.

Method

The approach first computes node embeddings with a GNN, extracts the shortest path between node pairs, and processes the sequence of embeddings with a sequence model to capture multi-hop relational patterns.

Results

The approach achieves state-of-the-art performance on many standard link prediction benchmarks.

Contributions

It provides a framework that integrates GNN encodings with sequence modeling over shortest paths, offers theoretical proof of higher expressiveness than standard GNNs and leading structural feature methods, and demonstrates superior empirical performance.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction