Manuscript Offprint
arXiv:2609.02216PEARL: Path-Entity Aligned Relational Learning with Contextual Subgraphs for Inductive Knowledge Graph Completion
Abstract
Inductive knowledge graph completion (IKGC) aims to predict missing links involving entities unseen during training, requiring models to learn transferable relational and structural patterns. Existing subgraph- and path-based approaches often encode relational paths independently of their surrounding query subgraphs, although the predictive relevance of a path may vary across structural contexts. We propose PEARL, a Path-Entity Aligned Relational Learning framework that models paths as context-conditioned reasoning signals. PEARL constructs a query-specific contextual subgraph from the union of the query entities' neighborhoods and uses a large language model (LLM)-guided retriever to distill semantically relevant paths. It then builds a bipartite interaction graph over paths, contextual entities, and a global subgraph representation, allowing path embeddings to adapt to local and global structural evidence. To suppress noise introduced by the enlarged context, PEARL employs a dual-view contrastive objective that promotes representation consistency under stochastic contextual perturbations. Experiments on WN18RR, FB15k-237, and NELL-995 show that PEARL obtains the best average Hits@10 among the compared IKGC methods on all three benchmarks. Ablation studies, efficiency analyses, and case studies further validate the contributions of contextual subgraph modeling, semantic path retrieval, path-entity interaction, and contrastive regularization.
Keywords: Inductive Knowledge Graph Completion; Large Language Models; Path-Entity Alignment; Context-aware Path Reasoning.
1 Introduction
Knowledge Graphs (KGs) have become a fundamental infrastructure for numerous AI applications, including recommendation [1,2], question answering [3,4], and semantic search [5,6], by organizing factual knowledge as relational triples. Despite their large scale, real-world KGs are inherently incomplete, motivating extensive research on knowledge graph completion (KGC) to predict missing facts [7,8]. Most existing KGC models
*Corresponding author.
are developed under the transductive setting, where all entities are assumed to be observed during training. However, real-world KGs evolve continuously and frequently introduce new entities. For example, e-commerce knowledge graphs are constantly expanded with newly released products and brands. Retraining the entire model whenever new entities arrive is therefore impractical [9]. Consequently, inductive knowledge graph completion (IKGC) [10–12] has attracted increasing attention, requiring models to learn transferable relational and structural patterns that generalize to unseen entities rather than relying on entity-specific embeddings.
Existing IKGC methods mainly exploit three types of reasoning evidence. The first is rule-based reasoning [13,14], which learns transferable logical rules and naturally supports inductive inference through relation patterns. The second is subgraph evidence [15–18], which captures the local structural context surrounding the query entities and enables reasoning through neighborhood interactions. The third is path evidence [19–21], which provides explicit multi-hop relational chains connecting the query entities and offers complementary logical clues beyond local structural information. These three paradigms have significantly advanced inductive knowledge graph completion from different perspectives.
Effective inductive reasoning often benefits from exploiting a broad range of relational evidence surrounding the query entities, as additional triples may provide complementary structural and semantic clues for relation prediction. However, real-world knowledge graphs inevitably contain noisy or irrelevant information [22,23], making not all available evidence equally useful for reasoning. Moreover, the predictive utility of a relational path may vary considerably across different structural contexts [24]. For example, the same reasoning path (Company, invests_in, Startup, produces, Product) may strongly support predicting an acquisition in one query, particularly when the surrounding structure reveals that Startup heavily relies on Company's supply chain and Company holds a majority stake. In another query, however, the same path may provide much weaker evidence if Company is merely a minor investor and Product is primarily sold to rival companies, suggesting a purely financial relationship rather than strategic alignment.
These characteristics give rise to two key challenges. First, how can richer relational and structural information be effectively incorporated while preserving the core semantics of the target triple and limiting the influence of noisy evidence? Second, local subgraphs often contain multiple relational paths connecting the query entities, some of which may be redundant or only weakly related to the target relation [25]. Since the semantic importance of a path may further vary across different local structural environments, it remains challenging to identify informative reasoning paths and appropriately associate them with their surrounding context for query-specific reasoning.
To address these challenges, we propose PEARL, an IKGC framework based on Path-Entity Aligned Relational Learning. PEARL first constructs union-based contextual subgraphs to capture richer structural evidence. To alleviate the accompanying noise, a dual-view subgraph contrastive objective is introduced to preserve invariant structural semantics. Meanwhile, an LLM-guided path retrieval module ranks candidate paths and retains the most informative logical evidence. Finally, PEARL explicitly aligns paths with contextual entity nodes and the global subgraph representation through a Bipartite Graph Neural Network (BGNN), enabling context-conditioned path reasoning. Consequently, identical relational paths can be interpreted differently under different structural environments, leading to more robust inductive reasoning.
Our main contributions are summarized as follows:
-
We propose PEARL, a unified framework for inductive knowledge graph completion that jointly models contextual subgraphs and relational paths to improve reasoning over unseen entities.
-
We develop an LLM-guided path retrieval and path-entity alignment strategy, together with contextual subgraph contrastive learning, to identify informative relational evidence and learn robust context-aware representations.
-
Extensive experiments on WN18RR, FB15k-237, and NELL-995 demonstrate that PEARL achieves strong overall performance and the best average Hits@10 across all three benchmarks.
2.1 Rule-based Methods
Rule-based methods are naturally suitable for inductive reasoning because they focus on learning logical patterns that are independent of specific entities. NeuralLP [14] introduces an end-to-end differentiable framework that learns logical rules through differentiable reasoning operators. DRUM [13] further improves expressiveness by introducing virtual relations and supporting rules of varying lengths through parameter sharing. Compared with traditional rule mining approaches such as AMIE [27] and RuleN [28], differentiable rule learning methods provide better scalability and end-to-end optimization. Although rule-based methods offer strong interpretability and generalization to unseen entities, they often struggle to capture complex structural semantics and higher-order interactions within local graph neighborhoods.
2.2 Subgraph-based Methods
Subgraph-based methods perform reasoning by extracting and encoding local graph structures surrounding the query entities. GraIL [26] first introduced enclosing subgraph extraction for inductive link prediction, demonstrating the effectiveness of local structural patterns for reasoning over unseen entities. CoMPILE [17] further enhances subgraph representations through relation-aware message passing, while TACT [16] incorporates topological relation patterns to capture richer structural semantics.
To improve subgraph quality, LCILP [29] employs a Personalized PageRank (PPR)-based clustering strategy to mitigate hub-node noise and extract more informative local neighborhoods. MINES [30] introduces message intercommunication mechanisms over neighbor-enhanced subgraphs to strengthen information propagation. More recent methods such as RMPI [18] and S DN [15] further improve inductive reasoning through relational message passing and multi-view subgraph modeling, enabling more effective exploitation of structural semantics.
2.3 Subgraph & Path-based Methods
Beyond local subgraph structures, explicit relational paths provide complementary multi-hop evidence by capturing the relation sequences that connect query entities [31,32]. NBFNet [12] formulates relational reasoning as a generalized Bellman–Ford process and learns to aggregate path evidence through neural message passing, achieving strong performance on both transductive and inductive link prediction tasks. SNRI [19] incorporates neighboring relational information into subgraph representations to better capture the semantics of unseen entities. RPC-IR [20] further enhances relational path representations through contrastive learning and first-order rule induction, improving the quality of logical reasoning evidence. More recently, CATS [21] introduces a context-aware framework that leverages large language models (LLMs) to assess query triples using latent type constraints, relational paths, and neighboring facts extracted from local subgraphs.

