Abstract
Knowledge Graph Completion (KGC) is a critical task for maintaining the utility of large-scale knowledge bases. Traditional path-based reasoning methods often struggle with graph sparsity, where explicit multi-hop connections are missing. We introduce SRP-KGC, a novel framework that utilizes "soft reasoning paths"—learnable embeddings designed to simulate latent logical connections. By combining these virtual paths with a hierarchical ranking strategy, SRP-KGC achieves significant performance gains over state-of-the-art methods on standard benchmarks while remaining scalable to massive datasets like Wikidata5M.
Introduction
Knowledge Graphs (KGs) serve as the backbone for diverse AI applications, including semantic search and recommendation systems. Despite their utility, KGs are frequently incomplete. Knowledge Graph Completion (KGC) aims to predict missing triples $(h, r, t)$ to enhance graph density.
State-of-the-art (SOTA) approaches often leverage reasoning paths—sequences of intermediate relations that provide logical evidence for a missing link. For instance, if $A$ is the mother of $B$, and $B$ is the mother of $C$, a reasoning path suggests $A$ is the grandmother of $C$. However, real-world graphs are often too sparse to support such explicit paths. Analysis shows that 82% of triples in WN18RR and 27% in FB15k-237 lack valid 2-hop or 3-hop reasoning paths. When these physical paths are absent, traditional path-based algorithms fail. Moreover, searching for paths across millions of entities is computationally prohibitive.
Methodology: SRP-KGC
The proposed SRP-KGC (Soft Reasoning Paths for Knowledge Graph Completion) framework addresses these challenges through a dual-encoder architecture and three primary innovations.
1. Soft Reasoning Paths
To compensate for missing physical paths, the authors introduce a learnable latent embedding ($S_r$) for each relation. This embedding is concatenated with the original relation representation. During training, contrastive learning is used to align these "soft paths" with actual physical reasoning paths found elsewhere in the graph. This allows the model to simulate multi-hop logic even when no explicit path exists between a specific head and tail entity.
2. Multi-Type Positive Samples
The model's training objective incorporates three distinct types of positive samples to enrich the representation space:
- Relation samples: Standard $(h, r, t)$ triples.
- Reasoning path samples: Explicit sequences of relations (e.g., $P_{3-hop} = \{r_1, r_2^{-1}, r_3\}$) found in the graph.
- Soft reasoning path samples: The learnable virtual paths that capture latent relational logic.
3. Hierarchical Ranking Strategy
To ensure scalability, SRP-KGC employs a tiered filtering system during inference. Instead of an exhaustive graph search for every candidate entity, the model first performs a "quick filter" using relations and soft paths to identify high-confidence candidates. It then executes expensive graph-based path searches only for the top-$N$ entities, significantly reducing the computational burden.
Experimental Results
SRP-KGC was evaluated on three major benchmarks: WN18RR (sparse), FB15k-237 (dense world knowledge), and Wikidata5M-Trans (large-scale).
As shown in the results table, SRP-KGC consistently outperforms existing methods. On the FB15k-237 dataset, it achieved an MRR of 43.1, a substantial improvement over SimKGC's 33.3. Notably, on the sparse WN18RR dataset, where path-based methods typically struggle, SRP-KGC reached an MRR of 70.5, demonstrating the effectiveness of the soft path simulation. The model also showed strong performance on the massive Wikidata5M-Trans dataset, proving its scalability.
Key Insights
- Latent Logic: The "soft" path approach demonstrates that physical connectivity is not a prerequisite for path-based reasoning. By forcing learnable embeddings to mimic the vector space of real paths, the model develops a "latent logic" that bridges semantic gaps.
- Efficiency through Gating: The hierarchical approach proves that sophisticated reasoning can be made efficient. By using soft paths as a gating mechanism, the model focuses its most expensive computations on the most promising candidates.
- Inductive Generalization: The model's success on inductive benchmarks suggests it captures general relational principles rather than merely memorizing entity-specific patterns.
Conclusion and Future Work
SRP-KGC represents a significant step forward in KGC by effectively simulating reasoning paths in sparse graphs. While the hierarchical ranking mitigates costs, the model still incurs more computational overhead than simple embedding-based encoders (e.g., 15s vs 3s per batch). Future research will focus on further optimizing this pipeline for real-time industrial applications and exploring more complex reasoning structures beyond 3-hop paths.
Summary updated