吉林大学学报(工学版) ›› 2025, Vol. 55 ›› Issue (1): 307-315.doi: 10.13229/j.cnki.jdxbgxb.20230259

• 计算机科学与技术 • 上一篇    

基于局部注意力和本地远程监督的实体关系抽取方法

郭晓然1(),王铁君1,闫悦2   

  1. 1.西北民族大学 数学与计算机科学学院,兰州 730030
    2.西北民族大学 中国民族信息技术研究院,兰州 730030
  • 收稿日期:2023-03-23 出版日期:2025-01-01 发布日期:2025-03-28
  • 作者简介:郭晓然(1981-),女,副教授,博士. 研究方向:知识图谱,知识抽取.E-mail: guoxr1982@163.com
  • 基金资助:
    国家自然科学基金项目(62166035);甘肃省自然科学基金项目(21JR7RA163);中央高校基本科研业务费青年教师创新项目(31920210090)

Entity relationship extraction method based on local attention and local remote supervision

Xiao-ran GUO1(),Tie-jun WANG1,Yue YAN2   

  1. 1.School of Mathematics and Computer Science,Northwest Minzu University,Lanzhou 730030,China
    2.China National Information Technology Research Institute,Northwest Minzu University,Lanzhou 730030,China
  • Received:2023-03-23 Online:2025-01-01 Published:2025-03-28

摘要:

针对复杂语境下重叠三元组的实体关系抽取,本文提出了一种基于局部注意力和本地远程监督的联合抽取方法LARE。首先,设计了指针式分层序列标注方案解决三元组的实体重叠问题;其次,提出局部注意力机制,通过滑动窗口进行注意力计算以关注局部细节信息;最后,建立本地知识库,训练时利用远程监督方式进行标注,并随机替换一些实体关系对生成新的训练句子,增强模型的拟合能力。对比实验结果表明,本文方法在百度数据集和唐卡数据集上的F1值分别为81.49%和53.07%,优于其他基线模型,提升了实体重叠情况下的关系抽取性能。

关键词: 计算机应用, 实体关系抽取, 实体重叠, 局部注意力机制, 本地远程监督

Abstract:

In order to address the entity relation extraction of overlapping triplets in complex contexts, a joint extraction method called LARE is proposed, which is based on local attention and local remote supervision. First, the pointer hierarchical sequence annotation scheme is designed to solve the problem of entity overlap of triples. Second, a local attention mechanism is proposed, which uses a sliding window to calculate attention to focus on local details. Finally, A knowledge base is established, which is annotated by remote supervision during training, and some entity relationship pairs are randomly replaced to generate new training sentences, so as to enhance the fitting ability of the model. Through comparative experiments,the F1 value of the proposed method on the Baidu dataset and Thangka dataset reaches 81.49% and 53.07%, which improves the performance of relationship extraction in the case of entity overlap.

Key words: computer application, entity relation extraction, entity overlap, local attention mechanism, local remote supervision

中图分类号: 

  • TP391

图1

实体关系抽取模型LARE结构图"

图2

指针式分层序列标注方案示例"

图3

DG_CNN网络结构"

图4

数据集标注示例"

表1

实验参数设置"

参数名称参数值
DG_CNN层数12
DG_CNN膨胀率1,2,5,1,2,5,1,2,5,1,1,1
DG_CNN卷积核大小3
Local Attention窗口尺寸3
Local Attention隐层维度128
BiLSTM隐层维度128
batch_size16
初始学习率0.001
主语首、尾位置阈值0.3
宾语首、尾位置阈值0.2

表2

百度数据集的消融实验结果"

模型名称P/%R/%F1/%
LARE-CNN80.0976.5178.26
LARE-Muti-head82.3278.5080.36
LARE-LDS82.5677.7580.08
LARE84.0279.1081.49

表3

唐卡数据集的消融实验结果"

模型名称P/%R/%F1/%
LARE-CNN77.1932.0745.31
LARE-Muti-head69.8636.1547.65
LARE-LDS84.9037.3251.85
LARE88.5137.9053.07

表4

唐卡数据集上模型对比实验结果"

