[Paper Review] RNNLogic: Learning Logic Rules for Reasoning on Knowledge Graphs
RNNLogic proposes a joint learning framework that treats logic rules as latent variables and uses an EM-based algorithm to simultaneously train a rule generator (via RNN) and a reasoning predictor on knowledge graphs. It outperforms state-of-the-art methods in knowledge graph reasoning, especially under data sparsity, and generates interpretable, high-quality logic rules for generalization and explainability.
This paper studies learning logic rules for reasoning on knowledge graphs. Logic rules provide interpretable explanations when used for prediction as well as being able to generalize to other tasks, and hence are critical to learn. Existing methods either suffer from the problem of searching in a large search space (e.g., neural logic programming) or ineffective optimization due to sparse rewards (e.g., techniques based on reinforcement learning). To address these limitations, this paper proposes a probabilistic model called RNNLogic. RNNLogic treats logic rules as a latent variable, and simultaneously trains a rule generator as well as a reasoning predictor with logic rules. We develop an EM-based algorithm for optimization. In each iteration, the reasoning predictor is first updated to explore some generated logic rules for reasoning. Then in the E-step, we select a set of high-quality rules from all generated rules with both the rule generator and reasoning predictor via posterior inference; and in the M-step, the rule generator is updated with the rules selected in the E-step. Experiments on four datasets prove the effectiveness of RNNLogic.
Motivation & Objective
- To address the challenge of learning high-quality, interpretable logic rules for knowledge graph reasoning.
- To overcome the limitations of existing methods—such as large search spaces in neural logic programming and sparse rewards in reinforcement learning.
- To improve reasoning performance and generalization by jointly training a rule generator and a reasoning predictor with latent logic rules.
- To develop a scalable and effective optimization method that reduces search complexity while maintaining rule quality.
Proposed method
- RNNLogic models logic rules as a latent variable in a probabilistic framework, where the rule generator produces rules via a recurrent neural network conditioned on query entities.
- The reasoning predictor computes the likelihood of answers given the knowledge graph and generated logic rules, enabling differentiable reasoning.
- An EM-based optimization algorithm is used: in the E-step, high-quality rules are selected via posterior inference using both the rule generator and reasoning predictor.
- In the M-step, the rule generator is updated to imitate the selected high-quality rules, improving future rule generation.
- The method supports both end-to-end training with entity and relation embeddings and zero-shot reasoning using only learned logic rules.
- Beam search is used to extract top-I rules per query relation based on their prior probabilities from the rule generator.
Experimental results
Research questions
- RQ1Can a joint learning framework with latent logic rules improve reasoning performance on incomplete knowledge graphs?
- RQ2How can the search space for logic rule discovery be effectively reduced while maintaining rule quality?
- RQ3Does the use of an EM-based optimization strategy outperform reinforcement learning in generating interpretable and effective logic rules?
- RQ4To what extent can RNNLogic generalize to downstream tasks with minimal training data?
- RQ5Can the generated logic rules be both diverse and semantically meaningful for real-world knowledge graph reasoning?
Key findings
- RNNLogic achieves state-of-the-art performance on four benchmark datasets, with a mean reciprocal rank (MRR) of 0.639 on Kinship and 0.745 on UMLS in the no-embedding setting, significantly outperforming REINFORCE-based optimization.
- Even with only 10 rules per query relation, RNNLogic achieves competitive reasoning performance, demonstrating the quality and reusability of the generated rules.
- RNNLogic is more robust to data sparsity: its performance degrades more slowly than RotatE when training triplet counts are reduced, showing strong generalization under low-data regimes.
- The method significantly outperforms RotatE across all embedding dimensions, indicating that the learned logic rules provide substantial gains beyond embedding-based reasoning alone.
- Case studies on FB15k-237 show that RNNLogic generates diverse, meaningful logic rules, including subrelation, two-hop compositional, and multi-hop rules, confirming interpretability and expressiveness.
- The EM-based optimization consistently outperforms REINFORCE in both MRR and rule quality, validating the effectiveness of the joint learning and posterior inference strategy.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.