Figure 1: Overall framework of PEARL. (A) Given a query triple, PEARL first extracts a contextual subgraph from the knowledge graph. The proposed LLM-based Path Retrieval and Alignment (LPRA) module then retrieves informative relational paths and constructs the path–entity bipartite graph. The contextual subgraph is subsequently encoded by the Contextual Subgraph Neural Network (CSNN) to obtain contextual entity representations and a global subgraph representation. Subgraph Contrastive Learning (SCL) further regularizes the CSNN representations by enforcing consistency between two augmented contextual subgraph views. The resulting contextual representations are incorporated into the path–entity bipartite graph, where the Bipartite Graph Neural Network (BGNN) performs context-aware interactions between relational paths and structural information. Finally, the Relation-Aware Path Attention Fusion (RAPF) module aggregates the refined path representations for prediction. (B) Detailed illustration of the proposed LPRA module. (C) Detailed illustration of the proposed RAPF module.
3 Preliminary
3.0.1 Knowledge graph
A knowledge graph is a tuple , where and are finite sets of entities and relation types, respectively, and is the set of observed triples. Each triple represents a directed edge of type from the head entity to the tail entity .
3.0.2 Contextual Subgraph
Subgraph-based IKGC [26] reasons over a local graph associated with each query triple . We instantiate this locality using undirected -hop neighborhoods. Edge directions are ignored only when computing graph distances. Let denote the shortest-path distance between and in the undirected view of . The -hop neighborhood of an entity is
Prior work often employs the enclosing subgraph ,
We employ the contextual subgraph obtained from the union of the query endpoints' neighborhoods:
Thus , and is the subgraph of induced by .
3.0.3 Link Prediction and Inductive Setting
KGC ranks candidate entities for a query of the form or . We learn a scoring function such that positive triples receive higher scores than corrupted triples. In the inductive setting considered here, the training and test entity sets are disjoint. The model must therefore rely on transferable structural and relational patterns rather than entity-specific identifiers [26].
4 Methodology
In this section, we present PEARL, as illustrated in Fig. 1, a unified framework for inductive link prediction that jointly models contextual structural evidence and multi-hop relational paths. PEARL constructs a richer query-specific context while preserving its core semantics. It then leverages the semantic reasoning capability of a large language model to identify relational paths that are semantically relevant to the target relation, thereby complementing purely structural signals.
PEARL consists of five main components. (i) The Contextual Subgraph Neural Network (CSNN) encodes the union-based contextual subgraph and produces both contextual entity representations and a global subgraph representation. (ii) The LLM-based Path Retrieval and Alignment (LPRA) module retrieves candidate paths from the contextual subgraph, ranks them according to their semantic relevance to the query relation, and constructs a path-entity bipartite graph by aligning the retained paths with their associated contextual entities and the global subgraph node. (iii) The Bipartite Graph Neural Network (BGNN) performs message passing over the path-entity bipartite graph to obtain refined path representations. (iv) The Relation-Aware Path Attention Fusion (RAPF) module adaptively aggregates the refined path representations according to the query relation. (v) The Subgraph Contrastive Learning (SCL) module promotes consistency between two augmented subgraphs to preserve query-relevant structural semantics and suppress noisy contextual perturbations.
4.1 Contextual Subgraph Neural Network (CSNN)
4.1.1 Entity Node Representation Initialization
For inductive reasoning, each entity node is represented by structural and relational features rather than a fixed entity identifier. Let be the double-radius node label:
where is the dimension of the concatenated distance encoding. The initial entity node representation is
Here, is a query-aware aggregation of the relation embeddings incident to :
(7)
Here, denotes the set of relation types incident to v, and is the initial trainable embedding of the query relation .
4.1.2 Relation-aware Message Passing
To capture higher-order structural patterns and relational semantics, the node and relation representations are updated iteratively. At layer , the update for node is
Here, or is the relation-specific neighborhood of , composes node and relation representations, and controls the contribution of the message from to . The matrix is relation specific, whereas updates relation embeddings shared across relation types.
4.1.3 Global Subgraph Embedding
Let denote the entity node embeddings obtained after layers of message passing, where is the embedding of node . Following CoMPILE [17], we further employ a Gated Recurrent Unit (GRU) [33] to refine the propagated node embeddings. The gating mechanism adaptively preserves informative structural features while suppressing redundant information accumulated during message passing. Specifically,
where denotes the final node embedding matrix and is the final embedding of node . The global embedding of the contextual subgraph is then obtained using an average readout function:
Table 1: Path Count Statistics on Various FB15k-237 Subsets.
| Version | Avg. Paths | >3 Paths (%) | >10 Paths (%) |
|---|---|---|---|
| V1 | 2.7 | 16.02 | 4.05 |
| V2 | 6.6 | 31.71 | 14.65 |
| V3 | 10.5 | 41.84 | 22.43 |
| V4 | 15.1 | 47.64 | 29.19 |
4.2 LLM-based Path Retrieval and Alignment (LPRA)
While the CSNN captures rich contextual structural information, simply extracting more paths from the contextual subgraph does not necessarily improve reasoning. Local subgraphs may contain multiple candidate paths with varying relevance to the query triple, and treating them equally can dilute informative evidence and introduce noisy reasoning signals.
To address this limitation, PEARL introduces an LLM-based Path Retrieval and Alignment (LPRA) module. LPRA leverages the semantic reasoning capability and relational knowledge of large language models to evaluate the semantic compatibility between each candidate path and the query triple. This provides semantic guidance beyond purely structural evidence. The most informative paths are then retained as reliable relational evidence for subsequent path modeling.
We first perform a breadth-first search on the contextual subgraph to extract a candidate path set . Each path is defined as a sequence of entities and relations connecting the head and tail entities:
where denotes the length of path .
Although these candidate paths provide diverse multi-hop relational evidence, many of them are redundant or only weakly related to the target relation [24, 25]. As shown in Table 1, the number of candidate paths grows substantially across different inductive settings of the FB15k-237 dataset [34]. While the average number of paths is only 2.7 in V1, it increases to 15.1 in V4, making it increasingly difficult to identify truly informative reasoning chains. Directly utilizing all candidate paths would not only introduce noisy reasoning signals but also increase the computational burden of downstream path modeling.
To improve the quality of path reasoning, we employ Qwen3-4B-Instruct [35] as an LLM-based path retriever [36, 37]. The detailed prompt design is provided in supplemental material A. Given the query triple and the candidate path set , the retriever evaluates the semantic support of each candidate path for the triple and assigns it an importance score:
where denotes the semantic importance score of path for query . We rank all candidate paths in descending order of their importance scores and denote the resulting index permutation as .
According to the ranking results, we retain the top- candidate paths . Each retained path is explicitly aligned with the contextual entity nodes appearing along it, thereby establishing path-entity correspondences.
Based on these paths, we construct a path-entity bipartite graph . Its node set is defined as , where denotes the contextual entity nodes, is the retained path set, and is a virtual node representing the global contextual subgraph.
The edge set is defined as
which contains two types of connections, namely path-entity (PE) edges and path-global (PG) edges. The path-entity edges connect each relational path with the contextual entities appearing on that path, while the path-global edges link every path to the global contextual node.
4.3 Bipartite Graph Neural Network (BGNN)
BGNN performs message passing over the path-entity bipartite graph to model interactions among relational paths, contextual entity nodes, and the global contextual node. Through iterative information propagation, each path representation is adaptively refined according to its surrounding structural context.
4.3.1 Path Embedding Initialization
For each retained path
we encode its relation sequence using a GRU encoder to capture sequential dependencies and directional semantics:
4.3.2 Node Initialization
The initial embeddings of the nodes in are defined as
where denotes the contextual entity embedding produced by CSNN, is the global contextual subgraph embedding, and is the initial embedding of path .
4.3.3 Message Passing with R-GAT
To preserve the distinct semantic roles of different interactions during information propagation, BGNN employs a multi-head Relational Graph Attention Network (R-GAT) [38].
Let denote the interaction-type set of the bipartite graph. Accordingly, the type-specific neighborhood of node i is defined as
The interaction type of each edge is determined by the node categories:
For each edge with interaction type , we first compute the attention score to measure the importance of node j to node i under the specific interaction type:
where denotes the type-specific transformed representation, and is a learnable attention vector.
The attention scores are normalized over all neighbors of node i to obtain the attention coefficients:
Using the obtained attention coefficients, the embedding of node i is updated through multi-type message aggregation:
where denotes the number of attention heads, and is the transformation matrix associated with interaction type . After R-GAT layers, the refined embedding of each retained relational path is obtained as
Through type-aware attention propagation over the path-entity bipartite graph, each path embedding selectively aggregates local contextual entity information and global subgraph semantics, enabling identical relational paths to be interpreted differently under different structural environments.
4.4 Relation-Aware Path Attention Fusion (RAPF)
The refined path embeddings produced by BGNN encode diverse multi-hop relational semantics between the query entities. To identify the most informative logical evidence for the query relation , we employ a Scaled Dot-Product Attention mechanism to aggregate these paths into a relation-aware path representation .
Specifically, the final query-relation embedding is used as the query, while the refined path embeddings serve as keys and values. The projected query, key, and value vectors are
where . The matrices , , and are learnable projections.
The attention weight assigned to each path is computed as follows:
Finally, the aggregated path embedding is obtained as:
4.5 Subgraph Contrastive Learning (SCL)
Existing inductive reasoning methods typically construct enclosing subgraphs based on the intersection of the k-hop entity neighborhoods of the query entities, which preserves reliable shared structural information but may overlook complementary contextual semantics. In contrast, the proposed contextual subgraph incorporates nodes from the union of the two entity neighborhoods, enabling richer structural representation and broader contextual coverage. However, directly introducing all contextual entity nodes may also bring irrelevant or noisy structural signals, potentially weakening the core semantics associated with the query triple.
To balance structural enrichment and semantic consistency, PEARL adopts a dual-view subgraph augmentation contrastive learning strategy [39]. Specifically, we partition the entity node set into core nodes and contextual nodes:
preserves the shared structural semantics of the query entities, while contains complementary contextual information.
Two stochastic subgraph views are then constructed by independently sampling from without replacement. Specifically, for each view , we randomly draw exactly nodes from to form , with each subset being sampled uniformly among all possible subsets of that size. The entity node sets of the two subgraph views are then defined as
and each view is the subgraph of induced by .
Since the two augmented subgraphs share the same core structure but differ in the sampled contextual nodes, the model is encouraged to learn embeddings that are invariant to contextual perturbations. For a mini-batch of query triples, the two augmented subgraphs are encoded by the same CSNN with shared parameters, producing and , for the -th query. We optimize the subgraph contrastive loss using the following one-directional InfoNCE objective [40]:
where denotes cosine similarity and is the temperature parameter. For the anchor embedding , its counterpart forms the positive sample, while are treated as in-batch negative samples.
By maximizing consistency across two augmented subgraphs, the proposed contrastive objective encourages PEARL to focus on stable and query-relevant structural semantics while suppressing the influence of unstable contextual noise.
4.6 Training and Optimization
4.6.1 Joint Scoring Function
To predict the plausibility of a query triple , we first integrate the contextual subgraph embedding and the aggregated path embedding into a unified structural-semantic vector:
The final prediction score is computed based on the query entities, the query relation, and the fused structural-path representation:
where denotes vector concatenation, and are the embeddings from CSNN, and and are learnable scoring parameters.
4.6.2 Objective Function
To train PEARL, for each positive triple , we construct a negative triple by corrupting either the head or the tail:
The prediction objective is optimized using a margin-based ranking loss:
where and denotes the margin.
To further improve the robustness and semantic consistency of contextual subgraph representations, we additionally incorporate the proposed subgraph contrastive loss . The overall training objective is defined as:
where control the relative contributions of the two objectives.
Table 2: Performance comparison on WN18RR, FB15k-237, and NELL-995 under the V1 and V3 inductive settings (%). results are reported as mean ± standard deviation. Best results are in bold; second-best are underlined.
| Methods | WN18RR | FB15k-237 | NELL-995 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| V1 | V3 | V1 | V3 | V1 | V3 | |||||||
| Hits@10 | MRR | Hits@10 | MRR | Hits@10 | MRR | Hits@10 | MRR | Hits@10 | MRR | Hits@10 | MRR | |
| Rule-based Methods: | ||||||||||||
| DRUM [13] | 75.36 ± 0.0013 | 48.67 ± 0.0006 | 47.19 ± 0.0007 | 30.73 ± 0.0014 | 52.05 ± 0.0025 | 33.29 ± 0.0022 | 48.56 ± 0.0020 | 31.63 ± 0.0014 | 40.80 ± 0.0024 | 40.76 ± 0.0003 | 50.53 ± 0.0018 | 31.41 ± 0.0017 |
| NeuralLP [14] | 75.76 ± 0.0000 | 45.83 ± 0.0019 | 46.90 ± 0.0011 | 30.28 ± 0.0007 | 49.56 ± 0.0024 | 25.31 ± 0.0028 | 48.05 ± 0.0017 | 29.60 ± 0.0014 | 40.50 ± 0.0000 | 40.60 ± 0.0001 | 49.94 ± 0.0040 | 29.45 ± 0.0024 |
| Subgraph-based Methods: | ||||||||||||
| GraIL [26] | 82.04 ± 0.0035 | 74.69 ± 0.0116 | 59.72 ± 0.0027 | 54.24 ± 0.0042 | 62.92 ± 0.0086 | 45.69 ± 0.0053 | 80.66 ± 0.0025 | 59.62 ± 0.0028 | 54.80 ± 0.0057 | 43.86 ± 0.0113 | 87.00 ± 0.0051 | 74.24 ± 0.0057 |
| CoMPILE [17] | 83.24 ± 0.0033 | 76.95 ± 0.0118 | 59.75 ± 0.0037 | 54.44 ± 0.0036 | 64.73 ± 0.0085 | 48.01 ± 0.0050 | 83.91 ± 0.0036 | 63.81 ± 0.0041 | 55.50 ± 0.0054 | 48.85 ± 0.0056 | 94.43 ± 0.0043 | 79.44 ± 0.0053 |
| TACT [16] | 82.45 ± 0.0041 | 75.45 ± 0.0115 | 58.60 ± 0.0005 | 54.29 ± 0.0026 | 63.17 ± 0.0045 | 48.55 ± 0.0065 | 82.29 ± 0.0031 | 62.81 ± 0.0040 | 53.50 ± 0.0040 | 45.27 ± 0.0020 | 93.82 ± 0.0028 | 69.74 ± 0.0043 |
| RMPI [18] | 82.45 ± 0.0031 | 65.66 ± 0.0111 | 58.84 ± 0.0058 | 53.84 ± 0.0052 | 66.10 ± 0.0029 | 47.55 ± 0.0057 | 83.06 ± 0.0040 | 63.37 ± 0.0029 | 59.00 ± 0.0080 | 48.87 ± 0.0059 | 92.89 ± 0.0008 | 78.89 ± 0.0042 |
| LCILP [29] | 88.29 ± 0.0024 | 77.69 ± 0.0052 | 67.27 ± 0.0023 | 61.11 ± 0.0030 | 59.26 ± 0.0021 | 45.84 ± 0.0055 | 82.77 ± 0.0014 | 56.65 ± 0.0013 | 52.00 ± 0.0090 | 46.57 ± 0.0024 | 87.20 ± 0.0033 | 69.38 ± 0.0060 |
| S²DN [15] | 86.43 ± 0.0089 | 78.62 ± 0.0119 | 69.01 ± 0.0080 | 54.82 ± 0.0050 | 64.39 ± 0.0118 | 48.59 ± 0.0029 | 82.94 ± 0.0033 | 59.21 ± 0.0052 | 61.00 ± 0.0082 | 49.69 ± 0.0135 | 91.71 ± 0.0040 | 71.83 ± 0.0034 |
| MINES [30] | 88.45 ± 0.0085 | 75.51 ± 0.0095 | 62.46 ± 0.0043 | 55.44 ± 0.0030 | 61.51 ± 0.0065 | 46.60 ± 0.0086 | 80.31 ± 0.0072 | 58.51 ± 0.0077 | 59.40 ± 0.0027 | 49.77 ± 0.0076 | 92.37 ± 0.0036 | 64.20 ± 0.0040 |
| Subgraph & Path-based Methods: | ||||||||||||
| NBFNet [12] | 83.24 ± 0.0034 | 69.50 ± 0.0032 | 54.46 ± 0.0132 | 43.40 ± 0.0084 | 50.63 ± 0.0158 | 30.49 ± 0.0100 | 61.44 ± 0.0016 | 35.27 ± 0.0037 | 57.70 ± 0.0075 | 50.25 ± 0.0163 | 49.15 ± 0.0040 | 28.28 ± 0.0186 |
| CATS [21] | 78.45 ± 0.0054 | 19.38 ± 0.0115 | 56.77 ± 0.0059 | 35.24 ± 0.0053 | 54.14 ± 0.0109 | 32.96 ± 0.0074 | 59.53 ± 0.0053 | 34.03 ± 0.0040 | 66.10 ± 0.0068 | 50.27 ± 0.0031 | 94.19 ± 0.0052 | 73.43 ± 0.0039 |
| SNRI [19] | 85.84 ± 0.0060 | 75.41 ± 0.0043 | 57.68 ± 0.0027 | 46.92 ± 0.0028 | 63.90 ± 0.0124 | 44.76 ± 0.0082 | 82.65 ± 0.0034 | 59.99 ± 0.0045 | 55.50 ± 0.0108 | 42.72 ± 0.0045 | 93.56 ± 0.0028 | 72.23 ± 0.0049 |
| RPC-IR [20] | 78.73 ± 0.0069 | 69.18 ± 0.0060 | 64.64 ± 0.0048 | 55.08 ± 0.0044 | 62.53 ± 0.0085 | 41.67 ± 0.0050 | 80.80 ± 0.0067 | 56.60 ± 0.0036 | 60.80 ± 0.0120 | 46.33 ± 0.0142 | 84.61 ± 0.0075 | 71.94 ± 0.0019 |
| PEARL | 93.48 ± 0.0048 | 80.36 ± 0.0029 | 81.25 ± 0.0022 | 66.82 ± 0.0026 | 72.63 ± 0.0060 | 50.55 ± 0.0115 | 86.31 ± 0.0042 | 66.37 ± 0.0030 | 63.00 ± 0.0073 | 50.77 ± 0.0188 | 96.89 ± 0.0095 | 75.83 ± 0.0077 |
5 Experiments
5.1 Datasets and Evaluation
We evaluate PEARL on three widely used IKGC datasets: WN18RR [41], FB15k-237 [34], and NELL-995 [42]. Following GraIL [26], each dataset is divided into four inductive subsets (V1–V4) with increasing scales, where the training and test graphs contain disjoint entity sets and are constructed under a shared global relation vocabulary.
For evaluation, we adopt the standard filtered ranking protocol and report Hits@1, Hits@10, and Mean Reciprocal Rank (MRR), where higher values indicate better performance. All results are averaged over five independent runs. Detailed dataset statistics and evaluation settings are provided in supplemental material B.
5.2 Baselines
To evaluate the effectiveness of PEARL, we compare it with representative IKGC methods from three categories:
-
Rule-based Methods: NeuralLP [14], DRUM [13].
-
Subgraph-based Methods: GraIL [26], CoMPILE [17], TACT [16], RMPI [18], LCILP [29], S²DN [15], and MINES [30].
-
Subgraph & Path-based Methods: NBFNet [12], SNRI [19], RPC-IR [20], and CATS [21].
Detailed descriptions of all baseline models are provided in supplemental material C.
5.3 Implementation Details
The number of message-passing layers is set to for CSNN and for BGNN. The maximum relational path length is set to , and the R-GAT employs attention heads. The hidden dimension is fixed to 32 for all node, relation, and path embeddings. All experiments are implemented in PyTorch and conducted on a single NVIDIA RTX 4090 GPU. The remaining hyperparameters, including the number of retained paths , learning rate, batch size, loss coefficients, and the subgraph size , are selected according to validation performance. Detailed configurations and search ranges are provided in supplemental material E. The source code and implementation details are publicly available at https://github.com/yychi-code/PEARL.
5.4 Results and Analysis
The experimental results on WN18RR, FB15k-237, and NELL-995 are summarized in Table 2. Overall, PEARL achieves the strongest average performance across the evaluated settings. Compared with the strongest competing methods, PEARL achieves relative improvements of 8.67%, 6.01%, and 3.20% in average Hits@10 over the strongest competing methods on WN18RR, FB15k-237, and NELL-995, respectively, demonstrating its strong generalization ability for inductive knowledge graph completion.
Several observations can be drawn from the experimental results. Rule-based methods, including NeuralLP and DRUM, generally achieve relatively lower performance, suggesting that logical rule induction alone may not fully capture the rich structural dependencies surrounding unseen entities. Subgraph-based approaches consistently achieve stronger performance by explicitly exploiting neighborhood structures. GraIL establishes an effective inductive reasoning framework based on enclosing subgraphs. Subsequent methods further enhance subgraph representations from different perspectives. Specifically, CoMPILE improves message passing, TACT models topological relation patterns, SNRI incorporates semantic neighboring relations, RMPI develops relational message passing, LCILP adopts PPR-based local clustering, MINES introduces message intercommunication, and S DN employs dual-view structural learning. NBFNet formulates multi-hop reasoning as differentiable path aggregation and achieves competitive performance across several datasets. More recently, CATS incorporates LLMs to leverage latent type constraints, neighboring facts, and relational paths, demonstrating the potential of LLM-assisted inductive reasoning. Nevertheless, these methods either primarily focus on structural representations or utilize relational paths without explicitly modeling their interactions with the surrounding contextual subgraph. Although RPC-IR further improves path representations through contrastive learning, it primarily focuses on relational paths and does not explicitly model their interactions with the surrounding structural context.
In contrast, PEARL jointly models contextual subgraphs and relational paths within a unified framework. The LLM-guided path retrieval module identifies informative reasoning paths, while BGNN enables context-aware interactions between paths and structural embeddings. Combined with contextual subgraph modeling and subgraph contrastive learning, PEARL effectively exploits both structural and logical evidence, resulting in strong and generally consistent performance across the benchmark datasets.
5.5 Efficiency Analysis
We further evaluate the computational efficiency of PEARL from both the training and inference perspectives. We select several competitive methods with strong performance on the FB15k-237 V1 and V3 datasets for efficiency comparison. To ensure a fair comparison, all models are evaluated under the same hardware environment and evaluation protocol. Training is performed on a single NVIDIA RTX 4090 GPU. For inference evaluation, preprocessing and downstream model inference are measured separately, with the latter conducted on a CPU.
For training efficiency, we track the validation performance throughout the training process. Specifically, we record the validation area under the precision-recall curve (AUC-PR) with respect to the accumulated training time. Fig. 2 presents the AUC-PR curves on the FB15k-237 V1 and V3 datasets. On both datasets, PEARL exhibits rapid performance improvement during the early stages of training and consistently achieves higher validation AUC-PR than competing methods under comparable training time budgets. Moreover, PEARL converges faster than most baselines and ultimately attains the highest validation performance. These results indicate that the proposed contextual subgraph modeling and path-aware reasoning framework supports both accurate prediction and effective optimization. In addition, Table 3 reports the peak GPU memory consumption during training. PEARL requires the lowest GPU memory on FB15k-237 V1 and remains comparable to the most memory-efficient baseline on V3, demonstrating favorable memory efficiency. This efficiency is partly attributed to the LLM-guided path retrieval strategy, which reduces unnecessary path-level computations in subsequent reasoning.
For inference efficiency, Table 3 separately reports the preprocessing time and downstream inference time per query triple, together with the corresponding Hits@10 performance on FB15k-237 V1 and V3. The preprocessing time, reported as subgraph extraction time in the table, includes both contextual subgraph construction and LLM-guided path retrieval. The resulting contextual subgraph and retained relational paths are then directly used for subsequent neural inference. Although LLM-guided retrieval introduces additional preprocessing overhead, it removes redundant candidate paths and retains only informative reasoning chains,
A.

