Skip to main content

Knowledge-Enhanced Prototypical Network with Structural Semantics for Few-Shot Relation Classification

  • Conference paper
  • First Online:
Advances in Knowledge Discovery and Data Mining (PAKDD 2023)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 13937))

Included in the following conference series:

  • 620 Accesses

Abstract

Few-shot relation classification (RC) aims to determine the labeled relation between two entities in a given sentence using only a few training instances. Previous studies integrate models with explicit triple knowledge, using the inherent concepts of entities to improve the instance representation. However, these studies neglect the implicit structural knowledge present in the knowledge graph (KG). In this paper, we present SKProto, a knowledge-enhanced prototypical network that leverages deep structured semantic knowledge from the multi-hop neighbors of entity-linked concepts. Specifically, we propose a concept-guided hybrid attention mechanism to learn implicit structural semantic knowledge for enhancing the context-aware instance representation. To further distinguish subtle semantic differences among the concepts, the multi-granularity semantic distinction approach is proposed to construct the negative samples with various difficulties (i.e. hard, medium, and easy) based on the conceptual hierarchical structure. Experimental results on the FewRel 2.0 benchmark show that SKProto outperforms state-of-the-art models. We also demonstrate that SKProto has better robustness than other competitive models in low-shot scenarios.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Following KEFDA, we adopt a conceptual graph containing a general domain part and a specific domain part.

  2. 2.

    https://www.wikidata.org.

  3. 3.

    https://www.nlm.nih.gov/research/umls/index.html.

  4. 4.

    https://github.com/thunlp/OpenKE.

  5. 5.

    https://github.com/thunlp/FewRel.

  6. 6.

    https://github.com/huggingface/transformers.

