吉林大学学报(理学版) ›› 2023, Vol. 61 ›› Issue (4): 845-852.

• • 上一篇    下一篇

基于注意力机制归纳网络的小样本关系抽取模型

季泊男, 张永刚   

  1. 吉林大学 计算机科学与技术学院, 长春 130012
  • 收稿日期:2022-03-03 出版日期:2023-07-26 发布日期:2023-07-26
  • 通讯作者: 张永刚 E-mail:zhangyg@jlu.edu.cn

Few-Shot Relation Extraction Model Based on Attention Mechanism Induction Network

JI Bonan, ZHANG Yonggang   

  1. College of Computer Science and Technology, Jilin University, Changchun 130012, China
  • Received:2022-03-03 Online:2023-07-26 Published:2023-07-26

摘要: 针对小样本关系抽取问题, 提出一种基于注意力机制的归纳网络. 首先, 利用归纳网络中的动态路由算法学习类别表示; 其次, 提出实例级别的注意力机制, 用于调整支持集, 并获取支持集与查询集样本之间的高级信息, 进而获得与查询实例更相关的支持集样本. 该模型很好地解决了训练数据不足时如何进行关系抽取的问题. 在小样本关系抽取数据集FewRel上进行实验, 得到的实验结果为: 5-way 5-shot情形下准确率为(88.38±0.27)%, 5-way 10-shot情形下准确率为(89.91±0.33)%, 10-way 5-shot情形下准确率为(77.92±0.44)%, 10-way 10-shot情形下准确率为(81.21±0.39)%. 实验结果表明, 该模型能适应任务并且优于其他对比模型, 在小样本关系抽取中取得了优于对比模型的结果.

关键词: 关系抽取, 小样本学习, 归纳网络, 自然语言处理, 长短期记忆网络

Abstract: Aiming at  the problem of few-shot relation extraction,  we proposed an induction network based on attention mechanism. Firstly, we used  dynamic routing algorithm in induction network to learn the class representation. Secondly, we proposed instance-level attention mechanism to  adjust support set and obtain high-level information between support set and query set samples, thereby obtaining  the support set samples that were more relevant to the query instances. The proposed  model effectively solved  the problem of how to extract relationships when the training data was insufficient. The experiment was conducted  on the few-shot relation extraction FewRel dataset, and the experimental results showed an  accuracy rate of (88.38±0.27)% in the 5-way 5-shot case,  (89.91±0.33)% in the 5-way 10-shot case, (77.92±0.44)% in the  10-way 5-shot case,  (81.21±0.39)% in the  10-way 10-shot case. The  experimental  results show that the model can adapt to tasks and outperforms other comparative  models, achieving better results than comparative  models in few-shot relation extraction.

Key words: relation extraction, few-shot learning, induction network, natural language processing, long short term memory network

中图分类号: 

  •