B.
Figure 2: Validation AUC-PR curves of PEARL and several competitive methods on FB15k-237 datasets. (A) Training convergence curves on FB15k-237 V1; (B) training convergence curves on FB15k-237 V3.
Table 3: The computational costs and prediction performance of several models on the FB15k-237 V1 and V3 datasets.
| Model | Peak GPU Memory (GB) | Inference Time (ms) | Subgraph Extraction Time (ms) | Hits@10 | ||||
|---|---|---|---|---|---|---|---|---|
| V1 | V3 | V1 | V3 | V1 | V3 | V1 | V3 | |
| CoMPILE | 1.33 | 5.57 | 23 | 104 | 90 | 120 | 64.73 | 83.91 |
| SNRI | 2.50 | 13.47 | 80 | 192 | 52 | 53 | 63.90 | 82.65 |
| RMPI | 3.83 | 15.33 | 64 | 70 | 111 | 144 | 66.10 | 83.06 |
| TACT | 2.86 | 23.03 | 65 | 72 | 50 | 61 | 63.17 | 82.29 |
| S²DN | 2.03 | 9.49 | 250 | 570 | 59 | 84 | 64.39 | 82.94 |
| PEARL | 1.14 | 5.59 | 46 | 73 | 105 | 140 | 72.63 | 86.31 |
thereby reducing the complexity of downstream path modeling. As a result, PEARL maintains competitive downstream inference efficiency while achieving the best Hits@10 performance on both inductive settings.

