Abstract
Large-scale knowledge graphs are crucial for structuring human knowledge; however, they often remain incomplete. This paper tackles the challenge of completing missing factual triples in knowledge graphs using through rule reasoning. Current rule learning methods tend to allocate a significant portion of triples to constructing the graph during training, while neglecting multi-target reasoning scenarios. Furthermore, these methods typically depend on qualitative assessments of mined rules, lacking a quantitative method to evaluate rule quality. We propose a model that optimizes training data usage and supports multi-target reasoning. To overcome limitations in evaluating model performance and rule quality, we propose two novel metrics. Experimental results show that our model outperforms baseline methods on five benchmark datasets, validating the effectiveness of these metrics.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Data Availability
The experimental data that supports the findings of this study is available in GitHub at the following URL: https://github.com/lirt1231/MPLR
Notes
In Neural LP framework, they view tail as the question to query, and only one head the answer to the query. Then a confidence \(\alpha _i\) is assigned to one particular path \(p_i\).
To be more precise, our model simulates the removal of edges associated with the input query are removed, as previously detailed in Section 4.2.It is worth noting that in Neural LP [43], DRUM [32], and similar models, a reversed query (?, q, t) with answer h is added for each triple. However, for a fair comparison, we only use the query (h, q, ?)
The URLs we use to implement these models are listed in Appendix B.2.
References
Agrawal R, Srikant R, et al (1994) Fast algorithms for mining association rules. In: Proc. 20th int. conf. very large data bases. VLDB, Citeseer, pp 487–499
Balažević I, Allen C, Hospedales TM (2019) Tucker: Tensor factorization for knowledge graph completion. arXiv:1901.09590, https://doi.org/10.48550/arXiv.1901.09590
Bollacker K, Evans C, Paritosh P, et al (2008) Freebase: a collaboratively created graph database for structuring human knowledge. In: Proceedings of the 2008 ACM SIGMOD international conference on Management of data. pp 1247–1250. https://doi.org/10.1145/1376616.1376746
Bordes A, Usunier N, Garcia-Durán A, et al (2013) Translating embeddings for modeling multi-relational data. In: Proceedings of the 26th international conference on neural information processing systems - Volume 2. Curran Associates Inc., Red Hook, NY, USA, NIPS’13, pp 2787–2795
Cohen WW (2016) Tensorlog: a differentiable deductive database. arXiv:1605.06523, https://doi.org/10.48550/arXiv.1605.06523
Dettmers T, Minervini P, Stenetorp P et al (2018) Convolutional 2d knowledge graph embeddings. In: Thirty-second AAAI confe-rence on artificial intelligence. https://doi.org/10.1609/aaai.v32i1.11573
Dür W, Vidal G, Cirac JI (2000) Three qubits can be entangled in two inequivalent ways. Phys Rev A 62(6):062314. https://doi.org/10.1103/PhysRevA.62.062314
Faudree JR, Faudree RJ, Schmitt JR (2011) A survey of minimum saturated graphs. The Electron J Combinatorics 1000:DS19. https://doi.org/10.37236/41
Gao H, Yang K, Yang Y et al (2021) Quatde: Dynamic quaternion embedding for knowledge graph completion. arXiv:2105.09002, https://doi.org/10.48550/arXiv.2105.09002
Getoor L, Taskar B (2007) Introduction to statistical relational learning. MIT press
Gogleva A, Polychronopoulos D, Pfeifer M et al (2022) Knowledge graph-based recommendation framework identifies drivers of resistance in egfr mutant non-small cell lung cancer. Nat Commun 13(1):1667. https://doi.org/10.1038/s41467-022-29292-7
Guu K, Miller J, Liang P (2015) Traversing knowledge graphs in vector space. arXiv:1506.01094, https://doi.org/10.48550/arXiv.1506.01094
Hajnal A (1965) A theorem on k-saturated graphs. Can J Math 17:720–724. https://doi.org/10.4153/CJM-1965-072-1
Han C, He Q, Yu C et al (2023) Logical entity representation in knowledge-graphs for differentiable rule learning. arXiv:2305.12738, https://doi.org/10.48550/arXiv.2305.12738
Han J, Pei J, Yin Y et al (2004) Mining frequent patterns without candidate generation: a frequent-pattern tree approach. Data Min Knowl Disc 8(1):53–87. https://doi.org/10.1023/B:DAMI.0000005258.31418.83
Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780. https://doi.org/10.1007/978-3-642-24797-2_4
Ji S, Pan S, Cambria E et al (2021) A survey on knowledge graphs: representation, acquisition, and applications. IEEE Trans Neural Netw Learn Syst. https://doi.org/10.1109/TNNLS.2021.3070843
Kathryn WWCFY, Mazaitis R (2018) Tensorlog: deep learning meets probabilistic databases. J Artif Intell Res 1:1–15
Kingma DP, Ba J (2014) Adam: A method for stochastic optimization. arXiv:1412.6980, https://doi.org/10.48550/arXiv.1412.6980
Kok S, Domingos P (2007) Statistical predicate invention. In: Proceedings of the 24th international conference on Machine learning. pp 433–440. https://doi.org/10.1145/1273496.1273551
Lin Q, Liu J, Xu F et al (2022) Incorporating context graph with logical reasoning for inductive relation prediction. In: Proceedings of the 45th International ACM SIGIR conference on research and development in information retrieval. Association for Computing Machinery, New York, NY, USA, SIGIR ’22, pp 893–903. https://doi.org/10.1145/3477495.3531996
Lin Y, Liu Z, Sun M et al (2015) Learning entity and relation embeddings for knowledge graph completion. In: Twenty-ninth AAAI conference on artificial intelligence. https://doi.org/10.1609/aaai.v29i1.9491
Liu L, Du B, Xu J et al (2022a) Joint knowledge graph completion and question answering. In: Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. Association for Computing Machinery, New York, NY, USA, KDD ’22, pp 1098–1108. https://doi.org/10.1145/3534678.3539289
Liu Y, Sun Z, Li G et al (2022b) I know what you do not know: knowledge graph embedding via co-distillation learning. In: Proceedings of the 31st ACM international conference on information & knowledge management. Association for Computing Machinery, New York, NY, USA, CIKM ’22, pp 1329–1338. https://doi.org/10.1145/3511808.3557355
Miller GA (1995) Wordnet: a lexical database for english. Commun ACM 38(11):39–41. https://doi.org/10.1145/219717.219748
Miller GA (1998) WordNet: An electronic lexical database. MIT press
Onoe Y, Boratko M, McCallum A et al (2021) Modeling fine-grained entity types with box embeddings. https://doi.org/10.18653/v1/2021.acl-long.160
Paszke A, Gross S, Massa F et al (2019) PyTorch: an imperative style, high-performance deep learning library. Curran Associates Inc., Red Hook, NY, USA
Pryor C, Dickens C, Augustine E et al (2022) Neupsl: Neural probabilistic soft logic. arXiv:2205.14268, https://doi.org/10.48550/arXiv.2205.14268
Qu M, Tang J (2019) Probabilistic logic neural networks for reasoning. arXiv:1906.08495, https://doi.org/10.48550/arXiv.1906.08495
Qu M, Chen J, Xhonneux LP et al (2020) Rnnlogic: Learning logic rules for reasoning on knowledge graphs. arXiv:2010.04029, https://doi.org/10.48550/arXiv.2010.04029
Sadeghian A, Armandpour M, Ding P et al (2019) Drum: end-to-end differentiable rule mining on knowledge graphs. arXiv:1911.00055, https://doi.org/10.48550/arXiv.1911.00055
Saxena A, Kochsiek A, Gemulla R (2022) Sequence-to-sequence knowledge graph completion and question answering. arXiv:2203.10321, https://doi.org/10.48550/arXiv.2203.10321
Stokman FN, de Vries PH (1988) Structuring knowledge in a graph. In: van der Veer GC, Mulder G (eds) Human-computer interaction. Springer Berlin Heidelberg, Berlin, Heidelberg, pp 186–206. https://doi.org/10.1007/978-3-642-73402-1_12
Sun Z, Deng ZH, Nie JY et al (2019) Rotate: Knowledge graph embedding by relational rotation in complex space. arXiv:1902.10197, https://doi.org/10.48550/arXiv.1902.10197
Toutanova K, Chen D (2015) Observed versus latent features for knowledge base and text inference. In: Proceedings of the 3rd workshop on continuous vector space models and their compositionality. pp 57–66
Trouillon T, Welbl J, Riedel S et al (2016) Complex embeddings for simple link prediction. In: International conference on machine learning. PMLR, pp 2071–2080
Wang P, Dou D, Wu F et al (2019a) Logic rules powered knowledge graph embedding. arXiv:1903.03772, https://doi.org/10.48550/arXiv.1903.03772
Wang P, Xie X, Wang X et al (2023) Reasoning through memorization: nearest neighbor knowledge graph embeddings. In: CCF international conference on natural language processing and chinese computing. Springer, pp 111–122. https://doi.org/10.1007/978-3-031-44693-1_9
Wang PW, Stepanova D, Domokos C et al (2019b) Differentiable learning of numerical rules in knowledge graphs. In: International conference on learning representations
Wang WY, Mazaitis K, Cohen WW (2013) Programming with personalized pagerank: a locally groundable first-order probabilistic logic. In: Proceedings of the 22nd ACM international conference on information & knowledge management. pp 2129–2138
Yang B, Yih Wt, He X et al (2014) Embedding entities and relations for learning and inference in knowledge bases. arXiv:1412.6575, https://doi.org/10.48550/arXiv.1412.6575
Yang F, Yang Z, Cohen WW (2017) Differentiable learning of logical rules for knowledge base reasoning. arXiv:1702.08367, https://doi.org/10.48550/arXiv.1702.08367
Yang Y, Song L (2019) Learn to explain efficiently via neural logic inductive learning. arXiv:1910.02481, https://doi.org/10.48550/arXiv.1910.02481
Yang Y, Huang C, Xia L et al (2022) Knowledge graph contrastive learning for recommendation. In: Proceedings of the 45th international ACM SIGIR conference on research and development in information retrieval. pp 1434–1443
Zhang W, Paudel B, Wang L et al (2019) Iteratively learning embeddings and rules for knowledge graph reasoning. In: The world wide web conference. pp 2366–2377
Zhang Y, Chen X, Yang Y et al (2020) Efficient probabilistic logic reasoning with graph neural networks. arXiv:2001.11850, https://doi.org/10.48550/arXiv.2001.11850
Acknowledgements
The work of this paper is supported by the "National Key R&D Program of China" (2021YFB2012400), "National Natural Science Foundation of China" (Grant No. 62272129).
Author information
Authors and Affiliations
Contributions
1. Haotian Li: Software, Data Curation, Writing - Original Draft 2. Bailing Wang: Conceptualization, Methodology, Writing - Original Draft 3. Kai Wang: Writing - Review 4. Rui Zhang: Validation, Writing - Review 5. Yuliang Wei: Conceptualization, Funding acquisition
Corresponding author
Ethics declarations
Ethical and informed consent for data used
Not applicable.
Competing Interests
We declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A An example of TensorLog for KG reasoning
Each KG entity \(e \in \mathcal {E}\) depicted in Fig. 1 is encoded into a binary vector of length \(|\mathcal {E}| = 6\). For each predicate \(p \in \mathcal {P}\) and each pair of entities \(e_i, e_j \in \mathcal {E}\), the TensorLog operator associated with p is defined as a matrix \(\textrm{M}_p \in \{0,1\}^{|\mathcal {E}| \times |\mathcal {E}|}\). The (i, j)-th element of this matrix is set to 1 (indicated in
in the matrices) if the triple \((e_i, p, e_j)\) exists in \(\mathcal {G}\). Taking the KG illustrated in Fig. 1 as an example, for the predicate \(p = \texttt {daughterOf}\), we have:
The rule sisterOf(X, Z) \(\wedge \) sonOf(Z, Y) \(\Rightarrow \) daughterOf(X, Y) can be simulated by performing the following sparse matrix multiplication:
By setting \(\textrm{v}_{z_1} = [0, 0, 1, 0, 0, 0]^{\top }\) as the one-hot vector of \(z_1\) and performing left multiplication with \(\textrm{v}_{z_1}^{\top }\), we compute \(s^{\top } = \textrm{v}_{z_1}^{\top } \cdot \mathrm {M_{p'}}\). This operation effectively selects the row in \(\mathrm {M_{p'}}\) corresponding to \(z_1\). Subsequent right-hand side multiplication by \(\textrm{v}_{x_1}\) yields the number of unique paths following the pattern \(\texttt {sisterOf} \wedge \texttt {sonOf}\) from \(z_1\) to \(x_1\): \(s^{\top } \cdot \textrm{v}_{x_1} = 1\).
Appendix B Experiment
1.1 B.1 Extension to Table 3: saturations of UMLS
1.2 B.2 Implementation details
The models we use are available at the following URLs:
-
TransE, DistMult and ComplEx: https://github.com/Accenture/AmpliGraph (Accessed June 2023)
-
TuckER: https://github.com/ibalazevic/TuckER (Acce-ssed June 2023)
-
RotatE: https://github.com/DeepGraphLearning/KnowledgeGraphEmbedding (Accessed June 2023)
-
ConvE: https://github.com/TimDettmers/ConvE (Acce-ssed June 2023)
-
QuatDE: https://github.com/hopkin-ghp/QuatDE (Acce-ssed June 2023)
-
KNN-KG: https://github.com/zjunlp/KNN-KG (Acce-ssed June 2023)
-
RNNLogic https://github.com/DeepGraphLearning/RNNLogic (Accessed June 2023)
-
Neural LP: https://github.com/fanyangxyz/Neural-LP (Acce-ssed June 2023)
-
DRUM: https://github.com/alisadeghian/DRUM (Acce-ssed June 2023)
-
MPLR: https://github.com/lirt1231/MPLR (Accessed- June 2023)
1.3 B.3 Extension to Table 4: bifurcation of all datasets
1.4 B.4 Extension to Table 2: results on FB15K-237 and WN18
1.5 B.5 Extension to Table 7: more mined rules from the Family dataset
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Li, H., Wang, B., Wang, K. et al. An original model for multi-target learning of logical rules for knowledge graph reasoning. Appl Intell 55, 138 (2025). https://doi.org/10.1007/s10489-024-05966-1
Accepted:
Published:
DOI: https://doi.org/10.1007/s10489-024-05966-1