A Prompt-Based Graph Reasoning Method for Inductive Knowledge Graphs Based on Unified Semantic Encoding
Abstract
Inductive knowledge graph (KG) reasoning aims to predict missing facts on graphs with unseen entities by learning transferable relational patterns. Existing methods suffer from insufficient relation discriminability, weak cross-graph transfer, and suboptimal use of query-relevant context. Inspired by the in-context learning paradigm of large language models, we propose an inductive KG reasoning method based on prompt graph construction and unified tokenization. A prompt graph is extracted around the query fact to capture query-relevant structural context, while a unified tokenizer maps entities and relations from arbitrary KGs into a shared token space for cross-graph semantic alignment. A two-stage cooperative message-passing framework coordinates a prompt encoder and a KG reasoner, incorporating RNN-based aggregation for differentiated neighbor fusion, residual connections with layer normalization for stable deep message-passing, and rule extraction with visualization for interpretability. Experiments on three public benchmarks (WN18RR, NELL-995, FB15k-237) demonstrate the effectiveness of the proposed method, with particularly strong gains on complex-relation scenarios (up to +3.30% Hits@10 on FB15k-237 v3). Ablation studies confirm the indispensability of the unified tokenizer, and rule visualization provides interpretable evidence for the reasoning results.