potentialpaper

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 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Graph Neural Networks (GNNs) often fail to capture the link-specific structural patterns essential for accurate link prediction, since their node-centric message passing might overlook the subgraph structures connecting two nodes. Prior attempts to inject such structural context either suffer from high computational cost or rely on oversimplified heuristics (e.g., common neighbor counts) that cannot capture multi-hop dependencies. We propose SP4LP (Shortest Path for Link Prediction), a new framework that integrates GNN-based node encodings with sequence modeling over shortest paths. Specifically, SP4LP first computes node representations with a GNN, then extracts the shortest path between each candidate node pair and processes the sequence of node embeddings with a sequence model. This design allows SP4LP to efficiently capture expressive multi-hop relational patterns. Theoretically, we show that SP4LP is strictly more expressive than both standard message-passing GNNs and several leading structural feature methods, positioning it as a general and principled framework for link prediction in graphs. Empirically, SP4LP sets a new state of the art on many standard link prediction benchmarks.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

FromAToBDateVersionSubmitted toPDFEvidence
8 Sep 2025NPGML @ NeurIPS 2025submittedNPGML @ NeurIPS 2025Accepted · Poster—[1]
5 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]—[1]
Their titles, abstracts and, where both have a PDF, the text.Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:46 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

Summary: The authors propose a link prediction architecture that uses GNN embeddings, and the embeddings along a shortest path are fed into a sequence model, e.g., a transformer. The paper also makes a small theoretical contribution: GNN-only predictions miss automorphic edges, and it is more expressive than other SOTA architectures. The architecture is evaluated on standard benchmark datasets showing favorable prediction performance.

Strengths:

  • The reviewers like the simple, modular architecture idea that so far has not been studied in link prediction architectures.
  • Some reviewers highlighted the scope of the empirical study and the amortized computation.

Weaknesses:

  • Some reviewers raised potential weaknesses in the experimental protocol. That is, it is unclear if the queried edge is included in the graph during path computation. One reviewer also spotted potential issues in the evaluation code.
  • At least one reviewer also raised issues regarding disconnected graphs.
  • Reviewer HskL mentioned that some theoretical claims are overstated and rely on strong assumptions.

Suggestions for improvements:

  • Make the evaluation protocol more precise and address potential data leakage.
  • Discuss the case of disconnected pairs.
  • Make the theoretical statement more precise.
  • Describe how to handle tie-breaking in the presence of multiple shortest paths.
Final justification

The paper is very borderline. However, the authors have addressed most of the reviewers' concerns. Hence, I recommend acceptance.

Please revise the final paper based on the rebuttal.

Area Chair 3dBy · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

Summary: The authors propose a link prediction architecture that uses GNN embeddings, and the embeddings along a shortest path are fed into a sequence model, e.g., a transformer. The paper also makes a small theoretical contribution: GNN-only predictions miss automorphic edges, and it is more expressive than other SOTA architectures. The architecture is evaluated on standard benchmark datasets showing favorable prediction performance.

Strengths:

  • The reviewers like the simple, modular architecture idea that so far has not been studied in link prediction architectures.
  • Some reviewers highlighted the scope of the empirical study and the amortized computation.

Weaknesses:

  • Some reviewers raised potential weaknesses in the experimental protocol. That is, it is unclear if the queried edge is included in the graph during path computation. One reviewer also spotted potential issues in the evaluation code.
  • At least one reviewer also raised issues regarding disconnected graphs.
  • Reviewer HskL mentioned that some theoretical claims are overstated and rely on strong assumptions.

Suggestions for improvements:

  • Make the evaluation protocol more precise and address potential data leakage.
  • Discuss the case of disconnected pairs.
  • Make the theoretical statement more precise.
  • Describe how to handle tie-breaking in the presence of multiple shortest paths.
Final justification

The paper is very borderline. However, the authors have addressed most of the reviewers' concerns. Hence, I recommend acceptance.

Please revise the final paper based on the rebuttal.

1 comment
Authors · CommentOpenReview ↗

Author Response to Metareview

We thank the Area Chair and the reviewers for their careful assessment and for recognizing SP4LP’s simplicity, modularity, broad empirical evaluation, and favorable computational properties.

We have addressed all four concerns highlighted in the metareview.

Evaluation protocol and potential leakage: Reviewer HskL, W1/Q1. We clarify that all reported results use leakage-free path-extraction graphs excluding the queried positive edges

Disconnected pairs: Reviewer HskL, W2/Q2. We clarified the endpoint-only fallback for disconnected pairs and reported path and no-path statistics across datasets.

Theoretical statements: Reviewer HskL, W4/Q4. We refined the assumptions and scope of the results, corrected the sign typo in Proposition 4.4, and clarified that Eq. (7) processes the full ordered path, including both endpoints.

Shortest-path tie-breaking: Reviewer uiX6, W3/Q1, and Reviewer FtWR, WA/QA. We clarify the deterministic BFS rule and provide an experiment showing negligible sensitivity to alternative shortest paths.

Beyond the metareview, we added analyses of truncated BFS, graph automorphisms, and the time and memory costs of LPFormer and MPLP. We also provided complete per-dataset hyperparameters and will release a full reproduction package.

We believe these clarifications, corrections, and additional experiments fully address the concerns summarized in the metareview and strengthen the precision, reproducibility, and empirical support of the paper.

Thank you for your time and consideration,

Authors

Reviewer FtWROpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
theory
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

GNNs Meet Sequence Models Along the Shortest-Path: an Expressive Method for Link Prediction propose SP4LP - a rather elegant idea of characterixing vertices using the sentences composed of shortest paths. They propose that to better define edges using the properties of walks along these minimal paths. They try to address the "automorphic node problem" (as defined by the authors in preposition 2.9). All in all it is a very near framework. However, sadly (given the very elegant idea), the experimental validation of existing vs non-existing edges is very problematic, and much better prediction task (e.g. sign prediction on edges) can be proposed. Still the idea is neat. The proofs are not given at all in the main text, slightly limiting the strength of the claims.

Strengths and weaknesses