Figure 3: Comparison between enclosing subgraphs and contextual subgraphs on WN18RR, FB15k-237, and NELL-995, together with their corresponding numbers of nodes. The red and green nodes denote the head and tail entities of the query triple, respectively. Blue nodes represent the entities belonging to the intersection of the k-hop neighborhoods of the query entities, while purple nodes denote the additional contextual entities introduced from the neighborhood union.

Figure 4: Ablation study of PEARL on WN18RR, FB15k-237, and NELL-995. Error bars represent scaled standard deviations. (A) Ablation on subgraph modeling, evaluating the effectiveness of contextual subgraph construction and subgraph contrastive learning. (B) Ablation on path-aware reasoning, including variants without relational path information, LLM-guided path retrieval, or the BGNN-based path-entity-global interaction mechanism.
5.6 Ablation Studies
To comprehensively evaluate the contribution of each major design in PEARL, we conduct ablation studies from two complementary perspectives: (1) subgraph modeling and (2) path-aware reasoning. The corresponding results are summarized in Fig. 4.
5.6.1 Ablation on Subgraph Modeling
To evaluate the effectiveness of contextual subgraph modeling and subgraph contrastive learning, we compare the following variants:
Table 4: Case study of LLM-guided relational path ranking.
| Query Triple | Candidate Relation Path | Importance Score | Rank |
|---|---|---|---|
| (Conan O'Brien, gender, Male) | Profession link → gender | 0.95 | 1 |
| Marriage link → gender | 0.90 | 2 | |
| Friendship link → gender | 0.85 | 3 | |
| Religion link → film → gender | 0.80 | 4 | |
| Influenced by → gender | 0.75 | 5 | |
| (Beasts of the Southern Wild, film release region, Japan) | film release region → location contains → film release region | 0.95 | 1 |
| Netflix genre titles → film release region | 0.60 | 2 | |
| Film release region (Continent) → location adjoins → film release region | 0.55 | 3 |
A. (The Artist, award_won, Academy Award for Best Picture):

B. (Deadwood, award_won, Primetime Emmy Award):

Figure 5: Visualization of path attention weights for two query triples sharing the same target relation (award_won) on FB15k-237.
-
PEARL w/o CS: This variant replaces the contextual subgraph with the conventional enclosing subgraph and removes the subgraph contrastive learning objective.
-
PEARL w/o SCL: This variant retains the contextual subgraph but removes the subgraph contrastive learning objective.
As shown in Fig. 4(A), PEARL consistently outperforms both variants across all datasets. The performance gap between PEARL w/o CS and PEARL w/o SCL shows that introducing the contextual subgraph provides additional structural evidence beyond the conventional enclosing subgraph. Fig. 3 further illustrates their structural differences on WN18RR, FB15k-237, and NELL-995. Specifically, the contextual subgraph preserves the shared neighborhoods of the query entities while incorporating additional entities from the union of their k-hop neighborhoods, thereby providing broader structural context. Meanwhile, the further improvement of PEARL over PEARL w/o SCL demonstrates the benefit of subgraph contrastive learning in mitigating the noisy contextual information introduced by subgraph expansion. Additional visualization and quantitative analyses of the learned representations are provided in supplemental material D.
5.6.2 Ablation on Path-aware Reasoning
To further investigate the contribution of relational path reasoning, we compare the following variants:
-
PEARL w/o Path: This variant removes relational path information and performs prediction using only the contextual subgraph representation.
-
PEARL w/o LLM: This variant removes the LLM-guided path retrieval module and randomly selects M paths from the extracted candidate paths for subsequent reasoning.
-
PEARL w/o BGNN: This variant removes the BGNN module and directly uses the initial embeddings of the retrieved paths for prediction.
As shown in Fig. 4(B), removing relational path information consistently degrades performance, confirming that multi-hop paths provide complementary reasoning evidence beyond contextual subgraphs. Replacing LLM-guided path retrieval with random selection of candidate paths also leads to lower performance and larger standard deviations, indicating that semantic path retrieval helps identify more informative reasoning evidence and improves robustness compared with unguided path selection. Among the three variants, removing BGNN results in the largest performance degradation, highlighting the importance of explicitly modeling interactions between relational paths and contextual structural information. Overall, these results demonstrate that path information, LLM-guided retrieval, and path-entity interaction play complementary roles in the proposed path-aware reasoning framework.
5.7 Case Study
5.7.1 LLM-guided Path Retrieval
To assess the effectiveness of the proposed LLM-guided path retrieval module, we analyze representative query triples together with their candidate relational paths. The examples presented in Table 4 illustrate how the LLM estimates the semantic relevance of candidate paths by assigning importance scores with respect to the query triple.
For the query triple ( Conan O'Brien, gender, Male), the highest importance scores are assigned to paths involving Profession link, Marriage link, and Friendship link, since these relations provide direct semantic evidence for inferring the entity's gender. In contrast, paths related to Religion and Influenced by receive considerably lower scores due to their weaker semantic relevance.
A similar trend can be observed for the query triple (Beasts of the Southern Wild, film release region, Japan). The path Film release region → location contains → film release region obtains the highest importance score because it directly captures the geographical containment relation required for predicting the release region. By comparison, the remaining candidate paths provide only indirect or less relevant evidence, resulting in substantially lower importance scores.
These examples indicate that the LLM effectively distinguishes informative reasoning paths from semantically weak candidates. Consequently, the subsequent BGNN operates on a more reliable set of relational paths, reducing the influence of noisy reasoning signals while preserving the most discriminative logical evidence.
5.7.2 Relation-Aware Path Attention Analysis
To further investigate how structural context influences the interpretation of relational paths, we analyze two query triples on FB15k-237. They share the same target relation but involve different entity pairs: (The Artist, award_won, Academy Award for Best Picture) and (Deadwood, award_won, Primetime Emmy Award). Since both queries share the same relation, the RAPF query vector remains identical, allowing us to isolate the influence of contextual subgraph structures on path importance.
As illustrated in Fig. 5, the two queries exhibit noticeably different attention distributions over candidate relational paths. For The Artist, the path award_won → netflix_genre → award_won receives the highest attention weight, suggesting that genre-related evidence plays the dominant role in this structural context. In contrast, the two paths involving award_nomination receive relatively lower attention.
For Deadwood, however, the attention distribution changes substantially. The paths containing award_nomination become the dominant reasoning evidence, indicating that nomination-related information is more informative under this local structural context than genre similarity.
These observations demonstrate that the semantic contribution of a relational path is jointly determined by its relation sequence and the surrounding contextual subgraph. Even for the same triple relation, PEARL adaptively emphasizes different reasoning paths according to the local structural environment, thereby enabling context-conditioned path interpretation rather than context-invariant path reasoning. Moreover, the consistent effectiveness of PEARL across relations with different occurrence frequencies further verifies its robustness in exploiting relational evidence under diverse knowledge graph structures. Additional results are provided in supplemental material F.
6 Conclusion
This paper investigates inductive knowledge graph completion from the perspective of context-aware relational reasoning and proposes PEARL, a framework that jointly models contextual subgraphs and relational paths for inductive reasoning over unseen entities. Extensive experiments on WN18RR, FB15k-237, and NELL-995 demonstrate that PEARL achieves strong overall performance against competitive baselines. This confirms that jointly exploiting structural context and relational paths provides an effective paradigm for inductive knowledge graph completion. In particular, the LLM-guided retrieval mechanism enables PEARL to identify relation-relevant paths from noisy local structures, while the subsequent path-entity interaction further adapts their semantics to the query-specific context. This design provides a unified framework for integrating LLM-derived semantic guidance with context-aware graph reasoning. Nevertheless, the current framework relies on offline LLM-based path retrieval and has not yet been evaluated on dynamic or temporal knowledge graphs. Future work will focus on more efficient adaptive path retrieval and extending PEARL to continual and temporal inductive reasoning scenarios.
References
[1] H. Wang, M. Zhao, X. Xie, W. Li, and M. Guo, "Knowledge graph convolutional networks for recommender systems," in The world wide web conference, 2019, pp. 3307–3313.
[2] X. Wang, T. Huang, D. Wang, Y. Yuan, Z. Liu, X. He, and T.-S. Chua, "Learning intents behind interactions with knowledge graph for recommendation," in Proceedings of the web conference 2021, 2021, pp. 878–887.
[3] S. Vashishth, S. Sanyal, V. Nitin, and P. Talukdar, "Composition-based multi-relational graph convolutional networks," arXiv preprint arXiv:1911.03082, 2019.
[4] Y. Zhang, H. Dai, Z. Kozareva, A. Smola, and L. Song, "Variational reasoning for question answering with knowledge graph," in Proceedings of the AAAI conference on artificial intelligence, vol. 32, no. 1, 2018.
[5] Y. Li, "Research and analysis of semantic search technology based on knowledge graph," in 2017 IEEE International Conference on Computational Science and Engineering (CSE) and IEEE International Conference on Embedded and Ubiquitous Computing (EUC), vol. 1. IEEE, 2017, pp. 887–890.
[6] L. Thingbaijam, K. Palle, P. V. Prasad, B. Mallala, S. Patil et al., "Incorporating knowledge graphs in semantic search," in 2024 15th International Conference on Computing Communication and Networking Technologies (ICCCNT). IEEE, 2024, pp. 1–6.
[7] B. Shi and T. Weninger, "Open-world knowledge graph completion," in Proceedings of the AAAI conference on artificial intelligence, vol. 32, no. 1, 2018.
[8] J. Baek, D. B. Lee, and S. J. Hwang, "Learning to extrapolate knowledge: Transductive few-shot out-of-graph link prediction," Advances in neural information processing systems, vol. 33, pp. 546–560, 2020.
[9] D. Xu, C. Ruan, E. Korpeoglu, S. Kumar, and K. Achan, "Product knowledge graph embedding for e-commerce," in Proceedings of the 13th international conference on web search and data mining, 2020, pp. 672–680.
[10] Y. Zhang, Z. Zhou, Q. Yao, X. Chu, and B. Han, "Adaprop: Learning adaptive propagation for graph neural network based knowledge graph reasoning," in Proceedings of the 29th ACM SIGKDD conference on knowledge discovery and data mining, 2023, pp. 3446–3457.
[11] J. Lee, C. Chung, and J. J. Whang, "Ingram: Inductive knowledge graph embedding via relation graphs," in International conference on machine learning. PMLR, 2023, pp. 18 796–18 809.
[12] Z. Zhu, Z. Zhang, L.-P. Xhonneux, and J. Tang, "Neural bellman-ford networks: A general graph neural network framework for link prediction," Advances in neural information processing systems, vol. 34, pp. 29 476–29 490, 2021.
[13] A. Sadeghian, M. Armandpour, P. Ding, and D. Z. Wang, "Drum: End-to-end differentiable rule mining on knowledge graphs," Advances in neural information processing systems, vol. 32, 2019.
[14] F. Yang, Z. Yang, and W. W. Cohen, "Differentiable learning of logical rules for knowledge base reasoning," Advances in neural information processing systems, vol. 30, 2017.
[15] T. Ma, Y. Chen, L. Wang, X. Lin, B. Song, and X. Zeng, "S²dn: Learning to denoise unconvincing knowledge for inductive knowledge graph completion," in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 39, no. 12, 2025, pp. 12 355–12 363.
[16] J. Chen, H. He, F. Wu, and J. Wang, "Topology-aware correlations between relations for inductive link prediction in knowledge graphs," in Proceedings of the AAAI conference on artificial intelligence, vol. 35, no. 7, 2021, pp. 6271–6278.
[17] S. Mai, S. Zheng, Y. Yang, and H. Hu, “Communicative message passing for inductive relation reasoning,” in Proceedings of the AAAI conference on artificial intelligence, vol. 35, no. 5, 2021, pp. 4294–4302.
[18] Y. Geng, J. Chen, J. Z. Pan, M. Chen, S. Jiang, W. Zhang, and H. Chen, “Relational message passing for fully inductive knowledge graph completion,” in 2023 IEEE 39th international conference on data engineering (ICDE). IEEE, 2023, pp. 1221–1233.
[19] X. Xu, P. Zhang, Y. He, C. Chao, and C. Yan, “Subgraph neighboring relations infomax for inductive link prediction on knowledge graphs,” in Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, IJCAI-22, L. D. Raedt, Ed. International Joint Conferences on Artificial Intelligence Organization, 7 2022, pp. 2341–2347, main Track. [Online]. Available: https://doi.org/10.24963/ijcai.2022/325
[20] Y. Pan, J. Liu, L. Zhang, T. Zhao, Q. Lin, X. Hu, and Q. Wang, “Inductive relation prediction with logical reasoning using contrastive representations,” in Proceedings of the 2022 conference on empirical methods in natural language processing, 2022, pp. 4261–4274.
[21] M. Li, C. Yang, C. Xu, Z. Song, X. Jiang, J. Guo, H.-f. Leung, and I. King, “Context-aware inductive knowledge graph completion with latent type constraints and subgraph reasoning,” in Proceedings of the Thirty-Ninth AAAI Conference on Artificial Intelligence and Thirty-Seventh Conference on Innovative Applications of Artificial Intelligence and Fifteenth Symposium on Educational Advances in Artificial Intelligence. AAAI Press, 2025. [Online]. Available: https://doi.org/10.1609/aaai.v39i11.33318
[22] J. Pujara, E. Augustine, and L. Getoor, “Sparsity and noise: Where knowledge graph embeddings fall short,” in Proceedings of the 2017 conference on empirical methods in natural language processing, 2017, pp. 1751–1756.
[23] B. Xue and L. Zou, “Knowledge graph quality management: a comprehensive survey,” IEEE Transactions on Knowledge and Data Engineering, vol. 35, no. 5, pp. 4969–4988, 2022.
[24] Y. Liu, X. Lin, Y. Shang, Y. Li, S. Wang, and Y. Cao, “Pathmind: A retrieve-prioritize-reason framework for knowledge graph reasoning with large language models,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 40, no. 18, p. 15386–15393, Mar. 2026. [Online]. Available: https://ojs.aaai.org/index.php/AAAI/article/view/38565
[25] X. Tan, X. Wang, Q. Liu, X. Xu, X. Yuan, and W. Zhang, “Paths-over-graph: Knowledge graph empowered large language model reasoning,” in Proceedings of the ACM on Web Conference 2025, 2025, pp. 3505–3522.
[26] K. Teru, E. Denis, and W. Hamilton, “Inductive relation prediction by subgraph reasoning,” in International conference on machine learning. PMLR, 2020, pp. 9448–9457.
[27] L. A. Galárraga, C. Teflioudi, K. Hose, and F. Suchanek, “Amie: association rule mining under incomplete evidence in ontological knowledge bases,” in Proceedings of the 22nd international conference on World Wide Web, 2013, pp. 413–422.
[28] C. Meilicke, M. Fink, Y. Wang, D. Ruffinelli, R. Gemulla, and H. Stuckenschmidt, “Fine-grained evaluation of rule-and embedding-based systems for knowledge graph completion,” in International semantic web conference. Springer, 2018, pp. 3–20.
[29] H. A. Mohamed, D. Pilutti, S. James, A. Del Bue, M. Pelillo, and S. Vascon, “Locality-aware subgraphs for inductive link prediction in knowledge graphs,” Pattern Recognition Letters, vol. 167, pp. 90–97, 2023.
[30] K. Liang, L. Meng, S. Zhou, W. Tu, S. Wang, Y. Liu, M. Liu, L. Zhao, X. Dong, and X. Liu, “Mines: Message intercommunication for inductive relation reasoning over neighbor-enhanced subgraphs,” Proceedings of the AAAI Conference on Artificial Intelligence, vol. 38, no. 9, pp. 10645–10653, Mar. 2024. [Online]. Available: https://ojs.aaai.org/index.php/AAAI/article/view/28935
[31] G. Wang, R. Ying, J. Huang, and J. Leskovec, "Multi-hop attention graph neural networks," in Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI-21, Z.-H. Zhou, Ed. International Joint Conferences on Artificial Intelligence Organization, 8 2021, pp. 3089–3096, main Track. [Online]. Available: https://doi.org/10.24963/ijcai.2021/425
[32] Y. Yang, L. Li, J. Wu, and C. Qu, “Misapp: Multi-hop intent-aware session graph learning for next app prediction,” arXiv preprint arXiv:2603.21653, 2026.
[33] K. Cho, B. Van Merriënboer, Ç. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning phrase representations using rnn encoder-decoder for statistical machine translation,” in Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), 2014, pp. 1724–1734.
[34] K. Toutanova, D. Chen, P. Pantel, H. Poon, P. Choudhury, and M. Gamon, “Representing text for joint embedding of text and knowledge bases,” in Proceedings of the 2015 conference on empirical methods in natural language processing, 2015, pp. 1499–1509.
[35] A. Yang, A. Li, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Gao, C. Huang, C. Lv, C. Zheng, D. Liu, F. Zhou, F. Huang, F. Hu, H. Ge, H. Wei, H. Lin, J. Tang, J. Yang, J. Tu, J. Zhang, J. Yang, J. Yang, J. Zhou, J. Zhou, J. Lin, K. Dang, K. Bao, K. Yang, L. Yu, L. Deng, M. Li, M. Xue, M. Li, P. Zhang, P. Wang, Q. Zhu, R. Men, R. Gao, S. Liu, S. Luo, T. Li, T. Tang, W. Yin, X. Ren, X. Wang, X. Zhang, X. Ren, Y. Fan, Y. Su, Y. Zhang, Y. Zhang, Y. Wan, Y. Liu, Z. Wang, Z. Cui, Z. Zhang, Z. Zhou, and Z. Qiu, “Qwen3 technical report,” 2025. [Online]. Available: https://arxiv.org/abs/2505.09388
[36] W. Sun, L. Yan, X. Ma, S. Wang, P. Ren, Z. Chen, D. Yin, and Z. Ren, “Is chatgpt good at search?” investigating large language models as re-ranking agents,” in Proceedings of the 2023 conference on empirical methods in natural language processing, 2023, pp. 14918–14937.
[37] H. Liu, S. Wang, Y. Zhu, Y. Dong, and J. Li, “Knowledge graph-enhanced large language models via path selection,” in Findings of the Association for Computational Linguistics: ACL 2024, 2024, pp. 6311–6321.
[38] P. Veličković, G. Cucurull, A. Casanova, A. Romero, P. Liò, and Y. Bengio, “Graph Attention Networks,” International Conference on Learning Representations, 2018, accepted as poster. [Online]. Available: https://openreview.net/forum?id=rJXMpikCZ
[39] Y. You, T. Chen, Y. Sui, T. Chen, Z. Wang, and Y. Shen, “Graph contrastive learning with augmentations,” in Advances in Neural Information Processing Systems, H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, Eds., vol. 33. Curran Associates, Inc., 2020, pp. 5812–5823. [Online]. Available: https://proceedings.neurips.cc/paper/2020/file/3fe230348e9a12c13120749e3f9fa4cd-Paper.pdf
[40] Z. Wang, B. Xu, Y. Yuan, H. Shen, and X. Cheng, “Infonce is a free lunch for semantically guided graph contrastive learning,” in Proceedings of the 48th International ACM SIGIR Conference on Research and Development in Information Retrieval, ser. SIGIR '25. New York, NY, USA: Association for Computing Machinery, 2025, p. 719–728. [Online]. Available: https://doi.org/10.1145/3726302.3730007
[41] T. Dettmers, P. Minervini, P. Stenetorp, and S. Riedel, “Convolutional 2d knowledge graph embeddings,” in Proceedings of the AAAI conference on artificial intelligence, vol. 32, no. 1, 2018.
[42] W. Xiong, T. Hoang, and W. Y. Wang, “Deeppath: A reinforcement learning method for knowledge graph reasoning,” in Proceedings of the 2017 conference on empirical methods in natural language processing, 2017, pp. 564–573.
Supplemental Materials
A LLM-guided Path Retrieval Prompt
To improve the quality of relational path reasoning, PEARL employs Qwen3-4B-Instruct as a semantic path retriever. Given a query triple and a set of candidate relational paths extracted from the contextual subgraph, the LLM is instructed to evaluate the semantic relevance of each candidate path with respect to the query triple by assigning an importance score. The candidate paths are then ranked according to these scores, and the resulting ranking is used to prioritize informative reasoning evidence. Table 5 presents the prompt template used for path scoring and ranking.
Table 5: Prompt Template for LLM-guided Path Retrieval.
| Role | Content |
|---|---|
| System | You are an expert in knowledge graphs, specializing in relation reasoning and path ranking.Given a query triple and multiple candidate relational paths, assign an importance score in the range [0,1] to each candidate path according to how strongly it supports the query triple. A higher score indicates stronger semantic support.Return a valid JSON object containing the candidate path indices together with their corresponding importance scores, sorted in descending order of score.For example:{"path_ranking": [{"index":0,"score":0.97},{"index":3,"score":0.88},{"index":1,"score":0.73}] |
| The returned indices must correspond exactly to the provided candidate paths. Do not generate non-existent indices or additional paths. | |
| User | The input contains: (1) the query head entity h, (2) the query relation r, (3) the query tail entity t, and (4) a set of candidate relational paths represented as relation sequences from h to t. Evaluate the semantic relevance of each candidate path to the query triple by assigning an importance score, and rank all candidate paths from the strongest to the weakest supporting evidence. Only use the provided candidate paths. Do not invent new paths. Only JSON output is allowed. |
B Dataset and Evaluation Protocol
We evaluate PEARL on three widely used IKGC benchmarks: WN18RR, FB15k-237, and NELL-995. Following GraIL, each dataset is divided into four inductive subsets (V1–V4) of increasing scale. For each subset, the training and test graphs are constructed under a shared global relation vocabulary while containing disjoint entity sets. Table 6 reports the detailed statistics of all datasets, including the numbers of relations, entities, and triples in the training and test graphs.
We follow the standard inductive evaluation setting introduced by GraIL. During training, validation, and testing, reverse relations are added following prior work. To ensure efficient model selection, we evaluate checkpoints on the validation set using the Area Under the Precision–Recall Curve (AUC-PR). Specifically, positive triples and sampled negative triples are used to construct a binary classification task, and the checkpoint with the highest validation AUC-PR is selected for final testing. For the final evaluation, we adopt the filtered ranking protocol and report Hits@1, Hits@10, and Mean Reciprocal Rank (MRR). All reported results are averaged over five independent runs, and the corresponding standard deviations are reported.
Table 6: Inductive Benchmark Statistics. (REL: Relations, ENT: Entities, TR: Triples).
| Version | Split | WN18RR | FB15k-237 | NELL-995 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| REL | ENT | TR | REL | ENT | TR | REL | ENT | TR | ||
| V1 | train | 9 | 2,746 | 6,678 | 183 | 2,000 | 5,226 | 14 | 10,915 | 5,540 |
| test | 9 | 922 | 1,991 | 146 | 1,500 | 2,404 | 14 | 225 | 1,034 | |
| V2 | train | 10 | 6,954 | 18,968 | 203 | 3,000 | 12,085 | 88 | 2,564 | 10,109 |
| test | 10 | 2,923 | 4,863 | 176 | 2,000 | 5,092 | 79 | 4,937 | 5,521 | |
| V3 | train | 11 | 12,078 | 32,150 | 218 | 4,000 | 22,394 | 142 | 4,647 | 20,117 |
| test | 11 | 5,084 | 7,470 | 187 | 3,000 | 9,137 | 122 | 4,921 | 9,668 | |
| V4 | train | 9 | 3,861 | 9,842 | 222 | 5,000 | 33,916 | 77 | 2,092 | 9,289 |
| test | 9 | 7,208 | 15,157 | 204 | 3,500 | 14,554 | 61 | 3,294 | 8,520 | |
C Details of Baseline Methods
C.0.1 Rule-based Methods
-
NeuralLP: An end-to-end differentiable rule learning framework based on TensorLog that learns logical rules for multi-hop reasoning.
-
DRUM: An extension of differentiable rule learning that employs tensor products to learn logical rules of varying lengths while sharing parameters across path lengths.
C.0.2 Subgraph-based Methods
-
GraIL: A pioneering IKGC model that performs reasoning over enclosing subgraphs.
-
CoMPILE: A subgraph-based model that strengthens the message-passing mechanism by explicitly modeling the directional information of relations within the local structure.
-
TACT: A topology-aware inductive link prediction method that models correlations between relations within local subgraphs.
-
RMPI: A relational message passing framework for inductive link prediction that reasons over subgraphs surrounding target entity pairs.
-
LCILP: A locality-aware subgraph method that employs Personalized PageRank (PPR)-based local clustering to extract informative neighborhoods around target links.
-
S²DN: A dual-view subgraph neural network that balances core and auxiliary structural information.
-
MINES: A neighbor-enhanced subgraph reasoning framework with message intercommunication mechanisms.
C.0.3 Subgraph & Path-based Methods
-
NBFNet: A neural Bellman-Ford framework that generalizes path-based reasoning to subgraph-level inference via differentiable path aggregation over the enclosing subgraph.
-
SNRI: A subgraph neighbor representation learning method that captures semantic information of unseen entities through neighboring relations.
-
RPC-IR: A relational path contrastive learning framework that enhances path representations via contrastive objectives.
-
CATS¹: An LLM-based IKGC framework that performs reasoning based on latent type constraints, relational paths, and neighboring facts.
D Further Analysis of Contextual Subgraph Modeling
To further examine the impact of SCL, Fig. 6 visualizes the learned subgraph representations on FB15k-237. Without SCL, contextual subgraph embeddings show larger deviations from the core structural semantics captured by enclosing subgraphs. In contrast, PEARL with SCL achieves better alignment while maintaining richer contextual information, indicating that contrastive learning effectively reduces the influence of noisy contextual perturbations.
We additionally employ Positive Consistency and Separation to quantitatively evaluate representation quality. For a mini-batch of query triples, let and denote the contextual and enclosing subgraph embeddings of the -th query, respectively. Positive Consistency is defined as:
whereas Separation is computed as:
As shown in Fig. 6, PEARL achieves higher and than PEARL w/o SCL, demonstrating that the proposed contrastive objective improves semantic consistency with core structural patterns while preserving discriminative contextual representations.
¹For a fair comparison, we implement CATS using the same Qwen3-4B-Instruct model as PEARL.

| Variant | ||
|---|---|---|
| PEARL w/o SCL | 0.3950 | -0.3965 |
| PEARL | 0.5424 | -0.2507 |
Figure 6: Visualization and quantitative analysis of learned global subgraph embeddings on FB15k-237. The upper part presents heatmaps of the subgraph embeddings learned by different variants: (A) PEARL w/o Contextual Subgraph (PEARL w/o CS), which uses conventional enclosing subgraphs; (B) PEARL w/o Subgraph Contrastive Learning (PEARL w/o SCL), which employs contextual subgraphs without contrastive regularization; and (C) PEARL, which incorporates both contextual subgraph modeling and subgraph contrastive learning. For a consistent comparison, all variants are evaluated on the same set of query triples. The lower part reports the positive consistency () and separation () metrics.
E Hyperparameter Sensitivity
In this subsection, we analyze the sensitivity of PEARL to different hyperparameter settings on the V1 subsets of WN18RR, FB15k-237, and NELL-995. The final hyperparameter configurations adopted for all datasets are summarized in Table 7.
Impact of batch size. We first investigate the influence of batch size by varying it from 8 to 64. As shown in Fig. 7 (A), PEARL exhibits relatively stable performance across different batch sizes on all datasets. The best performance is achieved with a batch size of 8 on WN18RR and NELL-995, while FB15k-237 obtains the optimal result with a batch size of 32.
Impact of learning rate. We further evaluate the effect of the learning rate within the range from 0.0005 to 0.01. Fig. 7 (B) shows that excessively large learning rates slightly degrade the model performance on all datasets. PEARL achieves the best performance with a learning rate of 0.001 on WN18RR and NELL-995, while FB15k-237 performs best with a smaller learning rate of 0.0005.
Impact of subgraph size. To investigate the influence of structural receptive fields, we vary the subgraph hop size from 1 to 4. As illustrated in Fig. 7 (C), PEARL achieves the best performance with on WN18RR, on FB15k-237, and on NELL-995. These results indicate that the optimal structural receptive field depends on the structural characteristics and density of different datasets.
Impact of path number. We study the influence of the number of relational paths by varying from 2 to 5. As shown in Fig. 7(D), WN18RR and FB15k-237 achieve their best performance with , while NELL-995 benefits from retaining more paths and performs best with . Accordingly, we set for WN18RR and FB15k-237, and for NELL-995 in our experiments.
Impact of loss balancing coefficients. We investigate the influence of the loss balancing coefficients and , which control the contributions of the primary link prediction loss and the subgraph contrastive loss , respectively. Fig. 8 reports the Hits@10 performance under different coefficient combinations on WN18RR V1, FB15k-237 V1, and NELL-995 V1. For WN18RR, the best performance is achieved with a

Figure 7: Hyperparameter sensitivity analysis of PEARL on WN18RR V1, FB15k-237 V1, and NELL-995 V1. (A) Effect of batch size; (B) effect of learning rate; (C) effect of subgraph size k; and (D) effect of the number of retrieved relational paths.
relatively small contrastive weight. In contrast, FB15k-237 and NELL-995 favor larger values of , indicating a stronger benefit from contrastive regularization on these datasets.
F Impact of Relation Frequency
To further investigate the effectiveness of PEARL under varying structural conditions, we conduct a fine-grained analysis based on the frequency of query relations in the training set. We hypothesize that high-frequency relations tend to exhibit more diverse and complex local subgraph patterns, where the benefit of contextual modeling becomes more pronounced.
Specifically, we partition test triples into three groups according to the training-set frequency of their query relations: bottom 25%, middle 50%, and top 25%. We then evaluate PEARL and several competitive baselines on the V1 subsets of WN18RR, FB15k-237, and NELL-995. As reported in Table 8, PEARL achieves the best or competitive performance across most relation-frequency groups.
The gains are particularly evident in the high-frequency group of WN18RR and the medium- and high-frequency groups of FB15k-237. On NELL-995, PEARL achieves the best performance in the low- and high-frequency groups while remaining competitive in the middle-frequency group, indicating its effectiveness across different relation-frequency regimes.
Overall, these results demonstrate the robustness of PEARL across different relation-frequency regimes and show that the proposed framework can effectively exploit relational and structural evidence under diverse frequency distributions. By anchoring relational paths within the contextual subgraph, PEARL adaptively leverages informative structural signals even when the distribution of relational patterns varies, leading to more reliable inductive reasoning.
Table 7: DATASET-SPECIFIC HYPERPARAMETER SETTINGS OF PEARL.
| Hyperparameters | WN18RR | FB15k-237 | NELL-995 |
|---|---|---|---|
| Subgraph hop size k | 4 | 3 | 2 |
| learning rate | 0.001 | 0.0005 | 0.001 |
| batch size | 8 | 32 | 8 |
| Loss weights | 1.0, 0.2 | 0.6, 0.2 | 0.8, 0.6 |
| Number of retained paths M | 3 | 3 | 5 |

Figure 8: Hyperparameter sensitivity analysis with respect to the loss weights and . (A) Hits@10 on WN18RR V1. (B) Hits@10 on FB15k-237 V1. (C) Hits@10 on NELL-995 V1.
Table 8: Impact of relation frequency on inductive link prediction (Hits@10, %). Relations are grouped into the bottom 25%, middle 50%, and top 25% according to their occurrence frequency in the training set. The best results are highlighted in bold.
| Methods | WN18RR V1 | FB15k-237 V1 | NELL-995 V1 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Bottom 25% | Middle 50% | Top 25% | Bottom 25% | Middle 50% | Top 25% | Bottom 25% | Middle 50% | Top 25% | |
| CoMPILE | 100.00 | 92.30 | 82.75 | 52.61 | 53.84 | 72.01 | 58.47 | 58.33 | 56.89 |
| SNRI | 100.00 | 96.15 | 84.77 | 39.47 | 46.15 | 71.64 | 50.00 | 56.89 | 52.54 |
| RMPI | 100.00 | 92.31 | 83.33 | 39.47 | 39.42 | 60.45 | 79.17 | 55.17 | 58.86 |
| TACT | 100.00 | 92.31 | 83.33 | 39.47 | 55.77 | 72.76 | 54.17 | 56.90 | 55.08 |
| 100.00 | 94.61 | 85.63 | 49.47 | 55.26 | 71.26 | 75.00 | 60.34 | 61.01 | |
| PEARL | 100.00 | 96.15 | 89.65 | 57.89 | 59.61 | 77.31 | 83.33 | 58.60 | 62.71 |