Skip to main content
Log in

Relational multi-scale metric learning for few-shot knowledge graph completion

  • Regular Paper
  • Published:
Knowledge and Information Systems Aims and scope Submit manuscript

Abstract

Few-shot knowledge graph completion (FKGC) refers to the task of inferring missing facts in a knowledge graph by utilizing a limited number of reference entities. Most FKGC methods assume a single similarity metric, which leads to a single feature space and makes it difficult to separate positive and negative samples effectively. Therefore, we propose a multi-scale relational metric network (MSRMN) specifically designed for FKGC, which integrates multiple scales of measurement methods to learn a more comprehensive and compact feature space. In this study, we design a complete neighbor random sampling algorithm to sample complete one-hop neighbor information, and aggregate both one-hop and multi-hop neighbor information to enhance entity representations. Then, MSRMN adaptively obtains prototype representations of relations and integrates three different scales of measurement methods to learn a more comprehensive feature space and a more discriminative feature mapping, enabling positive query entity pairs to obtain higher measurement scores. Evaluation of MSRMN on two public datasets for link prediction demonstrates that MSRMN attains top-performing outcomes across various few-shot sizes on the NELL dataset.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Algorithm 1
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

References

  1. Bordes A, Usunier N, Garcia-Duran A, Weston J, et al (2013) Translating embeddings for modeling multi-relational data. In: Neural information processing systems (NIPS), pp. 1–9

  2. Chen M, Zhang W, Zhang W, Chen Q, Chen H (2019) Meta relational learning for few-shot link prediction in knowledge graphs. In: Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), pp 4217–4226

  3. Chen WY, Liu YC, Kira Z, Wang YCF, Huang JB (2019) A closer look at few-shot classification. In: International conference on learning representations

  4. Dai Quoc Nguyen TDN, Nguyen DQ, Phung D (2018) A novel embedding model for knowledge base completion based on convolutional neural network. In: Proceedings of NAACL-HLT, pp 327–333

  5. Dettmers T, Minervini P, Stenetorp P, Riedel S (2018) Convolutional 2d knowledge graph embeddings. In: Proceedings of the AAAI conference on artificial intelligence, vol 32

  6. Diederik P K, Ba J (2015) Adam: a method for stochastic optimization. In: International conference on learning representations

  7. Finn C, Abbeel P, Levine S (2017) Model-agnostic meta-learning for fast adaptation of deep networks. In: International conference on machine learning, PMLR, pp 1126–1135

  8. Gao T, Han X, Liu Z, Sun M (2019) Hybrid attention-based prototypical networks for noisy few-shot relation classification. In: Proceedings of the AAAI conference on artificial intelligence, vol 33, pp 6407–6414

  9. Garcia V, Bruna J (2018) Few-shot learning with graph neural networks. In: 6th International conference on learning representations, ICLR 2018

  10. Hazimeh H, Mugellini E, Ruffieux S, Khaled OA, Cudré-Mauroux P (2018) Automatic embedding of social network profile links into knowledge graphs. In: Proceedings of the 9th international symposium on information and communication technology, pp 16–23

  11. He B, Zhou D, Xie J, Xiao J, Jiang X, Liu Q (2020) Ppke: knowledge representation learning by path-based pre-training. arXiv preprint arXiv:2012.03573

  12. He S, Liu K, Ji G, Zhao J (2015) Learning to represent knowledge graphs with gaussian embedding. In: Proceedings of the 24th ACM international on conference on information and knowledge management, pp 623–632

  13. Kim J, Kim T, Kim S, Yoo CD (2019) Edge-labeling graph neural network for few-shot learning. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp 11–20

  14. Kipf TN, Welling M (2019) Semi-supervised classification with graph convolutional networks. In: International conference on learning representations

  15. Li M, Wang B, Jiang J (2021) Siamese pre-trained transformer encoder for knowledge base completion. Neural Process Lett 53:4143–4158

    Article  Google Scholar 

  16. Li X, Wu J, Sun Z, Ma Z, Cao J, Xue JH (2020) Bsnet: Bi-similarity network for few-shot fine-grained image classification. IEEE Trans Image Process 30:1318–1331

    Article  MathSciNet  Google Scholar 

  17. Li Y, Yu K, Huang X, Zhang Y (2022) Learning inter-entity-interaction for few-shot knowledge graph completion. In: Proceedings of the 2022 conference on empirical methods in natural language processing, pp 7691–7700

  18. Li Y, Yu K, Zhang Y, Liang J, Wu X (2023) Adaptive prototype interaction network for few-shot knowledge graph completion. IEEE Trans Neural Netw Learn Syst. https://doi.org/10.1109/TNNLS.2023.3283545

    Article  Google Scholar 

  19. Li Z, Zhou F, Chen F, Li H (2017) Meta-sgd: learning to learn quickly for few-shot learning. arXiv preprint arXiv:1707.09835

  20. Liang Y, Zhao S, Cheng B, Yang H (2023) Transam: transformer appending matcher for few-shot knowledge graph completion. Neurocomputing 537:61–72

    Article  Google Scholar 

  21. Lin W, Shen Y, Yan J, Xu M, Wu J, Wang J, Lu K (2017) Learning correspondence structures for person re-identification. IEEE Trans Image Process 26(5):2438–2453

    Article  MathSciNet  Google Scholar 

  22. Lin Y, Liu Z, Sun M, Liu Y, Zhu X (2015) Learning entity and relation embeddings for knowledge graph completion. In: Proceedings of the AAAI conference on artificial intelligence, vol 29

  23. Lyu Y, Talebi MS (2023) Double graph attention networks for visual semantic navigation. Neural Process Lett 55:1–22

    Article  Google Scholar 

  24. Min B, Grishman R, Wan L, Wang C, Gondek D (2013) Distant supervision for relation extraction with an incomplete knowledge base. In: Proceedings of the 2013 conference of the North American chapter of the association for computational linguistics: human language technologies, pp 777–782

  25. Nickel M, Tresp V, Kriegel HP (2011) A three-way model for collective learning on multi-relational data. In: Proceedings of the 28th international conference on international conference on machine learning, pp 809–816

  26. Niu G, Li Y, Tang C, Geng R, Dai J, Liu Q, Wang H, Sun J, Huang F, Si L (2021) Relational learning with gated and attentive neighbor aggregator for few-shot knowledge graph completion. In: Proceedings of the 44th international ACM SIGIR conference on research and development in information retrieval, pp 213–222

  27. Saxena A, Tripathi A, Talukdar P (2020) Improving multi-hop question answering over knowledge graphs using knowledge base embeddings. In: Proceedings of the 58th annual meeting of the association for computational linguistics, pp 4498–4507

  28. Shen T, Zhang F, Cheng J (2022) A comprehensive overview of knowledge graph completion. Knowl Based Syst 255:109597

    Article  Google Scholar 

  29. Sheng J, Guo S, Chen Z, Yue J, Wang L, Liu T, Xu H (2020) Adaptive attentional network for few-shot knowledge graph completion. In: Proceedings of the 2020 conference on empirical methods in natural language processing (EMNLP), pp. 1681–1691

  30. Snell J, Swersky K, Zemel R (2017) Prototypical networks for few-shot learning. In: Advances in neural information processing systems, vol 30

  31. Sung F, Yang Y, Zhang L, Xiang T, Torr PH, Hospedales TM (2018) Learning to compare: relation network for few-shot learning. In: Proceedings of the IEEE conference on computer vision and pattern recognition, pp 1199–1208

  32. Trouillon T, Welbl J, Riedel S, Gaussier É, Bouchard G (2016) Complex embeddings for simple link prediction. In: International conference on machine learning, PMLR, pp 2071–2080

  33. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, Kaiser Ł, Polosukhin I (2017) Attention is all you need. In: Advances in neural information processing systems, vol 30

  34. Vinyals O, Blundell C, Lillicrap T, Kavukcuoglu K, Wierstra D (2016) Matching networks for one shot learning. In: Proceedings of the 30th international conference on neural information processing systems, pp 3637–3645

  35. Wang C, Zhang H, Li L, Li D (2022) Knowledge graph attention network with attribute significance for personalized recommendation. Neural Process Lett 55:1–17

    Google Scholar 

  36. Wang Q, Cui H, Zhang J, Du Y, Zhou Y, Lu X (2023) Neighbor-augmented knowledge graph attention network for recommendation. Neural Process Lett 55:1–17

    Article  Google Scholar 

  37. Wang Q, Huang P, Wang H, Dai S, Jiang W, Liu J, Lyu Y, Zhu Y, Wu H (2019) Coke: contextualized knowledge graph embedding. arXiv preprint arXiv:1911.02168

  38. Wang Q, Wang H, Lyu Y, Zhu Y (2021) Link prediction on n-ary relational facts: a graph-based approach. In: Findings of the association for computational linguistics: ACL-IJCNLP 2021, pp 396–407

  39. Wang X, He X, Cao Y, Liu M, Chua TS (2019) Kgat: knowledge graph attention network for recommendation. In: Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pp 950–958

  40. Wang Z, Zhang J, Feng J, Chen Z (2014) Knowledge graph embedding by translating on hyperplanes. In: Proceedings of the AAAI conference on artificial intelligence, vol 28

  41. Wang Z, Lv Q, Lan X, Zhang Y (2018) Cross-lingual knowledge graph alignment via graph convolutional networks. In: Proceedings of the 2018 conference on empirical methods in natural language processing. pp 349–357

  42. Wang Z, Chen T, Ren J, Yu W, Cheng H, Lin L (2018) Deep reasoning with knowledge graph for social relationship understanding. In: Proceedings of the 27th international joint conference on artificial intelligence, pp 1021–1028

  43. Wu T, Ma H, Wang C, Qiao S, Zhang L, Yu S (2022) Heterogeneous representation learning and matching for few-shot relation prediction. Pattern Recogn 131:108830

    Article  Google Scholar 

  44. Xiao B, Liu CL, Hsaio WH (2020) Proxy network for few shot learning. In: Asian conference on machine learning. PMLR, pp 657–672

  45. Xiao H, Huang M, Zhu X (2016) Transg: a generative model for knowledge graph embedding. In: Proceedings of the 54th annual meeting of the association for computational linguistics, vol 1. Long Papers, pp 2316–2325

  46. Xie P, Zhou G, Liu J, Huang JX (2023) Incorporating global-local neighbors with gaussian mixture embedding for few-shot knowledge graph completion. Expert Syst Appl 234:121086

    Article  Google Scholar 

  47. Xiong W, Yu M, Chang S, Guo X, Wang WY (2018) One-shot relational learning for knowledge graphs. In: Proceedings of the 2018 conference on empirical methods in natural language processing, pp 1980–1990

  48. Yang B, Yih W, He X, Gao J, Deng L (2015) Embedding entities and relations for learning and inference in knowledge bases. In: Proceedings of the international conference on learning representations (ICLR) 2015

  49. Yang P, Liu Z, Li B, Zhang P (2022) Implicit relation inference with deep path extraction for commonsense question answering. Neural Process Lett 54(6):4751–4768

    Article  Google Scholar 

  50. Zhang C, Yao H, Huang C, Jiang M, Li Z, Chawla NV (2020) Few-shot knowledge graph completion. In: Proceedings of the AAAI conference on artificial intelligence vol 34, pp 3041–3048

  51. Zhang J, Zhang M, Lu Z, Xiang T (2021) Adargcn: adaptive aggregation GCN for few-shot learning. In: Proceedings of the IEEE/CVF winter conference on applications of computer vision, pp 3482–3491

Download references

Acknowledgements

This work was supported in part by the National Natural Science Foundation of China Joint Fund Project [No.U23A20316], the Science and Technology Innovation 2030-“New Generation of Artificial Intelligence” Major Project [No.2021ZD0111000], and Henan Provincial Science and Technology Research Project [No.232102211033].

Author information

Authors and Affiliations

Authors

Contributions

YS and MG led the method application, experiment conduction and the result analysis. DD and DK participated in the data extraction and preprocessing. ZX participated in the manuscript revision. KZ provided theoretical guidance and the revision of this paper.

Corresponding author

Correspondence to Kunli Zhang.

Ethics declarations

Conflict of interest

The authors declare no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Song, Y., Gui, M., Zhang, K. et al. Relational multi-scale metric learning for few-shot knowledge graph completion. Knowl Inf Syst (2024). https://doi.org/10.1007/s10115-024-02083-w

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10115-024-02083-w

Keywords

Navigation