Strength - A) Very neat idea B) Addresses an underexplored problem C) strong theoretical claims, D) I like that it does not depend on the specific GNN format used, and E) the claimed improvement in performance Weakness - A) It is not clear how they choose the specific minimal path, B) The theory is mentioned, but they do not even provide a proof outline. B) The practical results of the theoretical improvement are not very clear. C) Quite limited experimental validation.

Questions

A) How did you choose the shortest path B) Can you please propose a toy model to highlight the advantage of your method in some explainable setup. C) I suspect that this is not an issue, but is the O(n^3) cost of the minimal path (using Floyd-Warshall or any similar algorithm), is a problem in the total cost. D) What is the practical advantage of the proposed approach

Limitations

Not really, there is a very short limitation section in the conclusions, that does not really address the main limitations.

Formatting concerns

Not that I can see, but all the proofs are in the appendix which make the paper actually real long.

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the Reviewer for the careful reading and constructive feedback. We have addressed all concerns below.

W A) and Q A) Selection of the shortest path

When multiple shortest paths exist, we select the first path returned by BFS under a fixed adjacency ordering and cache it, making the choice deterministic throughout training and evaluation. We use one path for efficiency, although the general SP4LP formulation supports aggregating multiple shortest paths.

To assess sensitivity to tie-breaking, we sampled up to ten alternative shortest paths per Cora test link using a fixed trained GCN–Transformer model. The standard deviations were only 0.10 MRR points and 0.01 Hits@10 points, indicating negligible sensitivity to path selection. We will document both the selection rule and this analysis in the revision.

W B) Proofs outlines

We agree that the main text should expose the key proof ideas. The complete proofs remain in Appendix A due to space constraints, but we will add the following short outlines after the corresponding theorem statements. Proposition 4.4 - proof outline. We construct two non-automorphic links whose respective endpoints are automorphic. Their shortest-path sequences differ, so an injective path encoder can assign them distinct representations, whereas a pure endpoint-based GNN necessarily collapses them. Theorem 4.5 - proof outline. For each baseline class, we first show that SP4LP can reproduce its link representation through an appropriate choice of ϕ\phi, AGG, and ρ\rho. Strictness then follows from a pair of links that the baseline collapses but SP4LP distinguishes through path length, internal-node information, or path order. The Neo-GNN/BUDDY result follows through NCN, while the NBFNet comparison uses its equivalence to a pure GNN under the stated assumptions. We will retain the complete constructions and formal arguments in Appendix A.

W C) Practical impact of the expressiveness gain

The theory shows that SP4LP can distinguish structurally different links that competing methods necessarily map to the same representation. In practice, this additional capacity is useful when datasets contain such hard-to-distinguish links and their shortest paths provide informative multi-hop structure. This is reflected in SP4LP’s strong performance across many datasets. Conversely, the gain is smaller on ogbl-ddi, where shortest paths have average length close to two and therefore provide limited additional information. Finally, our ablations confirm the practical contribution of each component: the full model outperforms both using shortest-path length alone and applying the sequence model directly to raw node features.

W D) Breadth of the experimental validation

We would like to clarify that the empirical validation is broad along several dimensions:

  • 7 benchmarks: three Planetoid and four OGB datasets, ranging up to 2.9M nodes and over 30M edges;
  • 15 baselines: GCN, GAT, GraphSAGE, GAE, SEAL, BUDDY, Neo-GNN, NBFNet, NCN, NCNC, PEG, GDGNN, MPLP, LPFormer, and GraphGPT;
  • rigorous evaluation: MRR and Hits@K under the challenging and established HeaRT protocol, averaged over five seeds;
  • complementary analyses: component ablations, multiple GNN and sequence-model choices, inference-time and GPU-memory scaling, preprocessing and per-link complexity, and analysis of links without common neighbors. In this rebuttal, we further provide split-wise shortest-path and disconnected-pair statistics and a sensitivity analysis over alternative shortest paths. This breadth was also explicitly recognized in another review (Reviewer uiX6) and in the meta-review, which highlighted the scope of the empirical study.

Q B) Explainable toy setup

Thank you for the suggestion. Figure 1 is intended to provide such a controlled example. Consider randomly relabeled copies of the motif in Figure 1, with the task of distinguishing the same-side pair (v,u′)(v,u') from the cross-graph pair (v,u)(v,u). The individual endpoints are automorphic, so any pure GNN followed by an endpoint decoder assigns the two links the same representation. SP4LP instead observes different pair-specific paths:

$ v \rightarrow \text{orange} \rightarrow u' $

and

$ v \rightarrow \text{orange} \rightarrow \text{yellow} \rightarrow \text{orange} \rightarrow u, $

and can therefore distinguish the two classes. We will present Figure 1 explicitly as this interpretable synthetic setup and report the corresponding comparison with a pure GNN.

Q C) cost of shortest path

The O(n3)O(n^3) concern would apply if SP4LP used Floyd–Warshall or computed all-pairs shortest paths, which it does not. For our unweighted graphs, we run BFS only from the distinct source nodes appearing in the supervised train/validation/test links. The preprocessing cost is therefore $ O!\left(S(n+m)\right), $ where SS is the number of distinct sources, rather than O(n3)O(n^3). Paths are computed once, cached, and reused across all epochs and inference batches; hence, no graph traversal is performed during training or evaluation. In our benchmarks, the complete preprocessing takes only seconds to a few minutes. After caching, the per-link cost is only $ O(kd + T_{\mathrm{seq}}), $

where kk is the typically short path length, and is independent of the total graph size. We will make this distinction from all-pairs shortest-path computation more prominent in the revision.

Q D) practical advantage of the proposed methods

SP4LP provides three main practical advantages:

  1. More informative link representations. It captures pair-specific multi-hop structure through the contextualized embeddings along the shortest path, distinguishing links that endpoint-only or common-neighbor-based methods may collapse.
  2. Efficiency at training and inference.
    The GNN is applied only once to the full graph, while shortest paths are precomputed and cached. SP4LP therefore avoids per-link subgraph extraction or repeated message passing and performs only lightweight sequence encoding at inference.
  3. Modularity and strong performance.
    The framework can use different GNN backbones and sequence encoders without redesigning the architecture. Under the challenging HeaRT protocol, it ranks first in MRR on six of seven datasets while maintaining competitive inference time and memory usage. Thus, the practical advantage is a favorable trade-off between predictive expressiveness, scalability, and architectural simplicity.