模型名称P/%R/%F1/%
BiLSTM-LSTM58.4628.6538.45
CopyRE56.3739.2646.28
LARE88.5137.9053.07
1 张少伟, 王鑫, 陈子睿, 等. 有监督实体关系联合抽取方法研究综述[J].计算机科学与探索, 2022, 16(4): 713-733.
Zhang Shao-wei, Wang Xin, Chen Zi-rui,et al. Survey of supervised joint entity relation extraction methods[J]. Journal of Frontiers of Computer Science and Technology, 2022, 16(4): 713-733.
2 欧阳丹彤, 肖君, 叶育鑫. 基于实体对弱约束的远监督关系抽取[J]. 吉林大学学报: 工学版, 2019, 49(3): 912-919.
Ouyang Dan-tong, Xiao Jun, Ye Yu-xin. Distant supervision for relation extraction with weak constraints of entity pairs[J]. Journal of Jilin University(Engineering and Technology Edition), 2019, 49(3): 912-919.
3 Kambhatla N. Combining lexical, syntactic, and semantic features with maximum entropy models for extracting relations[C]∥Proc of the ACL on Interactive Poster and Demonstration Sessions, Stroudsburg, USA, 2004: 22-26.
4 Miwa M, Bansal M. End-to-end relation extraction using LSTMs on sequences and tree structures[J/OL]. [2023-02-12]. .
5 Zheng S, Hao Y, Lu D, et al. Joint entity and relation extraction based on a hybrid neural network[J]. Neurocomputing, 2017, 257: 59-66.
6 Li F, Zhang M, Fu G, et al. A neural joint model for entity and relation extraction from biomedical text[J]. Bmc Bioinformatics, 2017, 18(1): 198-208.
7 Zheng S, Wang F, Bao H, et al. Joint extraction of entities and relations based on a novel tagging scheme[J/OL]. [2023-02-13]. arXiv preprint arXiv:1706. 05075v1.
8 Bekoulis G, Deleu J, Demeester T, et al. Joint entity recognition and relation extraction as a multi-head selection problem[J]. Expert Systems with Applications, 2018, 114: 34-45.
9 Zeng X R, Zeng D J, He S Z, et al. Extracting relational facts by an end-to-end neural model with copy mechanism[C]∥Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, Melbourne, Australia, 2018: 506-514.
10 Wang S, Zhang Y, Che W, et al. Joint extraction of entities and relations based on a novel graph scheme[C]∥The 27th International Joint Conference on Artificial Intelligence, Stockholm, Sweden,2018: 4461-4467.
11 Fu T J, Li P H, Ma W Y. GraphRel: modeling text as relational graphs for joint entity and relation extraction[C]∥Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 2019: 1409-1418.
12 冯冲, 康丽琪, 石戈, 等. 融合对抗学习的因果关系抽取[J].自动化学报, 2018, 44(5): 811-818.
Feng Chong, Kang Li-qi, Shi Ge, et al. Causality extraction with GAN[J]. Acta Automatica Sinica, 2018, 44(5): 811-818.
13 黄培馨, 赵翔, 方阳, 等. 融合对抗训练的端到端知识三元组联合抽取[J].计算机研究与发展, 2019, 56(12): 2536-2548.
Huang Pei-xin, Zhao Xiang, Fang Yang. End-to end knowledge triplet extraction combined with adversarial training[J]. Journal of Computer Research and Development, 2019, 56(12): 2536-2548.
14 杨穗珠, 刘艳霞, 张凯文, 等. 远程监督关系抽取综述[J].计算机学报,2021, 44(8): 1636-1660.
Yang Sui-zhu, Liu Yan-xia, Zhang Kai-wen, et al. Survey on distantly-supervised relation extraction[J]. Chinese Journal of Computers,2021,44(8):1636-1660.
15 Mintz M, Bills S, Snow R, et al. Distant supervision for relation extraction without labeled data[C]∥Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, Suntec, Singapore, 2009: 1003-1011.
16 Zeng D J, Liu K, Chen Y B, et al. Distant supervision for relation extraction via piecewise convolutional neural networks[C]∥Conference on Empirical Methods in Natural Language Processing, Lisbon, Portugal, 2015: 1753- 1762.
17 Lin Y K, Shen S Q, Liu Z Y, et al. Neural relation extraction with selective attention over instances[C]∥The 54th Annual Meeting of the Association for Computational Linguistics, Berlin, Germany, 2016: 2124-2133.
18 Wu Y, Bamman D, Russell S. Adversarial training for relation extraction[C]∥Conference on Empirical Methods in Natural Language Processing, Copenhagen, Denmark, 2017: 1778-1783.
19 Feng J, Huang M L, Zhao L, et al. Reinforcement learning for relation classification from noisy data[C]∥The 32th AAAI Conference on Artificial Intelligence, New Orleans, USA, 2018: 5779-5786.
20 Shang Y, Huang H Y, Mao X L, et al. Are noisy sentences useless for distant supervised relation extraction?[C]∥The 34th AAAI Conference on Artificial Intelligence, New York, USA,2020: 8799-8806.
21 苏剑林. 百度2019语言与智能技术竞赛baseline模型 [EB/OL]. [2023-02-20].
Su Jian-lin. Baidu 2019 language and intelligent technology competition baseline model[EB/OL]. [2023-02-20].
22 Yu F, Koltun V. Multi-scale context aggregation by dilated convolutions[J/OL]. [2023-02-14]. .
23 Dauphin Y N, Fan A, Auli M, et al. Language modeling with gated convolutional networks[C]∥Proceedings of the 34th International Conference on Machine Learning, Sydney, Australia, 2017: 933-941.
[1] 刘元宁,臧子楠,张浩,刘震. 基于深度学习的核糖核酸二级结构预测方法[J]. 吉林大学学报(工学版), 2025, 55(1): 297-306.
[2] 张磊,焦晶,李勃昕,周延杰. 融合机器学习和深度学习的大容量半结构化数据抽取算法[J]. 吉林大学学报(工学版), 2024, 54(9): 2631-2637.
[3] 李路,宋均琦,朱明,谭鹤群,周玉凡,孙超奇,周铖钰. 基于RGHS图像增强和改进YOLOv5网络的黄颡鱼目标提取[J]. 吉林大学学报(工学版), 2024, 54(9): 2638-2645.
[4] 赵宏伟,武鸿,马克,李海. 基于知识蒸馏的图像分类框架[J]. 吉林大学学报(工学版), 2024, 54(8): 2307-2312.
[5] 张云佐,郑宇鑫,武存宇,张天. 基于双特征提取网络的复杂环境车道线精准检测[J]. 吉林大学学报(工学版), 2024, 54(7): 1894-1902.
[6] 孙铭会,薛浩,金玉波,曲卫东,秦贵和. 联合时空注意力的视频显著性预测[J]. 吉林大学学报(工学版), 2024, 54(6): 1767-1776.
[7] 李延风,刘名扬,胡嘉明,孙华栋,孟婕妤,王奥颖,张涵玥,杨华民,韩开旭. 基于梯度转移和自编码器的红外与可见光图像融合[J]. 吉林大学学报(工学版), 2024, 54(6): 1777-1787.
[8] 张丽平,刘斌毓,李松,郝忠孝. 基于稀疏多头自注意力的轨迹kNN查询方法[J]. 吉林大学学报(工学版), 2024, 54(6): 1756-1766.
[9] 梁礼明,周珑颂,尹江,盛校棋. 融合多尺度Transformer的皮肤病变分割算法[J]. 吉林大学学报(工学版), 2024, 54(4): 1086-1098.
[10] 张云佐,郭威,李文博. 遥感图像密集小目标全方位精准检测算法[J]. 吉林大学学报(工学版), 2024, 54(4): 1105-1113.
[11] 拉巴顿珠,扎西多吉,珠杰. 藏语文本标准化方法[J]. 吉林大学学报(工学版), 2024, 54(12): 3577-3588.
[12] 周丰丰,于涛,范雨思. 基于质谱数据的生成对抗自编码器整合投票算法[J]. 吉林大学学报(工学版), 2024, 54(10): 2969-2977.
[13] 田金鹏,侯保军. 基于深度展开自注意力网络的压缩感知图像重构[J]. 吉林大学学报(工学版), 2024, 54(10): 3018-3026.
[14] 车娜,朱奕明,赵剑,孙磊,史丽娟,曾现伟. 基于联结主义的视听语音识别方法[J]. 吉林大学学报(工学版), 2024, 54(10): 2984-2993.
[15] 王法胜,贺冰,孙福明,周慧. 自适应内容感知空间正则化相关滤波跟踪算法[J]. 吉林大学学报(工学版), 2024, 54(10): 3037-3049.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!