References

  1. Bansal, T., Gunasekaran, K., Wang, T., Munkhdalai, T., McCallum, A.: Diverse distributions of self-supervised tasks for meta-learning in NLP. In: EMNLP, pp. 5812–5824 (2021)

    Google Scholar 

  2. Gao, T., et al.: FewRel 2.0: towards more challenging few-shot relation classification. In: EMNLP-IJCNLP, pp. 6250–6255 (2019)

    Google Scholar 

  3. Hao, J., Chen, M., Yu, W., Sun, Y., Wang, W.: Universal representation learning of knowledge bases by jointly embedding instances and ontological concepts. In: SIGKDD, pp. 1709–1719 (2019)

    Google Scholar 

  4. Lin, Z., et al.: A structured self-attentive sentence embedding. arXiv preprint arXiv:1703.03130 (2017)

  5. Mahony, N.O., Campbell, S., Krpalkova, L., Carvalho, A., Walsh, J., Riordan, D.: Representation learning for fine-grained change detection. Sensors 21, 4486 (2021)

    Article  Google Scholar 

  6. Zhang, N., et al.: Long-tail relation extraction via knowledge graph embeddings and graph convolution networks. In: NAACL (2019)

    Google Scholar 

  7. Wu, R., et al.: Open relation extraction: relational knowledge transfer from supervised data to unsupervised data. In: EMNLP (2019)

    Google Scholar 

  8. Wang, H., Qin, K., Zakari, R.Y., Lu, G., Yin, J.: Deep neural network-based relation extraction: an overview. Neural. Comput. Appl. 34, 1–21 (2022)

    Google Scholar 

  9. Yang, B., Yih, W.T., He, X., Gao, J., Deng, L.: Embedding entities and relations for learning and inference in knowledge bases. In: ICLR (2015)

    Google Scholar 

  10. Ba, J.L., Kiros, J.R., Hinton, G.E.: Layer normalization. In: arXiv preprint arXiv:1607.06450 (2016)

  11. Finn, C., Abbeel, P., Levine, S.: Model-agnostic meta-learning for fast adaptation of deep networks. In: ICML (2017)

    Google Scholar 

  12. Gao, T., Han, X., Liu, Z., Sun, M.: Hybrid attention-based prototypical networks for noisy few-shot relation classification. In: AAAI, vol. 33, pp. 6407–6414 (2019)

    Google Scholar 

  13. Goodfellow, I.J., Shlens, J., Szegedy, C.: Explaining and harnessing adversarial examples. In: STAT (2015)

    Google Scholar 

  14. Hadsell, R., Chopra, S., LeCun, Y.: Dimensionality reduction by learning an invariant mapping. In: CVPR, vol. 2, pp. 1735–1742 (2006)

    Google Scholar 

  15. Han, X.: Fewrel: a large-scale supervised few-shot relation classification dataset with state-of-the-art evaluation. In: EMNLP, pp. 4803–4809 (2018)

    Google Scholar 

  16. Hendrycks, D., Gimpel, K.: Gaussian error linear units (GELUs). arXiv preprint arXiv:1606.08415 (2016)

  17. Kenton, J.D.M.W.C., Toutanova, L.K.: BERT: pre-training of deep bidirectional transformers for language understanding. In: NAACL-HLT, pp. 4171–4186 (2019)

    Google Scholar 

  18. Miwa, M., Bansal, M.: End-to-end relation extraction using LSTMs on sequences and tree structures. In: ACL, pp. 1105–1116 (2016)

    Google Scholar 

  19. Nichol, A., Achiam, J., Schulman, J.: On first-order meta-learning algorithms. arXiv: Learning (2018)

  20. Obamuyide, A., Vlachos, A.: Meta-learning improves lifelong relation extraction. In: ACL (2019)

    Google Scholar 

  21. Obamuyide, A., Vlachos, A.: Model-agnostic meta-learning for relation classification with limited supervision. In: ACL (2019)

    Google Scholar 

  22. Oord, A., Li, Y., Vinyals, O.: Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748 (2018)

  23. Snell, J., Swersky, K., Zemel, R.S.: Prototypical networks for few-shot learning. In: NeurIPS (2017)

    Google Scholar 

  24. Soares, L., FitzGerald, N., Ling, J., Kwiatkowski, T.: Matching the blanks: distributional similarity for relation learning. In: ACL (2019)

    Google Scholar 

  25. Wan, C., Zhang, T., Xiong, Z., Ye, H.: Representation learning for fault diagnosis with contrastive predictive coding. In: SAFEPROCESS, pp. 1–5 (2021)

    Google Scholar 

  26. Wang, Q., Van Hoof, H.: Model-based meta reinforcement learning using graph structured surrogate models and amortized policy search. In: ICML (2022)

    Google Scholar 

  27. Xiong, W., Yu, M., Chang, S., Guo, X., Wang, W.Y.: One-shot relational learning for knowledge graphs. In: EMNLP, pp. 1980–1990 (2018)

    Google Scholar 

  28. Yang, S., Zhang, Y., Niu, G., Zhao, Q., Pu, S.: Entity concept-enhanced few-shot relation extraction. In: ACL-IJCNLP, pp. 987–991 (2021)

    Google Scholar 

  29. Zhang, J., Zhu, J., Yang, Y., Shi, W., Zhang, C., Wang, H.: Knowledge-enhanced domain adaptation in few-shot relation classification. In: SIGKDD (2021)

    Google Scholar 

  30. Zhang, Y., Qi, P., Manning, C.D.: Graph convolution over pruned dependency trees improves relation extraction. In: EMNLP, pp. 2205–2215 (2018)

    Google Scholar 

  31. Zhenzhen, L., Zhang, Y., Nie, J.Y., Li, D.: Improving few-shot relation classification by prototypical representation learning with definition text. In: NAACL (2022)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xiaofeng He .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Li, Y., Zhang, T., Li, D., He, X. (2023). Knowledge-Enhanced Prototypical Network with Structural Semantics for Few-Shot Relation Classification. In: Kashima, H., Ide, T., Peng, WC. (eds) Advances in Knowledge Discovery and Data Mining. PAKDD 2023. Lecture Notes in Computer Science(), vol 13937. Springer, Cham. https://doi.org/10.1007/978-3-031-33380-4_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-33380-4_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-33379-8

  • Online ISBN: 978-3-031-33380-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics