HetRelMTL-Net: A Unified Framework for Knowledge Graph Completion via Graph–Text Fusion and Multi-Task Dynamic Optimization
Abstract
1. Introduction
- GraphBert-KGC: A novel graph-text fusion module that dynamically aligns structural and semantic features through relation-aware dynamic projection, multi-hop graph attention, and an adaptive cross-modal gating mechanism. This module contextually balances the contributions from graph topology and textual descriptions—for example, it prioritizes structural signals for hierarchical relations while emphasizing textual semantics for descriptive relations.
- Multi-Task Framework: Built upon the unified representations from GraphBert-KGC, HetRelMTL-Net jointly optimizes link prediction, relation classification, and path reasoning. This is achieved by introducing task-specific inductive biases (e.g., hyperbolic projections for hierarchical), a hierarchical attention mechanism for semantic discrimination, and a theoretically grounded KL-divergence-based dynamic weighting strategy that adaptively balances task-specific losses during training, mitigating gradient conflicts.
2. Related Work
2.1. Graph–Text Fusion in KGC
2.2. Multi-Task Learning for KGC
2.3. Complex Relation Reasoning
3. Methodology
3.1. GraphBert-KGC: Graph–Text Fusion Module
3.1.1. Dynamic Relation Projection
3.1.2. Multi-Hop Graph Attention
3.1.3. Cross-Modal Fusion
3.2. HetRelMTL-Net: Multi-Task Architecture
3.2.1. Shared Embedding Layer
3.2.2. Task-Specific Heads
- (1)
- Link Prediction with Hyperbolic Projection
- (2)
- Relation Classification with Hierarchical Attention
- (3)
- Path Reasoning with LSTM Encoding
3.2.3. Dynamic Weight Allocation via KL-Divergence
3.2.4. Joint Objective Function
- is a margin-based ranking loss that encourages positive triples to score higher than negative samples by a predefined margin.
- is the cross-entropy loss applied to the relation classification task, aiming to correctly identify the relation type given entity pairs.
- is the mean squared error loss used in path reasoning, which measures the discrepancy between the predicted and ground-truth path scores.
4. Experiments
4.1. Experimental Setup
4.1.1. Datasets
- WN18RR: A subset of WordNet, which primarily contains lexical and semantic relations. It is characterized by a high proportion of symmetric (e.g., antonym) and hierarchical (e.g., hypernym) relations, posing challenges for structural reasoning.
- FB15k-237: Derived from Freebase, this dataset features more complex and diverse relational patterns, including asymmetric and many-to-many relations (e.g., foundedBy), which are prevalent in real-world knowledge graphs.
4.1.2. Baselines
4.1.3. Implementation Details and Experimental Protocols
4.1.4. Convergence Efficiency
4.2. Ablation Studies
4.3. Attention Visualization
4.4. Case Study: Financial Relation Reasoning
5. Discussion
5.1. Model Limitations
5.2. Theoretical Insights
5.3. Error Analysis and Limitations
5.4. Future Directions
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Ibrahim, N.; Aboulela, S.; Ibrahim, A.; Kashef, R. A survey on augmenting knowledge graphs (KGs) with large language models (LLMs): Models, evaluation metrics, benchmarks, and challenges. Discov. Artif. Intell. 2024, 4, 76. [Google Scholar] [CrossRef]
- Zhang, J.C.; Zain, A.M.; Zhou, K.Q.; Chen, X.; Zhang, R.M. A review of recommender systems based on knowledge graph embedding. Expert Syst. Appl. 2024, 250, 123876. [Google Scholar] [CrossRef]
- James, T.; Hennig, H. Knowledge graphs and their applications in drug discovery. In High Performance Computing for Drug Discovery and Biomedicine; Heifetz, A., Ed.; Publishing House: New York, NY, USA, 2023; pp. 203–221. [Google Scholar]
- Zamini, M.; Reza, H.; Rabiei, M. A Review of Knowledge Graph Completion. Information 2022, 13, 396. [Google Scholar] [CrossRef]
- Bordes, A.; Usunier, N.; García-Durán, A.; Weston, J.; Yakhnenko, O. Translating embeddings for modeling multi-relational data. In Proceedings of the 27th International Conference on Neural Information Processing Systems—Volume 2, Lake Tahoe, NV, USA, 5–10 December 2013. [Google Scholar]
- Sun, Z.; Deng, Z.H.; Nie, J.Y.; Tang, J. RotatE: Knowledge graph embedding by relational rotation in complex space. In Proceedings of the 7th International Conference on Learning Representations, New Orleans, LO, USA, 6–9 May 2019. [Google Scholar]
- Yao, L.; Mao, C.; Luo, Y. KG-BERT: BERT for knowledge graph completion. arXiv 2019, arXiv:1909.03193. [Google Scholar] [CrossRef]
- Zhang, Z.; Han, X.; Liu, Z.; Jiang, X.; Sun, M.; Liu, Q. ERNIE: Enhanced Language Representation with Informative Entities. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 28 July–2 August 2019. [Google Scholar]
- Yin, J.; Zhou, J.; Shan, Y.; Peng, J.; Liu, H.; Zhou, X.; Wang, X. Multi-task Learning for Hyper-Relational Knowledge Graph Completion. In Proceedings of the 20th International Conference on Intelligent Computing, Tianjin, China, 5–8 August 2024. [Google Scholar]
- Trouillon, T.; Welbl, J.; Riedel, S.; Gaussier, E.; Bouchard, G. Complex embeddings for simple link prediction. In Proceedings of the 33rd International Conference on Machine Learning, New York, NY, USA, 19–24 June 2016. [Google Scholar]
- Xie, R.; Liu, Z.; Jia, J.; Luan, H.; Sun, M. Representation learning of knowledge graphs with entity descriptions. In Proceedings of the 30th AAAI Conference on Artificial Intelligence, Phoenix, AZ, USA, 12–17 February 2016. [Google Scholar]
- Wang, Q.; Huang, P.; Wang, H.; Dai, S.; Jiang, W.; Liu, J.; Lyu, Y.; Zhu, Y.; Wu, H. Coke: Contextualized knowledge graph embedding. arXiv 2019, arXiv:1911.02168. [Google Scholar]
- Wang, X.; Gao, T.; Zhu, Z.; Zhang, Z.; Liu, Z.; Li, J.; Tang, J. KEPLER: A unified model for knowledge embedding and pre-trained language representation. Trans. Assoc. Comput. Linguist. 2021, 9, 176–194. [Google Scholar] [CrossRef]
- Zhang, Q.; Sun, Z.; Hu, W.; Chen, M.; Guo, L.; Qu, Y. Multi-view knowledge graph embedding for entity alignment. In Proceedings of the 28th International Joint Conference on Artificial Intelligence (IJCAI-19), Macao, China, 10–16 August 2019. [Google Scholar]
- Chen, Z.; Badrinarayanan, V.; Lee, C.Y.; Rabinovich, A. Gradnorm: Gradient normalization for adaptive loss balancing in deep multitask networks. In Proceedings of the 35th International Conference on Machine Learning, Stockholmsmässan, Stockholm, Sweden, 10–15 July 2018. [Google Scholar]
- Kendall, A.; Gal, Y.; Cipolla, R. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018. [Google Scholar]
- Nickel, M.; Kiela, D. Poincaré embeddings for learning hierarchical representations. In Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
- Kolyvakis, P.; Kalousis, A.; Kiritsis, D. Hyperbolic knowledge graph embeddings for knowledge base completion. In Proceedings of the 17th European Semantic Web Conference, Heraklion, Greece, 31 May–4 June 2017. [Google Scholar]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, T. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Minneapolis, MA, USA, 2–7 June 2019. [Google Scholar]
- Kasula, V.K.; Konda, B.; Yenugula, M.; Yadulla, A.R.; Addula, S.R.; Kotteti, C.M.M. Fraudulent Credit Card Transaction Monitoring Using Deep Learning: A CNN-LSTM Approach for Single-Transaction Security Identification. In Proceedings of the 4th International Conference on Computing and Machine Intelligence (ICMI), Mount Pleasant, MI, USA, 5–6 April 2025. [Google Scholar]
- Kim, B.; Hong, T.; Ko, Y.; Seo, J. Multi-task learning for knowledge graph completion with pre-trained language models. In Proceedings of the 28th International Conference on Computational Linguistics, Barcelona, Spain, 8–13 December 2020. [Google Scholar]





| Dataset | Entities | Relations | Train | Triples Valid | Test |
|---|---|---|---|---|---|
| WN18RR | 40,943 | 11 | 86,835 | 3034 | 3100 |
| FB15k-237 | 14,951 | 134 | 483,142 | 50,000 | 59,071 |
| Model | WN18RR (MRR) | FB15k-237 (Hits@1) | FB15k-237 (Hits@10) |
|---|---|---|---|
| TransE | 0.226 | 0.195 | 0.482 |
| RotatE | 0.362 | 0.241 | 0.593 |
| HypER | 0.348 | 0.217 | 0.552 |
| KG-BERT | 0.216 | 0.187 | 0.471 |
| GraphBert-KGC | 0.346 | 0.231 | 0.585 |
| MT-KGC | 0.330 | 0.172 | 0.458 |
| GradNorm-KGC | 0.338 | 0.223 | 0.561 |
| HetRelMTL-Net | 0.420 | 0.287 | 0.689 |
| Ablation | WN18RR (MRR) | FB15k-237 (Hits@1) |
|---|---|---|
| HetRelMTL-Net | 0.420 | 0.287 |
| No Dynamic Weights | 0.355 (−15.6%) | 0.235 (−18.2%) |
| No Path Reasoning | 0.376 (−10.5%) | 0.251 (−12.7%) |
| Fixed Projection | 0.326 (−22.3%) | 0.215 (−25.1%) |
| No Cross-Modal Fusion | 0.301 (−28.3%) | 0.198 (−30.9%) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wu, Y.; Xi, X.; Wang, F.; Sheng, S.; Cui, Z.; Zhu, R. HetRelMTL-Net: A Unified Framework for Knowledge Graph Completion via Graph–Text Fusion and Multi-Task Dynamic Optimization. Electronics 2026, 15, 222. https://doi.org/10.3390/electronics15010222
Wu Y, Xi X, Wang F, Sheng S, Cui Z, Zhu R. HetRelMTL-Net: A Unified Framework for Knowledge Graph Completion via Graph–Text Fusion and Multi-Task Dynamic Optimization. Electronics. 2026; 15(1):222. https://doi.org/10.3390/electronics15010222
Chicago/Turabian StyleWu, Yujie, Xuefeng Xi, Fei Wang, Shengli Sheng, Zhiming Cui, and Run Zhu. 2026. "HetRelMTL-Net: A Unified Framework for Knowledge Graph Completion via Graph–Text Fusion and Multi-Task Dynamic Optimization" Electronics 15, no. 1: 222. https://doi.org/10.3390/electronics15010222
APA StyleWu, Y., Xi, X., Wang, F., Sheng, S., Cui, Z., & Zhu, R. (2026). HetRelMTL-Net: A Unified Framework for Knowledge Graph Completion via Graph–Text Fusion and Multi-Task Dynamic Optimization. Electronics, 15(1), 222. https://doi.org/10.3390/electronics15010222