Authors · CommentOpenReview ↗

Dear Reviewer,

Thank you again for recognizing the potential of our approach and for encouraging us to clarify its theoretical and practical relevance. In our response, we explained how the shortest path is selected, added an empirical sensitivity analysis over alternative shortest paths, presented Figure 1 more explicitly as an interpretable toy setup, and clarified why our preprocessing relies on cached BFS computations rather than all-pairs shortest paths. We also expanded the discussion of the practical advantages and breadth of the empirical validation.

We would greatly appreciate hearing whether these clarifications address your questions, or whether there is any remaining point that we could clarify before the end of the discussion period.

Thank you for your time and consideration.

Reviewer uiX6OpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
4/4
Significance
3/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper introduces SP4LP, a framework for link prediction that addresses the limitations of standard GNNs in capturing link-specific structural patterns. Unlike traditional node-centric message passing, SP4LP constructs link representations by applying a sequence model to the GNN embeddings of nodes along the shortest path between candidate endpoints. This enables the model to capture ordered, multi-hop relational dependencies while retaining computational efficiency through precomputed and cached shortest paths. The authors theoretically show that SP4LP is strictly more expressive than standard message-passing GNNs and several structural-feature-based methods. Empirical results on seven benchmarks under the HeaRT evaluation protocol demonstrate strong performance.

Strengths and weaknesses

Strengths

S1) The paper is clearly written, well organized, and easy to follow.

S2) The evaluation is broad and includes large-scale datasets and recent baselines, such as LPFormer, GraphGPT, GDGNN, and MPLP.

S3) SP4LP obtains strong MRR results, ranking first on six of the seven datasets. The ablation study supports the benefit of combining GNN representations with sequence modelling over shortest paths.

S4) The computational analysis is detailed. The authors clarify that shortest paths are computed only for the relevant links, cached, and reused during training and inference.

S5) The comparison with NCN is informative. In particular, the analysis of links without common neighbours provides practical motivation for using shortest paths.

S6) The theoretical analysis, results over multiple seeds, code availability, and detailed implementation information support the technical quality and reproducibility of the work.

Weaknesses

W1) The technical novelty appears somewhat limited. SP4LP is a simple and effective combination of established components: GNN embeddings, shortest paths, and sequence models. The distinction from NCN is well motivated, but the architecture remains relatively straightforward.

W2) The practical scalability of shortest-path computation is supported primarily through complexity analysis. Approximate techniques such as truncated BFS and landmark-based methods are mentioned only as future work. An empirical effectiveness-efficiency analysis would better support scalability to very large graphs.

W3) Although the general SP4LP formulation supports aggregating multiple shortest paths, the implementation uses only the first path returned by BFS. When multiple shortest paths exist, the resulting representation may therefore depend on the BFS tie-breaking or adjacency ordering. The paper does not assess the robustness of the results to this choice or compare single-path selection with alternative selection or aggregation strategies.

W4) The automorphic-node problem is central to the paper’s motivation, but the experiments do not quantify how frequently it occurs in the considered real-world graphs. Such an analysis would better connect the theoretical motivation with the empirical gains.

W5) SP4LP achieves consistently strong MRR results, but its performance is less competitive in terms of Hits@K on some OGB datasets, particularly ogbl-ddi, ogbl-collab, and ogbl-ppa. The paper discusses the result on ogbl-ddi, but provides limited analysis of why the gains in MRR do not consistently translate into improvements in Hits@K.

W6) The results exhibit high variability on Cora and Citeseer (Table 3 in Appendix). For example, SP4LP obtains an MRR of 28.84±5.4528.84\pm5.45 on Cora and 29.48±10.1729.48\pm10.17 on Citeseer. This raises some concerns about training stability.

W7) The scalability analysis (Figure 3) compares SP4LP with only a limited subset of the baselines considered in the predictive evaluation. In particular, recent methods such as LPFormer, GraphGPT, GDGNN, and MPLP are omitted. Including at least the scalable methods among these baselines, or explaining why they could not be evaluated, would provide a more complete assessment of SP4LP’s efficiency and its effectiveness-efficiency trade-off.

Questions

Q1) How sensitive is SP4LP to the particular shortest path returned when multiple alternatives exist? Results with different BFS tie-breaking orders or multiple paths would help assess robustness.

Q2) Could the authors evaluate truncated BFS on one large dataset and report both predictive performance and preprocessing time?

Q3) Can the authors quantify the prevalence of automorphic nodes or links in the evaluated datasets and examine whether it correlates with SP4LP’s improvements?

Q4) What causes the relatively large variance on Cora and Citeseer? Is it mainly associated with the GNN backbone, sequence encoder, or hyperparameter selection?

Q5) Why does Figure 3 consider only a subset of the predictive baselines? Runtime and memory results for LPFormer, GDGNN, or MPLP, where feasible, would provide a more complete scalability comparison.

Limitations

yes

Final justification

The rebuttal clarified several aspects of the paper, and I remain slightly positive overall. However, my main concern regarding the limited technical novelty of the proposed approach was not fully addressed. Since this concern is central to my assessment, I maintain my initial rating.

Formatting concerns

None

4 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the Reviewer for the careful reading and constructive feedback. We have addressed all concerns below.

W1 - Novelty:

We agree that SP4LP builds on established components, but it is not a mere combination of them. Its key insight is that the ordered sequence of contextualized GNN embeddings along a shortest path forms a new link-centric representation. This composition yields properties unavailable from the components in their standard use:

  1. Greater expressiveness: it captures ordered multi-hop patterns missed by endpoint aggregation and unordered structural features.
  2. Formal guarantees: it overcomes the automorphic node problem and is strictly more expressive than several established link-prediction models.
  3. Strong empirical performance: it achieves competitive or state-of-the-art results under the established HeaRT setting with a single global GNN pass. We therefore view simplicity as a strength.The novelty lies in recognizing that familiar primitives, composed in this specific way, yield non-trivial expressiveness gains together with strong empirical performance.

