Abstract
Knowledge Graph Completion (KGC) is essential for addressing the inherent incompleteness of large-scale Knowledge Graphs (KGs). While rule-based models offer high interpretability, they often suffer from "global bias" by assigning static weights to logical rules regardless of the local context. We present SLogic (Subgraph-Informed Logical Rule learning), a neuro-symbolic framework that dynamically adjusts rule weights based on the local structural neighborhood of a query. By integrating a Relational Graph Convolutional Network (R-GCN) for subgraph encoding and a Gated Recurrent Unit (GRU) for rule encoding, SLogic achieves state-of-the-art results on benchmarks such as WN18RR and YAGO3-10 while maintaining human-readable explanations.
Introduction
Knowledge Graphs (KGs) represent real-world facts as triples $(h, r, t)$. Due to their large scale, KGs are often incomplete, necessitating Knowledge Graph Completion (KGC) to predict missing links. Existing approaches typically fall into two categories: neural embedding models, which are accurate but lack transparency, and rule-based models, which are interpretable but often less flexible.
A major limitation of current rule-based systems is the reliance on global rule weights. For instance, a rule like bornIn(X, Y) ∧ locatedIn(Y, Z) → livesIn(X, Z) might be highly accurate for certain types of entities (e.g., historical figures) but less reliable for others. SLogic addresses this by introducing a context-aware scoring function that leverages the local subgraph around the query entity to inform rule selection.
The SLogic Framework
SLogic operates through a multi-stage pipeline that combines symbolic reasoning with deep learning.
1. Rule Mining and Subgraph Extraction
The process begins by mining a base of logical rules using Depth-First Search (DFS). To ensure robustness, statistical confidence scores, such as the Wilson score, are calculated for each rule. Simultaneously, for any given query $(h, r, ?)$, the model extracts a $k$-hop local subgraph centered on the head entity $h$.
2. Neuro-Symbolic Encoding
The core of SLogic lies in its dual-encoding architecture:
- Subgraph Encoder: A Relational Graph Convolutional Network (R-GCN) processes the extracted local subgraph. This allows the model to capture the specific structural context and relational patterns surrounding the query entity.
- Rule Encoder: A Gated Recurrent Unit (GRU) is employed to encode the sequence of relations within a logical rule body, capturing the semantic meaning of the reasoning path.
3. Dynamic Scoring and Inference
A Multi-Layer Perceptron (MLP) aggregates the embeddings from the subgraph and rule encoders, along with the query relation and static rule statistics. The output is a query-dependent score $\phi(h, r, \mathbf{r}_b)$ that reflects the plausibility of a rule in a specific context. During inference, SLogic re-ranks candidate rules and aggregates their predictions to identify the most likely tail entity.
Experimental Evaluation
SLogic was evaluated on three standard KGC benchmarks: WN18RR (lexical relations), FB15k-237 (general facts), and YAGO3-10 (large-scale Wikipedia/WordNet data).
Key Results
SLogic consistently outperformed existing rule-based baselines. On WN18RR, it achieved a Mean Reciprocal Rank (MRR) of 0.49, surpassing RLogic (0.47). The improvement was even more pronounced on YAGO3-10, where SLogic reached an MRR of 0.50, compared to 0.34 for RNNLogic and 0.36 for RLogic.
Analysis and Insights
- Contextual Importance: Ablation studies revealed that the GNN-based subgraph encoder is critical; its removal led to a 9.5% performance decline. This confirms that local structural information is vital for accurate rule weighting.
- Sensitivity to Hyperparameters: The model's performance is influenced by the number of rules considered and the depth of the local subgraph ($k$-hops). As shown in the experimental analysis, increasing the number of hops generally improves MRR, though with diminishing returns after $k=2$.
- Handling Dense Graphs: In dense datasets like FB15k-237, SLogic utilizes a "coverage penalty" to mitigate noise from overly broad rules, ensuring that the model prioritizes more discriminative reasoning paths.
Conclusion and Future Work
SLogic demonstrates that integrating local context into logical rule learning significantly enhances KGC performance without sacrificing interpretability. By dynamically weighting rules, the framework provides a more nuanced approach to reasoning than traditional static models. Future research will focus on extending SLogic to handle non-linear, branching logical structures and optimizing subgraph sampling techniques for even larger datasets.
Summary updated