计算机科学 ›› 2026, Vol. 53 ›› Issue (11A): 250900080-144.doi: 10.11896/jsjkx.250900080

• 人工智能 • 上一篇    下一篇

基于实体边界特征增强原型表示的小样本关系抽取模型

肖毓航, 李贯峰, 陈昱胤, 秦晶   

  1. 宁夏大学信息工程学院/宁夏“东数西算”人工智能与信息安全重点实验室 银川 750021
  • 出版日期:2026-11-16 发布日期:2026-11-16
  • 通讯作者: 李贯峰(ligf@nxu.edu.cn)
  • 作者简介:(584627931@qq.com)
  • 基金资助:
    宁夏全职引进高层次人才科研启动项目(2023BSB03066);国家自然科学基金项目(62066038);宁夏自然科学基金项目(2024AAC03098)

Few-shot Relation Extraction Model with Prototype Representation Enhanced by Entity Boundary Features

XIAO Yuhang, LI Guanfeng, CHEN Yuyin, QIN Jing   

  1. School of Information Engineering,Ningxia University/ Ningxia Key Laboratory of Artificial Intelligence and Information Security for Channeling Computing Resources from the East to the West,Yinchuan 750021,China
  • Published:2026-11-16 Online:2026-11-16
  • About author:XIAO Yuhang,born in 1999,M.S.candidate,is a member of CCF(No.Y8938G).His main research interest is relation extraction.
    LI Guanfeng,born in 1979,Ph.D,associate professor,is a member of CCF(No.A0519M).His main research interests include knowledge engineering and intelligent computing.
  • Supported by:
    This work was supported by the Key Research and Development Program of Ningxia(2023BSB03066),National Natural Science Foundation of China(62066038) and Natural Science Foundation of Ningxia(2024AAC03098).

摘要: 小样本关系抽取旨在通过少量标注样本对模型进行训练,从而识别未见关系类型下的实体对关系。现有基于原型网络的方法已取得一定进展,但是多数方法通过对支持实例特征进行平均来构造原型,忽视了不同实例对关系表示的重要性差异,直接引入外部关系信息增强原型质量可能导致模型参数冗余,并削弱泛化能力。为解决上述问题,文中提出一种实体边界特征增强原型表示模型,该模型首先引入实体边界特征提取模块以捕捉实体起止词的语义信息,从而强化关系上下文,其次设计查询感知的实例加权机制,根据查询样本与支持样本的语义相似度自适应构建原型表示,最后采用轻量级标量门控融合机制,动态整合原型表示与关系语义描述,实现高效、稳健的语义融合,利用增强的原型表示对查询实例进行关系分类,模型能够更准确地预测查询实例所属的关系类别。在 FewRel 1.0 与 FewRel 2.0 两个标准数据集上进行实验,结果表明,所提方法在准确率指标上优于现有主流基线模型,验证了实体边界特征建模与语义融合机制在小样本关系抽取任务中的有效性。

关键词: 关系抽取, 小样本学习, 实体边界增强, 原型网络

Abstract: Few-shot relation extraction aims to identify the relationship between entity pairs under unseen relation types using only a limited number of labeled examples.While prototype-based methods have shown promise,many of them construct class prototypes by averaging the features of support instances,overlooking the varying contributions of individual examples.Additionally,directly incorporating external relation information may introduce parameter redundancy and hinder generalization.To address these limitations,this paper proposes a prototype representation model enhanced with entity boundary features.The model first introduces an entity boundary feature extraction module to capture the semantic information of entity start and end tokens,thereby strengthening relational context.Then,a query-aware instance weighting mechanism is designed to adaptively construct prototype representations according to the semantic similarity between query and support instances.Finally,a lightweight scalar-gating fusion mechanism is employed to dynamically integrate prototype representations with relational semantic descriptions,achieving efficient and robust semantic fusion.Experiments on the standard FewRel 1.0 and FewRel 2.0 datasets demonstrate that the proposed method significantly outperforms mainstream baseline models in terms of accuracy,confirming the effectiveness of entity boundary modeling and semantic fusion in few-shot relation extraction.

Key words: Relation extraction, Few-shot learning, Entity boundary enhancement, Prototypical network

中图分类号: 

  • TP391.1