W2/Q2 - Truncated BFS: predictive performance vs. preprocessing cost.

Following the reviewer's suggestion, we evaluated truncated BFS on Pubmed, varying the maximum path length (in hops): pairs reachable within the cutoff keep their exact shortest path, while pairs beyond it fall back to the endpoint pair (the final endpoint is always retained). We report test performance and shortest-path preprocessing time (single run).

Max path length MRR Hits@10 Preprocessing (s)
2 7.00 14.98 1
5 7.59 16.34 150
7 9.16 18.21 320
Full 10.87 23.01 570

Truncation exposes a controllable effectiveness–efficiency trade-off: aggressive truncation cuts preprocessing, while relaxing the cutoff recovers accuracy and converges to the exact model. We will add this analysis to the revised manuscript.

W3/Q1 - Path selection (also raised by meta-reviewer):

We thank the reviewer for raising this point. In the current implementation, SP4LP selects the first shortest path returned by BFS under a fixed adjacency ordering and the selected path is cached. To evaluate sensitivity to this choice, we conducted a controlled experiment on Cora. We fixed the trained GCN–Transformer model and varied only the shortest path used at test time. For each test link, we sampled up to ten alternative shortest paths, using repetition when fewer alternatives were available. Across path selections, the standard deviations were only 0.10 MRR points and 0.01 Hits@10 points. This very low variability indicates that SP4LP is empirically robust to BFS tie-breaking. We will add this experiment and explicitly document the tie-breaking procedure in the revised manuscript.

W4/Q3 - Automorphisms

To quantify graph symmetries, we use the metric

$ r'_G = 1-\frac{|O_G|-1}{|V_G|-1}$

where ∣OG∣|O_G| is the number of node-automorphism orbits and ∣VG∣|V_G| is the number of nodes. Higher values indicate a larger proportion of nodes belonging to non-trivial automorphic classes. We computed the exact orbits using nauty [1] on the three datasets for which exact enumeration was computationally feasible. Dataset

rG′r'_G GCN MRR SP4LP MRR (\Delta) MRR
Cora 0.127 16.61 28.84 +12.23
Citeseer 0.372 21.09 29.48 +8.39
PubMed 0.341 7.13 10.87 +3.74

These results confirm that automorphic ambiguity is present in all three real-world graphs. However, we do not observe a monotonic correlation between rG′r'_G and the performance improvement. This indicates that automorphisms motivate the need for pair-specific representations but are not the only factor governing empirical performance; node features, path distributions, optimization, and other architectural inductive biases also contribute. We will include this analysis and qualification in the revised manuscript.

W5 - MRR vs Hits@K

MRR and Hits@20 capture different aspects of ranking quality. MRR is sensitive to the exact position of the positive link, whereas Hits@20 only records whether it falls above or below a fixed threshold. Thus, moving a positive link from rank 10 to rank 2 substantially improves MRR without changing Hits@20. Our results suggest that SP4LP is particularly effective at improving the highest-ranked predictions, while this does not always translate into greater top-20 coverage. The effect is especially visible on ogbl-ddi, whose average shortest-path length is approximately two and where only 0.04% of positive test links lack common neighbors. Consequently, a single shortest path provides limited additional information, while methods aggregating broader local-overlap statistics retain an advantage in Hits@20. A similar trade-off occurs on ogbl-collab and ogbl-ppa: SP4LP encodes one informative ordered path, but may discard evidence distributed across multiple shortest paths or common neighbors. We will expand the discussion accordingly and clarify that higher theoretical expressiveness does not guarantee uniform improvement across every metric, since empirical performance also depends on the dataset structure, optimization, and architectural inductive bias.

W6/Q4 - Variability

Table 5, included in the appendix on page 18, suggests that the variability arises primarily from jointly optimizing the two components on small datasets. On Cora, the MRR standard deviation increases from 0.28 for GNN + SP length and 1.26 for the sequence-only model to 5.45 for SP4LP. On Citeseer, it increases from 0.99 and 2.93 to 10.17, respectively; Hits@10 follows the same pattern. We will clarify this interaction in the revised manuscript.

W7/Q5 - Scalability baselines in Figure 3.

We profiled the two omitted baselines that admit a directly comparable per-batch inference cost, LPFormer and MPLP, on ogbl-collab using the same protocol as Figure 3 (single batch of test links, same GPU). These curves will be added to Figure 3 in the revised paper; we report the raw numbers here. Time (ms) / peak GPU memory (GB) on ogbl-collab:

Batch size LPFormer MPLP
32 78.2 / 5.11 21.2 / 1.57
512 80.0 / 5.12 36.3 / 2.09
4,096 94.8 / 5.18 49.8 / 2.64
16,384 174.0 / 5.37 64.8 / 3.05
32,768 282.5 / 7.04 75.8 / 3.67
65,536 504.8 / 11.12 90.1 / 4.81

Both run without OOM at all batch sizes, consistent with Figure 3: SP4LP stays competitive in time and memory while more accurate than MPLP. The other two cannot be placed on the same axis. GDGNN does not complete on collab under this protocol (its >24h entry in Table 1). GraphGPT does run predictively (Table 1) but is a generative Eulerian-path transformer whose inference is autoregressive decoding over variable-length sequences, not a fixed-cost batch forward, so its per-batch time is not commensurable with the message-passing baselines. We will note both exclusions in the revised caption.

[1] McKay, Brendan D., and Adolfo Piperno. "Practical graph isomorphism, II." Journal of symbolic computation 60 (2014): 94-112.

Authors · CommentOpenReview ↗

Dear Reviewer,

Thank you again for your detailed and constructive feedback. Following your suggestions, we added new analyses on truncated BFS, sensitivity to alternative shortest paths, the prevalence of graph automorphisms, the variability observed on Cora and Citeseer, and the runtime and memory costs of LPFormer and MPLP. We hope that these additional experiments and clarifications address the concerns raised in your review. As the discussion period is nearing its end, we would be grateful to hear whether any point remains unresolved or requires further clarification.

Thank you again for your time.

Reviewer uiX6 · CommentOpenReview ↗

Thank you for your detailed and thoughtful response. I remain slightly positive about the paper; however, the rebuttal did not fully address my concerns regarding the technical novelty of the approach. This remains my main concern and the reason I am not increasing my rating at this stage.

Authors · CommentOpenReview ↗

Dear Reviewer,

Thank you for the clarification, for your thoughtful engagement with our response, and for remaining positive about the paper.

We would like to emphasize that the novelty of SP4LP lies not in the individual components, but in the link-centric representation obtained by modeling the ordered sequence of contextualized GNN embeddings along the shortest path. This enables ordered multi-hop reasoning, comes with formal expressiveness guarantees, and retains the efficiency of a single global GNN pass.

We appreciate your perspective and thank you again for your time.

Reviewer HskLOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
2/4
Clarity
2/4
Significance
2/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper proposes SP4LP, a link prediction method that supplements endpoint GNN embeddings with an encoding of a shortest path between the queried nodes. In broad terms, the model first computes node representations with a GNN, then feeds the node embeddings along a shortest path into a sequence model such as an LSTM or Transformer, and finally combines the path representation with the endpoint representations.

I find the basic idea sensible. Endpoint-only link predictors can miss pair-specific structure, and shortest paths are a natural source of such information. The paper also reports strong empirical results under the HeaRT protocol, especially in terms of MRR.

My main reservation is that the experimental setting is not specified carefully enough for a path-based method. Small choices about which graph is used to compute paths, whether queried edges are present, and how disconnected pairs are handled can substantially change the task. The released code raises additional concerns along these lines. I therefore think the paper needs a cleaner and more reproducible evaluation before the empirical claims can be accepted.

Strengths and weaknesses

Strengths

  1. The paper targets a real limitation of endpoint-only link predictors. The motivation is clear and reasonable. If a link representation only uses the two endpoint embeddings, then links with indistinguishable endpoints may also become indistinguishable. Adding pair-specific structural context is therefore a natural way to address this limitation and provides a meaningful motivation for the proposed method.

  2. The method is simple and modular. The separation between node encoding and path encoding is appealing. In principle, different GNN backbones and sequence encoders can be swapped into the framework without changing the overall design, which makes the method easy to understand and potentially extensible.

  3. Shortest paths are a meaningful alternative to common-neighbor features. Common-neighbor-based methods can fail when two endpoints have no overlapping neighborhoods. Shortest paths cover a broader set of connected pairs and can carry multi-hop structural information, making them a plausible and useful structural signal, especially for sparse graphs.

Weaknesses

  1. The evaluation graph is not defined precisely, and the code suggests a possible validation-leakage issue. For SP4LP, the graph used to compute the shortest path is part of the model input. The paper does not clearly define this graph for train, validation, and test queries. This matters because if the queried positive edge is already present in the path graph, then its shortest-path distance is simply dHq(u,v)=1d_{H_q}(u,v) = 1. That can reveal label information, especially when negative pairs are non-edges with longer or nonexistent paths. This concern is reinforced by the released code. In the OGB pipeline, when --use_valedges_as_input is enabled, validation positive edges are added to G_full before validation paths are computed, and validation evaluation then uses the augmented graph. Since validation performance is used for early stopping and model selection, this can make validation easier and can indirectly affect the selected test model. The paper should state exactly whether this setting was used for any main result, and how the evaluation follows the official benchmark protocol.

  2. Disconnected pairs are not handled in the paper, although the code uses a pseudo-path. The definition of shortest path assumes that a path exists. If PG(u,v)=∅P_G(u,v)=\emptyset, then dG(u,v)d_G(u,v) is not finite. The paper does not say how often this happens or how such cases are represented. In the code, disconnected pairs are represented by a fallback pseudo-path [src, dst]. This may be a practical choice, but it is not a shortest path and it changes the input seen by the model. Since positives and negatives may have different no-path rates, this detail can affect both performance and interpretation. The paper should report shortest-path statistics for each dataset and split, including mean, variance, and the number of pairs with no path.

  3. The released implementation is not yet enough to reproduce the reported setting cleanly. Several details in the code are either different from the paper's high-level description or not documented in the paper. For example, the OGB training code randomly splits training positives into message-passing edges and loss edges; the small-dataset code removes the current batch of positives during training; training negatives may be sampled without excluding all held-out positives; and the path cache is keyed by coarse counts rather than by the actual edge split and negative samples. The small-dataset pipeline also loads precomputed gnn_feature/entity_embedding files, but their generation is not documented. Some of these choices may be defensible. The issue is that they are not specified tightly enough for reproduction or auditing. The authors should provide exact commands, configurations, seeds, feature-generation code, negative-sampling rules, and cache policy for the reported results.

  4. Some theoretical statements need narrower assumptions. The theory section is useful, but some statements appear too broad as written. Since the graph is attributed, the automorphism discussion should account for node features. Proposition 4.4 also seems to use the wrong equality direction for the endpoint-collapse condition; the failure mode is that two links receive the same representation, F((u,v),G)=F((u′,v′),G)F((u,v),G) = F((u',v'),G). Theorem 4.5 also seems broader than the provided proofs for GDGNN and NBFNet support. Finally, Equation 7 should state unambiguously whether the path encoder receives endpoints, internal nodes, or some other sequence. These issues look fixable, but the current claims should be scoped more carefully.

Questions
  1. What exact official evaluation setting was used for the main results? Please define the train, validation, and test graphs used for message passing and path extraction. Were any main-table results produced with --use_valedges_as_input? If so, how was validation leakage avoided?

  2. How are disconnected pairs and path statistics handled? What input is used when dHq(u,v)=∞d_{H_q}(u,v)=\infty? Please report shortest-path length mean, variance, and no-path counts for positive and negative train/validation/test pairs on each dataset.

  3. Can the authors provide code that exactly reproduces the reported numbers? Please provide the exact commands, hyperparameters, seeds, feature-generation scripts, negative-sampling protocol, and cache policy. The path cache should either be keyed by the actual edge split and negative samples or recomputed for the reported runs.

  4. Can the main theoretical claims be restated with precise assumptions? Please specify the feature-preserving automorphism assumptions, the intended scope of Proposition 4.4, and the exact GDGNN and NBFNet model classes covered by Theorem 4.5.

Limitations

Yes

Final justification

I am satisfied with the responses to W1 and W2. In the final paper, please specify the graph used for each split, formally define the ([u,v]) fallback, and report the corresponding counts and denominators.

The clarification about --force_recompute_paths resolves my main concern under W3, since all paths for Table 1 were recomputed. Please include the exact commands and configurations in the reproduction package.

The overlap between sampled training negatives and held-out positives remains a separate issue. I do not consider it favorable leakage, particularly if all baselines use the same procedure, but the claim that it “can only hurt” is too strong. Please document the protocol and, if possible, report the collision rate or results under strict exclusion.

For W4, the corrected cycle resolves the issue with Figure 4. The proof should state that node features are constant, the cycle is vertex-transitive, (d(u,v)=3), and (d(u,v')=4). This explains why NCN gives both links the same representation while a length-sensitive SP4LP model can distinguish them.

The revised claims regarding Neo-GNN and BUDDY are appropriate: the results show that neither dominates SP4LP, rather than that SP4LP is strictly more expressive. Removing NBFNet from Theorem 4.5 also resolves my concern about Equation 8.

One point remains in the NCN proof. Besides the strictness example, the theorem requires (\mathrm{NCN}\preceq\mathrm{SP4LP}). The previous identity-(\phi) and summation argument does not exactly recover NCN when paths include both endpoints. Please restrict the argument to the target-link-removed setting and explain how the path encoder extracts the internal common-neighbor node from each length-two shortest path.

Overall, the rebuttal addresses the main reasons for my original score. The remaining issues can be handled through revisions to the paper and reproduction package.

Formatting concerns

No

4 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for the precise reading. All points are addressed below. We note upfront that they concern the statement of our results, not their content: one is a typo, one is an indexing inconsistency, and two make explicit assumptions that were already used in the proofs. No proof, result, or experimental claim is affected

W1/Q1. Evaluation graphs and use_valedges_as_input. (also raised by meta-reviewer)

Bottom line: none of our reported results uses a path-extraction graph containing the queried positive edge. In particular, --use_valedges_as_input was not enabled for the reported ogbl-collab result, so the validation scores used for early stopping and model selection are not affected by this leakage. We clarify the path-extraction graph explicitly below, and we will incorporate this clarification into the revised version of the paper.Training: message passing uses a subset of training edges (the message-passing split); the supervised loss edges lie in the complement, so a positive's own edge is never in the graph used to compute its path. Validation/test: paths are computed on the training-only graph, so queried val/test positives are never present in it and no positive is trivially at distance 1. This holds in both pipelines and is confirmed by the path-length statistics (Q2): val/test positives show no spike at distance 1. We follow HeaRT [21] for the data splits, hard negatives, and evaluation metrics. HeaRT fixes the positive and negative query sets but does not define the path-extraction graph, which is specific to SP4LP; our construction is the leakage-free one specified above. The reviewer’s concern originates from the example command in the README, which erroneously includes --use_valedges_as_input. This is a documentation error: the flag was not enabled in the experiments producing our reported ogbl-collab result, and the README will be corrected. Had the flag been active, all validation positives would be at distance 1 (mean 1, var 0); instead they have mean 2.17, var 2.10 (Q2), showing paths were computed on the training-only graph. Thus the validation scores are leakage-free.

W2/Q2. Disconnected pairs & path statistics. (also raised by meta-reviewer)

When no path exists between uu and vv, the implementation uses the endpoint-only fallback sequence [u,v][u,v]. No dedicated no-path token is added; therefore, for disconnected pairs, the path branch contains only the endpoint GNN embeddings and no intermediate structural information. The table below reports shortest-path statistics for every dataset and split, separately for positive and negative pairs. np% denotes the percentage of pairs whose endpoints belong to different connected components, while mean and var are computed only over pairs with a finite path. No label leakage. Paths are computed on the training message-passing graph, excluding the queried edge. Hence, validation and test positive edges are not present during path extraction; otherwise, their paths would trivially have length 11. Consistently, their average path lengths are always greater than 11. The residual distance-11 training positives in collab and citation2 arise from node pairs that recur in the benchmark splits, rather than from retaining the queried edge. The statistics also clarify the practical relevance of the fallback. No-path pairs are generally rare in the large validation/test benchmarks, while they are more frequent in the smaller citation graphs. We will add this table and discussion to the appendix.

Dataset Split np% mean var Dataset Split np% mean var
Cora tr_p 13.31 3.00 2.13 ddi tr_p 0.01 2.00 0.00
Cora tr_n* 22.76 6.87 5.07 ddi tr_n 1.17 2.31 0.25
Cora val_p 15.59 3.09 2.71 ddi val_p 0.00 2.00 0.00
Cora tst_p 14.61 3.15 2.74 ddi tst_p 0.00 2.00 0.00
Cora val_n 14.32 5.48 5.33 ddi val_n 0.00 2.00 0.00
Cora tst_n 13.99 5.48 5.20 ddi tst_n 0.00 2.00 0.00
Citeseer tr_p 33.92 3.18 6.80 collab tr_p 5.16 1.82 0.42
Citeseer tr_n* 71.47 9.31 9.38 collab tr_n 13.73 7.30 3.07
Citeseer val_p 33.92 3.12 4.16 collab val_p 1.85 2.17 2.10
Citeseer tst_p 35.82 3.13 6.31 collab tst_p 2.04 2.50 2.39
Citeseer val_n 58.58 7.64 17.28 collab val_n 1.77 3.08 4.53
Citeseer tst_n 57.04 7.58 17.59 collab tst_n 1.82 3.05 4.06
Pubmed tr_p 24.77 3.10 1.89 ppa tr_p 0.00 2.11 0.12
Pubmed tr_n* 15.64 6.63 2.49 ppa tr_n 0.087 4.34 0.77
Pubmed val_p 23.11 3.05 1.63 ppa val_p 0.00 2.06 0.06
Pubmed tst_p 24.62 3.04 1.51 ppa tst_p 0.004 2.06 0.07
Pubmed val_n 15.49 4.34 5.38 ppa val_n 0.0001 3.66 0.74
Pubmed tst_n 16.46 4.53 5.53 ppa tst_n 0.002 3.68 0.71
citation2 tr_p 0.00 2.37 0.61
citation2 tr_n 0.86 6.11 3.00
citation2 val_p 0.08 3.63 0.15
citation2 tst_p 0.09 2.29 0.44
citation2 val_n 0.04 3.92 1.23
citation2 tst_n 0.05 4.78 3.38

W3/13: Reproducibility.

  • We will ship a reproduction package (commands, configs,seeds, requirements.txt, download_data.sh) and clarify the listed items; several are inherited verbatim from HeaRT. -*Node features (gnn_feature/entity_embedding). Not generated by us: they are part of the HeaRT data release (its download_data.sh) and loaded identically by every HeaRT baseline via the same call we use, this is what makes the comparison fair. We will state this and include the script.
  • Training negatives. Same rule as HeaRT's baselines (torch.randint, no exclusion of held-out positives). A sampled negative that happens to coincide with a held-out edge is merely a mislabeled negative: it adds a small amount of label noise and can only hurt training, never leak in our favour. We will document this and add an optional strict-exclusion flag.
  • Path cache. The reviewer is correct that the cache key used coarse counts. In the revised code we will key the cache by the seed and a hash of the actual edge split and sampled negatives, so that a changed split or seed can never reuse stale paths; we will also provide, for the reported runs, the exact recomputation command (--force_recompute_paths) and ship the corresponding cached paths so the numbers can be reproduced without ambiguity.

Finally, the exact per-dataset hyperparameters for the reported runs are listed in the table below (these will be included in the reproduction package and appendix).

Data GNN lr drop L2 GNN-L hid pred-L batch Seq seq-L heads p-hid p-drop pred-hid
Cora GCN .001 .5 0 1 128 3 1024 Trf 2 4 128 .1 256
Citeseer GCN .01 .5 1e-7 1 128 2 1024 LSTM 2 – 128 .1 256
Pubmed SAGE .001 .1 0 2 128 3 1024 Trf 2 4 128 .1 256
collab SAGE .001 0 0 3 256 3 65536 Trf 2 4 64 .2 64
ddi GCN .01 0 0 3 256 3 65536 Trf 2 4 64 .2 64
ppa GCN .001 .3 0 3 256 3 65536 Trf 2 4 64 .2 64
citation2 GCN .01 .3 0 3 128 3 65536 Trf 2 4 64 .2 64

W4/Q4. Theoretical assumptions. (also raised by meta-reviewer)

  1. Attributed automorphisms We agree. Since GG includes node features X0X^0, we will replace ΣnG\Sigma_n^G with the feature-preserving automorphism group ΣnG,X0={σ∈Πn:σ(A)=A and Xσ(i),:0=Xi,:0∀i∈V}\Sigma_n^{G,X^0} = \{ \sigma\in\Pi_n: \sigma(A)=A \ \mathrm{and}\ X^0_{\sigma(i),:}=X^0_{i,:} \quad \forall i\in V \} and update Definitions 2.7–2.8 accordingly. The conclusions and proof strategy of Propositions 2.9 and 4.4 and Theorem 4.5 remain unchanged, as they rely on equivariance under the relevant feature-preserving symmetries. Constant features recover the usual structural automorphism group.

  2. Proposition 4.4 The reviewer is correct: the proof contains a sign typo. A model suffers from the automorphic node problem when non-automorphic links with automorphic endpoints are collapsed: $ F((u,v),G)=F((u',v'),G). $ To show that SP4LP does not suffer from this problem, it suffices to provide one graph, link pair, and SP4LP instantiation for which the outputs differ, as done by the existing counterexample. We will correct the sign and make the universal and existential quantifiers explicit.

  3. Scope of Theorem 4.5 We will restrict the theorem statement to the model classes covered by the proofs: > Theorem 4.5. SP4LP is strictly more expressive than > (i) pure GNNs, > (ii) NCN, > (iii) Neo-GNN and BUDDY, > (iv) the set-based horizontal and degree-free vertical GDGNN link encoders, and > (v) the NBFNet edge-representation formulation of Equation 8 on simple undirected graphs, under the injectivity assumptions used in the proof. GDGNN variants using additional induced-subgraph features, and NBFNet formulations outside Equation 8, are therefore outside the scope of the theorem.

  4. Equation 7 The path encoder receives the full ordered sequence, including both endpoints. For a shortest path $ P=(u_0,\ldots,u_k), \qquad u_0=u, \quad u_k=v, $ its input is $ \phi!\left( (\operatorname{GNN}(u_i,G))_{i=0}^{k} \right), \qquad \phi:(\mathbb R^d)^{k+1}\rightarrow\mathbb R^d. $ We will correct Equation 7 accordingly. The endpoints also enter ρ\rho separately by design, providing explicit endpoint information in addition to their ordered roles within the path.

Authors · CommentOpenReview ↗

Dear Reviewer,

Thank you again for your detailed and careful review. We have provided a point-by-point response to all four concerns, including evidence that the reported results use leakage-free path-extraction graphs, comprehensive statistics for disconnected pairs, full reproducibility details, and more precisely scoped theoretical statements. As the discussion period is nearing its end, we would be grateful if you could let us know whether these clarifications address your concerns, or whether any point remains unclear.

Thank you for your time.

Reviewer HskL · CommentOpenReview ↗

Thank you for the detailed rebuttal. The clarifications on W1 and W2 are helpful, but I do not think W3 and W4 are fully resolved.

On W1, disabling --use_valedges_as_input and constructing validation and test paths from the training graph addresses most of my leakage concern. The collab statistics are reassuring, but the reported mean and variance cannot show whether there is a distance-1 spike. I also cannot tell whether these statistics and caches came from the exact runs reported in Table 1. I therefore no longer regard leakage as demonstrated, although the connection between these checks and the reported results remains unclear.

On W2, the [u,v] fallback and no-path statistics explain the implementation much more clearly. This rule should be stated in the paper and incorporated into the formal definition for disconnected pairs. Please also define tr_n* and report counts or denominators, since no-path cases are common on some datasets.

W3 remains my main concern because the response confirms that cache keys used only coarse graph counts and training negatives could overlap held-out positives. The proposed hash-based key, forced recomputation, stricter exclusion, and reproduction package are future changes rather than evidence from the reported runs. The exact hyperparameters are useful, but they do not provide a clean rerun or artifact connecting them to Table 1. I also find the statement that mislabeled negatives “can only hurt” too strong, since their effect on training and model selection is not necessarily one-sided.

W4 The proposed changes to the feature-preserving automorphism definition, Proposition 4.4, and Equation 7 are appropriate. However, the broad claim in Theorem 4.5 still needs work. In Figure 4, (u) and (v) appear to share a common neighbor, whereas (u) and (v') do not. NCN can therefore distinguish this pair, so the figure does not establish the claimed strictness. Also, stating that Neo-GNN and BUDDY are “not more expressive than NCN” does not by itself provide the inclusion needed for the transitive argument. The narrowed NBFNet statement concerns the custom edge formulation in Equation 8, not published NBFNet, unless their equivalence is shown. These claims should be proved more carefully, narrowed, or removed.

Overall, the rebuttal addresses much of W1 and W2, and I appreciate the additional detail. However, the reproducibility issues and the remaining gaps in Theorem 4.5 keep me from raising my score.

Authors · CommentOpenReview ↗

Thank you for the follow-up. We are glad that our clarifications address much of W1 and W2, and in particular that leakage is no longer regarded as demonstrated. We will make the [u,v] fallback explicit in the paper and formal definition, and report the corresponding counts and denominators. We also clarify that the asterisk in tr_n* was only a typographical error and has no technical meaning.

On W3, we realize that our previous response was ambiguous on the cache provenance. To clarify, --force_recompute_paths was enabled in all SP4LP runs reported in Table 1. Thus, all train, validation, and test paths, including those for the sampled training negatives, were recomputed from scratch, bypassing any pre-existing cache. Therefore, the coarse cache key could not have affected the reported results. The proposed hash-based key is only a robustness improvement for future runs in which force recomputation is not enabled. The hyperparameters previously provided are the exact configurations used for the reported runs.

Regarding the comparison with NCN (W4), the issue was caused by a drawing error in Figure 4: one edge was connected to the upper node instead of the intended lower node. The corrected figure is shown below.

   u ●────────────────────●

    ╱  · ·                  ╲

  ╱      ·   ·                ╲

●          ·    ·               ●

│            ·     ·            │

│              ·      ·         │

│                ·        ·     │

│                  ·         ·  │

●                   ·           ● v

  ╲                   ·       ╱

   ╲                   ·     ╱

    ╲                    ·  ╱

     ●────────────────────● v′

In the corrected graph, both queried pairs have no common neighbors,

$ N(u)\cap N(v)=N(u)\cap N(v')=\varnothing, $

while their shortest paths have different lengths. Consequently, NCN reduces to its endpoint-based GNN component and cannot distinguish the two links, whereas SP4LP distinguishes them through their different shortest-path representations. Therefore, the corrected example establishes that SP4LP is strictly more expressive than NCN. We have replaced Figure 4 and revised its caption to state these properties explicitly.

We also thank the reviewer for identifying the issue in the argument concerning Neo-GNN and BUDDY. We agree that stating that these models are “not more expressive than NCN” does not establish the inclusion required to conclude that SP4LP is strictly more expressive than them. We have therefore weakened and reformulated this part of the result.

Since

$ \mathrm{NCN}\preceq\mathrm{SP4LP}, $

if either Neo-GNN or BUDDY were more expressive than SP4LP, then, by transitivity, it would also be more expressive than NCN, contradicting the result established in the NCN paper. Thus, the supported conclusion is that neither Neo-GNN nor BUDDY is more expressive than SP4LP, rather than that SP4LP is strictly more expressive than them.

We have consequently revised the theorem as follows:

Theorem 4.5. SP4LP is strictly more expressive than Pure GNN link representation models, NCN, the set-based horizontal GDGNN link encoder, and the degree-free vertical GDGNN link encoder. Moreover, neither Neo-GNN nor BUDDY is more expressive than SP4LP.

The corresponding argument for Neo-GNN and BUDDY has been revised as follows:

Neo-GNN and BUDDY do not dominate SP4LP. We have established that

$ \mathrm{NCN}\preceq\mathrm{SP4LP}. $

Theorem 2 of the NCN paper establishes that neither Neo-GNN nor BUDDY is more expressive than NCN. Suppose, by contradiction, that Neo-GNN were more expressive than SP4LP, i.e.,

$ \mathrm{SP4LP}\preceq\mathrm{Neo\text{-}GNN}. $

By transitivity, this would imply

$ \mathrm{NCN}\preceq\mathrm{SP4LP} $

$ \preceq\mathrm{Neo\text{-}GNN}, $

and therefore

$ \mathrm{NCN}\preceq\mathrm{Neo\text{-}GNN}, $

contradicting Theorem 2 of the NCN paper. Hence, Neo-GNN is not more expressive than SP4LP. The same argument applies to BUDDY.

Finally, we agree that Equation 8 defines a custom edge-based message-passing formulation and that its equivalence to the published NBFNet architecture has not been established. To avoid overstating the result, we have removed NBFNet from Theorem 4.5 and no longer present the argument based on Equation 8 as an expressiveness result about the published NBFNet model. Equation 8 is now described only as the custom edge-based formulation considered in our analysis.

We hope these clarifications and revisions address the reviewer’s remaining concerns and make the empirical provenance and theoretical scope of our claims fully clear. We thank the reviewer again for the careful follow-up.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…