[1] BACH N,BADASKAR S.A review of relation extraction[J].Literature Review for Language and Statistics II,2007,2:1-15.
[2] HU J,LI J,CHEN Z,et al.Word graph guided summarization for radiology findings[C]//Findings of the Association for Computational Linguistics:ACL-IJCNLP 2021.Stroudsburg:ACL,2021:4980-4990.
[3] DING M,ZHOU C,CHEN Q,et al.Cognitive graph for multi-hop reading comprehension at scale[C]//Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.Florence:ACL,2019:2694-2703.
[4] DUA D,SINGH S,GARDNER M.Benefits of intermediate annotations in reading comprehension[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.Online:ACL,2020:5627-5634.
[5] KARPUKHIN V,OGUZ B,MIN S,et al.Dense passage retrieval for open-domain question answering[C]//Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing.Online:ACL,2020:6769-6781.
[6] PENG H,GAO T,HAN X,et al.Learning from context ornames? An empirical study on neural relation extraction[C]//Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing.Online:ACL,2020:3661-3672.
[7] WEI Z,SU J,WANG Y,et al.A novel cascade binary tagging framework for relational triple extraction[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.Online:ACL,2020:1476-1488.
[8] SUN H,CHEN J.Enhancing the Prototype Network with Lo-cal-to-Global Optimization for Few-Shot Relation Extraction[C]//Findings of the Association for Computational Linguistics:NAACL 2025.2025.
[9] YE Z X,LING Z H.Multi-level matching and aggregation network for few-shot relation classification[C]//Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.Florence:ACL,2019:2872-2881.
[10] YANG K J,ZHENG N T,DAI X Y,et al.Enhance prototypical network with text descriptions for few-shot relation classification[C]//Proceedings of the 29th ACM International Conference on Information and Knowledge Management.New York:ACM,2020:2273-2276.
[11] GARCIA SATORRAS V,BRUNA ESTRACH J.Few-shotlearning with graph neural networks[C]//Proceedings of the 6th International Conference on Learning Representations.Vancouver:OpenReview,2018.
[12] QU M,GAO T,XHONNEUX L P,et al.Few-shot relation extraction via bayesian meta-learning on relation graphs[C]//International Conference on Machine Learning.PMLR,2020:7867-7876
[13] HAN J,CHENG B,LU W.Exploring task difficulty for few-shot relation extraction[C]//Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing.Online and Punta Cana:ACL,2021:2605-2616.
[14] ZHAO Y,ZHANG A X,XIE R B,et al.Connecting embeddings for knowledge graph entity typing[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.Online:ACL,2020:6419-6428.
[15] HAN X,ZHU H,YU P,et al.FewRel:a large-scale supervisedfew-shot relation classification dataset with state-of-the-art evaluation[J].CoRR,2018,abs/1810.10147.
[16] XIE Y,XU H,LI J,et al.Heterogeneous graph neural networks for noisy few-shot relation classification[J].Knowledge-Based Systems,2020,194:105548.
[17] QU M,GAO T,XHONNEUX L P,et al.Few-shot relation extraction via bayesian meta-learning on relation graphs[C]//International Conference on Machine Learning.PMLR,2020:7867-7876.
[18] GAO T Y,HAN X,ZHU H,et al.FewRel 2.0:towards morechallenging few-shot relation classification[J].CoRR,2019,abs/1910.07124.
[19] DEVLIN J,CHANG M W,LEE K,et al.BERT:pre-training of deep bidirectional transformers for language understanding[C]//Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics:Human Language Technologies.Minneapolis:ACL,2019:4171-4186.
[20] BALDINI SOARES L,FITZGERALD N,LING J,et al.Matching the blanks:distributional similarity for relation learning[C]//Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.Florence:ACL,2019:2895-2905.
[21] GAO T,HAN X,LIU Z,et al.Hybrid attention-based prototypical networks for noisy few-shot relation classification[C]//Proceedings of the AAAI Conference on Artificial Intelligence.Honolulu:AAAI Press,2019,33(1):6407-6414.
[22] HAN J,CHENG B,LU W.Exploring task difficulty for few-shot relation extraction[C]//Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing.Online and Punta Cana:ACL,2021:2605-2616.
[23] LIU Y,HU J P,WAN X,et al.A simple yet effective relation information guided approach for few-shot relation extraction[C]//Findings of the Association for Computational Linguistics:ACL 2022.Dublin:ACL,2022:757-763.
[24] YANG K J,ZHENG N T,DAI X Y,et al.Enhance prototypical network with text descriptions for few-shot relation classification[C]//Proceedings of the 29th ACM International Conference on Information and Knowledge Management.New York:ACM,2020:2273-2276.
[25] LI X W,LIU C,YU J,et al.Prototypical attention network for few-shot relation classification with entity-aware embedding module[J].Applied Intelligence,2023,53(9):10978-10994.
[26] FENG J,WEI Q,CUI J.Prototypical networks relation classification model based on entity convolution[J].Computer Speech &Language,2023,77:101432.
[27] HE H,NIU H,FENG J,et al.A prototype network enhanced relation semantic representation for few-shot relation extraction[J].Human-Centric Intelligent Systems,2023,3(1):1-12.
[28] JI Y M,ZHANG W,LIU Q,et al.A relation extraction method for Chinese text based on few-shot learning[J].Journal of Nanjing University of Posts and Telecommunications(Natural Science Edition),2023,43(4):64-71.
[29] SNELL J,SWERSKY K,ZEMEL R.Prototypical networks for few-shot learning[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems.New York:ACM Press,2017:4080-4090.
[30] PAHDE F,PUSCAS M,KLEIN T,et al.Multimodal prototypical networks for few-shot learning[C]//Proceedings of IEEE Winter Conference on Applications of Computer Vision.Washington D.C.:IEEE Press,2021:2643-2652.
[31] PARNAMI A,LEE M.Few-shot keyword spotting with prototypical networks[C]//Proceedings of the 7th International Conference on Machine Learning Technologies.New York:ACM Press,2022:277-283.
[32] GAO T Y,HAN X,LIU Z Y,et al.Hybrid attention-based prototypical networks for noisy few-shot relation classification[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2019:6407-6414.
[33] YANG K,ZHENG N,DAI X,et al.Enhance prototypical network with text descriptions for few-shot relation classification[C]//Proceedings of the 29th ACM International Conference on Information and Knowledge Management.New York:ACM,2020:2273-2276.
[34] YANG S,ZHANG Y,NIU G,et al.Entity concept enhanced few-shot relation extraction[EB/OL].arXiv:2106.02401,2021[2025-09-08].https://arxiv.org/abs/2106.02401.
[35] WANG Y,BAO J,LIU G,et al.Learning to decouple relations:few-shot relation classification with entity-guided attention and confusion-aware training[EB/OL].[2025-09-08].https://arxiv.org/abs/2010.10894.
[36] LI R,ZHONG J,HU W,et al.Adaptive class augmented prototype network for few-shot relation extraction[J].Neural Networks,2024,169:134-142.
[37] ZHANG Y,CEN M,WU T,et al.RAPS:a novel few-shot relation extraction pipeline with query-information guided attention and adaptive prototype fusion[C]//Proceedings of the International Conference on Modeling,Natural Language Processing and Machine Learning.2024:147-152.
[38] PAN Z,LI H,ZHAO X.Prototype Tuning:A Meta-Learning Approach for Few-Shot Document-Level Relation Extraction with Large Language Models[C]//Findings of the Association for Computational Linguistics:NAACL 2025.2025:62-74
[39] WANG Z,GE J,YANG X,et al.Method for relation extraction based on entity boundary features[C]//Proceedings of the 2024 7th International Conference on Computer Information Science and Artificial Intelligence.Shaoxing:ACM,2024:648-653.
[40] WANG M,ZHENG J,CAI F,et al.DRK:discriminative rule-based knowledge for relieving prediction confusions in few-shot relation extraction[C]//Proceedings of the 29th International Conference on Computational Linguistics.Gyeongju:ICCL,2022:2129-2140.
[41] LI W,QIAN T.Graph-based model generation for few-shot relation extraction[C]//Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.Stroudsburg:ACL,2022:62-71.
[42] BORCHERT P,DE WEERDT J,MOENS M F.Efficient information extraction in few-shot relation classification through contrastive representation learning[C]//Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics:Human Language Technologies(Volume 2:Short Papers).Stroudsburg:ACL,2024:638-646.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!