《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (11): 3547-3554.DOI: 10.11772/j.issn.1001-9081.2024111606
• 人工智能 • 上一篇
王晓曼1,2,3, 陈艳平1,2,3(
), 杨采薇1,2,3, 黄瑞章1,2,3, 秦永彬1,2,3
收稿日期:2024-11-14
修回日期:2025-02-12
接受日期:2025-02-17
发布日期:2025-04-02
出版日期:2025-11-10
通讯作者:
陈艳平
作者简介:王晓曼(1999—),女,山西太原人,硕士研究生,CCF会员,主要研究方向:自然语言处理、信息抽取基金资助:
Xiaoman WANG1,2,3, Yanping CHEN1,2,3(
), Caiwei YANG1,2,3, Ruizhang HUANG1,2,3, Yongbin QIN1,2,3
Received:2024-11-14
Revised:2025-02-12
Accepted:2025-02-17
Online:2025-04-02
Published:2025-11-10
Contact:
Yanping CHEN
About author:WANG Xiaoman, born in 1999, M. S. candidate. Her research interests include natural language processing, information extraction.Supported by:摘要:
嵌套命名实体识别(NER)是自然语言处理中的一个基本任务。基于跨度的方法将实体识别视为一个跨度分类任务,可以有效地处理嵌套实体。现有方法将句子中的跨度组织成一个二维平面,其中每个单元代表一个跨度,类似于图像中的像素点;随后结合图像处理中的边缘检测技术,利用梯度算子强化并提取平面化句子表示中的实体语义边缘特征。然而,现有基于梯度算子的工作忽略了相邻跨度之间的多方向边缘特征。针对该问题,提出一种多方向梯度特征提取的NER方法。该方法将实体所在位置视为图像中的像素点,利用边缘具有梯度的性质,在平面化句子中采用八方向Sobel算子提取更加完整且具有区分度的实体语义边缘特征。该方法在ACE 2005中文数据集和GENIA英文数据集上分别取得了88.01%和81.23%的F1值,验证了它对NER任务的有效性;同时,在CoNLL2003英文扁平数据集上也取得了92.52%的F1值,验证了它的可扩展性。
中图分类号:
王晓曼, 陈艳平, 杨采薇, 黄瑞章, 秦永彬. 多方向梯度特征提取的嵌套命名实体识别方法[J]. 计算机应用, 2025, 45(11): 3547-3554.
Xiaoman WANG, Yanping CHEN, Caiwei YANG, Ruizhang HUANG, Yongbin QIN. Nested named entity recognition method for multi-directional gradient feature extraction[J]. Journal of Computer Applications, 2025, 45(11): 3547-3554.
| 数据集 | 批次 大小 | 训练 轮次 | 学习率 | BERT 学习率 | 词向量 维度 | 优化器 |
|---|---|---|---|---|---|---|
| ACE 2005 | 8 | 17 | 0.001 | 0.000 02 | 768 | Adam |
| GENIA | 8 | 11 | 0.001 | 0.000 006 | 768 | Adam |
| CoNLL2003 | 12 | 10 | 0.001 | 0.000 01 | 1 024 | Adam |
表1 参数设置
Tab. 1 Parameter setting
| 数据集 | 批次 大小 | 训练 轮次 | 学习率 | BERT 学习率 | 词向量 维度 | 优化器 |
|---|---|---|---|---|---|---|
| ACE 2005 | 8 | 17 | 0.001 | 0.000 02 | 768 | Adam |
| GENIA | 8 | 11 | 0.001 | 0.000 006 | 768 | Adam |
| CoNLL2003 | 12 | 10 | 0.001 | 0.000 01 | 1 024 | Adam |
| 数据集 | 模型 | P | R | F1 |
|---|---|---|---|---|
| ACE 2005 | 文献[ | 78.85 | 81.34 | 80.07 |
| 文献[ | 79.31 | 80.94 | 80.12 | |
| 文献[ | 79.31 | 80.94 | 85.12 | |
| 文献[ | 88.33 | 86.50 | 87.41 | |
| 本文模型 | 87.66 | 88.82 | 88.01 | |
| GENIA | 文献[ | 79.20 | 77.40 | 78.30 |
| 文献[ | 80.10 | 79.47 | 79.79 | |
| 文献[ | 82.31 | 78.66 | 80.44 | |
| 文献[ | 81.50 | 79.60 | 80.50 | |
| 文献[ | 80.19 | 80.89 | 80.54 | |
| 文献[ | 82.24 | 80.06 | 81.13 | |
| 文献[ | 61.89 | 66.95 | 64.42 | |
| 本文模型 | 81.19 | 81.55 | 81.23 |
表2 ACE 2005与GENIA数据集上不同模型性能对比 (%)
Tab. 2 Performance comparison of different models onACE 2005 and GENIA datasets
| 数据集 | 模型 | P | R | F1 |
|---|---|---|---|---|
| ACE 2005 | 文献[ | 78.85 | 81.34 | 80.07 |
| 文献[ | 79.31 | 80.94 | 80.12 | |
| 文献[ | 79.31 | 80.94 | 85.12 | |
| 文献[ | 88.33 | 86.50 | 87.41 | |
| 本文模型 | 87.66 | 88.82 | 88.01 | |
| GENIA | 文献[ | 79.20 | 77.40 | 78.30 |
| 文献[ | 80.10 | 79.47 | 79.79 | |
| 文献[ | 82.31 | 78.66 | 80.44 | |
| 文献[ | 81.50 | 79.60 | 80.50 | |
| 文献[ | 80.19 | 80.89 | 80.54 | |
| 文献[ | 82.24 | 80.06 | 81.13 | |
| 文献[ | 61.89 | 66.95 | 64.42 | |
| 本文模型 | 81.19 | 81.55 | 81.23 |
| 模型 | P | R | F1 |
|---|---|---|---|
| 文献[ | 88.85 | 88.34 | 88.63 |
| 文献[ | 91.72 | 92.05 | 91.96 |
| 文献[ | 92.31 | 92.14 | 92.28 |
| 文献[ | 92.04 | 92.65 | 92.34 |
| 文献[ | 92.48 | 92.33 | 92.41 |
| 本文模型 | 91.71 | 93.25 | 92.52 |
表3 CoNLL2003数据集上不同模型性能对比 ( %)
Tab. 3 Performance comparison of different models onCoNLL2003 dataset
| 模型 | P | R | F1 |
|---|---|---|---|
| 文献[ | 88.85 | 88.34 | 88.63 |
| 文献[ | 91.72 | 92.05 | 91.96 |
| 文献[ | 92.31 | 92.14 | 92.28 |
| 文献[ | 92.04 | 92.65 | 92.34 |
| 文献[ | 92.48 | 92.33 | 92.41 |
| 本文模型 | 91.71 | 93.25 | 92.52 |
| 模型设置 | ACE 2005 | GENIA | ||||
|---|---|---|---|---|---|---|
| P | R | F1 | P | R | F1 | |
| w/-双仿射 | 85.15 | 88.59 | 86.84 | 81.31 | 80.60 | 80.96 |
| w/-4方向3×3算子 | 85.54 | 88.97 | 87.35 | 81.06 | 81.13 | 81.08 |
| 本文模型 | 87.66 | 88.82 | 88.01 | 81.63 | 80.69 | 81.23 |
表4 局部与整体模型性能对比 ( %)
Tab. 4 Performance comparison between local and global models
| 模型设置 | ACE 2005 | GENIA | ||||
|---|---|---|---|---|---|---|
| P | R | F1 | P | R | F1 | |
| w/-双仿射 | 85.15 | 88.59 | 86.84 | 81.31 | 80.60 | 80.96 |
| w/-4方向3×3算子 | 85.54 | 88.97 | 87.35 | 81.06 | 81.13 | 81.08 |
| 本文模型 | 87.66 | 88.82 | 88.01 | 81.63 | 80.69 | 81.23 |
| 模型设置 | P | R | F1 |
|---|---|---|---|
| w/o-残差连接 | 81.60 | 80.13 | 80.86 |
| w/o-多方向梯度算子 | 81.79 | 80.17 | 80.89 |
| w/o-逐点卷积 | 81.39 | 80.60 | 80.96 |
| 本文模型 | 81.63 | 80.69 | 81.23 |
表5 GENIA数据集上的消融实验结果 ( %)
Tab. 5 Ablation experimental results on GENIA dataset
| 模型设置 | P | R | F1 |
|---|---|---|---|
| w/o-残差连接 | 81.60 | 80.13 | 80.86 |
| w/o-多方向梯度算子 | 81.79 | 80.17 | 80.89 |
| w/o-逐点卷积 | 81.39 | 80.60 | 80.96 |
| 本文模型 | 81.63 | 80.69 | 81.23 |
| [1] | 邓依依,邬昌兴,魏永丰,等.基于深度学习的命名实体识别综述[J].中文信息学报,2021,35(9):30-45. |
| DENG Y Y, WU C X, WEI Y F, et al. A survey of named entity recognition based on deep learning[J]. Journal of Chinese Information Processing, 2021, 35(9): 30-45. | |
| [2] | LIU C, YANG S. Using text mining to establish knowledge graph from accident/incident reports in risk assessment[J]. Expert Systems with Applications, 2022, 207: No.117991. |
| [3] | LAHIRI A K, HU Q V. Named entity-based question-answering pair generator[C]// Proceedings of the 31st ACM International Conference on Information and Knowledge Management. New York: ACM, 2022: 4902-4906. |
| [4] | FU Y, LIN N, CHEN B, et al. Cross-lingual named entity recognition for heterogeneous languages[J]. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2023, 31: 371-382. |
| [5] | JU M, MIWA M, ANANIADOU S. A neural layered model for nested named entity recognition[C]// Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers). Stroudsburg: ACL, 2018: 1446-1459. |
| [6] | SOHRAB M G, MIWA M. Deep exhaustive model for nested named entity recognition[C]// Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2018: 2843-2849. |
| [7] | GENG R, CHEN Y, HUANG R, et al. Planarized sentence representation for nested named entity recognition[J]. Information Processing and Management, 2023, 60(4): No.103352. |
| [8] | 杨采薇.面向实体识别的语义边缘增强方法研究[D].贵阳:贵州大学,2024:19-23. |
| YANG C W. Research on semantic edge enhancement method for entity recognition[D]. Guiyang: Guizhou University, 2024:19-23. | |
| [9] | ZOU X, ZHANG Y, ZHANG S, et al. FPGA implementation of edge detection for Sobel operator in eight directions[C]// Proceedings of the 2018 IEEE Asia Pacific Conference on Circuits and Systems. Piscataway: IEEE, 2018: 520-523. |
| [10] | LI Z, SONG M, ZHU Y, et al. Chinese nested named entity recognition based on boundary prompt[C]// Proceedings of the 2023 International Conference on Web Information Systems and Applications, LNCS 14094. Singapore: Springer, 2023: 331-343. |
| [11] | CHEN Y, WU Y, QIN Y, et al. Recognizing nested named entity based on the neural network boundary assembling model[J]. IEEE Intelligent Systems, 2020, 35(1): 74-81. |
| [12] | STRAKOVÁ J, STRAKA M, HAJIC J. Neural architectures for nested NER through linearization[C]// Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Stroudsburg: ACL, 2019: 5326-5331. |
| [13] | TAN Z, SHEN Y, ZHANG S, et al. A sequence-to-set network for nested named entity recognition[C]// Proceedings of the 30th International Joint Conference on Artificial Intelligence. California: IJCAI.org, 2021: 3936-3942. |
| [14] | LI J, FEI H, LIU J, et al. Unified named entity recognition as word-word relation classification[C]// Proceedings of the 36th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2022: 10965-10973. |
| [15] | SHEN Y, MA X, TAN Z, et al. Locate and label: a two-stage identifier for nested named entity recognition[C]// Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). Stroudsburg: ACL, 2021: 2782-2794. |
| [16] | ZHENG Q, WU Y, WANG G, et al. Exploring interactive and contrastive relations for nested named entity recognition[J]. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2023, 31: 2899-2909. |
| [17] | CUI S, JOE I. A multi-head adjacent attention-based pyramid layered model for nested named entity recognition[J]. Neural Computing and Applications, 2023, 35(3): 2561-2574. |
| [18] | YAN H, SUN Y, LI X N, et al. An embarrassingly easy but strong baseline for nested named entity recognition[C]// Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). Stroudsburg: ACL, 2023: 1442-1452. |
| [19] | WALKER C, STRASSEL S, MEDERO J, et al. ACE 2005 multilingual training corpus[DS/OL]. [2024-03-13]. . |
| [20] | KIM J D, OHTA T, TATEISI Y, et al. GENIA corpus — a semantically annotated corpus for bio-textmining[J]. Bioinformatics, 2003, 19(S1): i180-i182. |
| [21] | TJONG KIM SANG E F, DE MEULDER F. Introduction to the CoNLL-2003 shared task: language-independent named entity recognition[C]// Proceedings of the 7th Conference on Natural Language Learning at HLT-NAACL 2003. Stroudsburg: ACL, 2003: 142-147. |
| [22] | YAN H, GUI T, DAI J, et al. A unified generative framework for various NER subtasks[C]// Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). Stroudsburg: ACL, 2021: 5808-5822. |
| [23] | MA X, HOVY E. End-to-end sequence labeling via bi-directional LSTM-CNNS-CRF[C]// Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2016: 1064-1074. |
| [24] | 陈天华.数字图像处理[M].2版.北京:清华大学出版社,2014:85. |
| CHEN T H. Digital image processing[M]. 2nd ed. Beijing: Tsinghua University Press, 2014: 85. | |
| [25] | VERMA H, BERGLER S, TAHAEI N. Comparing and combining some popular NER approaches on Biomedical tasks[C]// Proceedings of the 22nd Workshop on Biomedical Natural Language Proceedings and BioNLP Shared Tasks. Stroudsburg: ACL, 2023: 273-279. |
| [26] | ZHANG S, CHENG H, GAO J, et al. Optimizing bi-encoder for named entity recognition via contrastive learning[EB/OL]. [2024-05-09]. . |
| [27] | WANG S H, SUN X F, LI X Y, et al. GPT-NER: named entity recognition via large language models[C]// Findings of the Association for Computational Linguistics: NAACL 2025. Stroudsburg: ACL, 2025: 4257-4275. |
| [28] | HANH T T H, DOUCET A, SIDERE N, et al. Named entity recognition architecture combining contextual and global features[C]// Proceedings of the 2021 International Conference on Asian Digital Libraries, LNCS 13133. Cham: Springer, 2021: 264-276. |
| [29] | LUO Y, XIAO F, ZHAO H. Hierarchical contextualized representation for named entity recognition[C]// Proceedings of the 34th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2020: 8441-8448. |
| [30] | XIA C, ZHANG C, YANG T, et al. Multi-grained named entity recognition[C]// Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Stroudsburg: ACL, 2019: 1430-1440. |
| [31] | CHEN H, LIN Z, DING G, et al. GRN: gated relation network to enhance convolutional neural network for named entity recognition[C]// Proceedings of the 33rd AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2019: 6236-6243. |
| [32] | SHEN Y, TAN Z, WU S, et al. PromptNER: prompt locating and typing for named entity recognition[C]// Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2023: 12492-12507. |
| [33] | 胡徐怡,王超,厉丹.基于改进Sobel算子的边缘检测算法研究[J].福建电脑,2018,34(9):13-15. |
| HU X Y, WANG C, LI D. Research on edge detection algorithm based on improved Sobel operator[J]. Fujian Computer, 2018, 34(9): 13-15. | |
| [34] | 沈德海,张龙昌,鄂旭.一种基于Sobel算子梯度增强的边缘检测算法[J].电子设计工程,2015,23(10):162-165. |
| SHEN D H, ZHANG L C, E X. An strengthening gradient edge detection algorithm based on Sobel[J]. Electronic Design Engineering, 2015, 23(10): 162-165. |
| [1] | 王闯, 俞璐, 陈健威, 潘成, 杜文博. 开集域适应综述[J]. 《计算机应用》唯一官方网站, 2025, 45(9): 2727-2736. |
| [2] | 陈庆礼, 郭渊博, 方晨. 面向数据异构的聚类联邦学习算法[J]. 《计算机应用》唯一官方网站, 2025, 45(4): 1086-1094. |
| [3] | 王瑜, 方贤进, 杨高明, 丁一峰, 杨新露. 基于注意力掩码与特征提取的人脸伪造主动防御[J]. 《计算机应用》唯一官方网站, 2025, 45(3): 904-910. |
| [4] | 何秋润, 胡节, 彭博, 李天源. 基于上下文信息的多尺度特征融合织物疵点检测算法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 640-646. |
| [5] | 张天骐, 谭霜, 沈夕文, 唐娟. 融合注意力机制和多尺度特征的图像水印方法[J]. 《计算机应用》唯一官方网站, 2025, 45(2): 616-623. |
| [6] | 文连庆, 陶冶, 田云龙, 牛丽, 孙宏霞. 基于流的轻量化高质量文本到语音转换方法[J]. 《计算机应用》唯一官方网站, 2025, 45(10): 3277-3283. |
| [7] | 范锦涛, 陈艳平, 杨采薇, 林川. 结合边界信息的对比学习嵌套命名实体识别[J]. 《计算机应用》唯一官方网站, 2025, 45(10): 3111-3120. |
| [8] | 梁杰涛, 罗兵, 付兰慧, 常青玲, 李楠楠, 易宁波, 冯其, 何鑫, 邓辅秦. 基于坐标几何采样的点云配准方法[J]. 《计算机应用》唯一官方网站, 2025, 45(1): 214-222. |
| [9] | 杨鑫, 陈雪妮, 吴春江, 周世杰. 结合变种残差模型和Transformer的城市公路短时交通流预测[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2947-2951. |
| [10] | 付帅, 郭小英, 白茹意, 闫涛, 陈斌. 改进的CloFormer模型与有序回归相结合的年龄评估方法[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2372-2380. |
| [11] | 陈彤, 杨丰玉, 熊宇, 严荭, 邱福星. 基于多尺度频率通道注意力融合的声纹库构建方法[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2407-2413. |
| [12] | 龙伍丹, 彭博, 胡节, 申颖, 丁丹妮. 基于加强特征提取的道路病害检测算法[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2264-2270. |
| [13] | 刘瑞华, 郝子赫, 邹洋杨. 基于多层级精细特征融合的步态识别算法[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2250-2257. |
| [14] | 吴郅昊, 迟子秋, 肖婷, 王喆. 基于元学习自适应的小样本语音合成[J]. 《计算机应用》唯一官方网站, 2024, 44(5): 1629-1635. |
| [15] | 崔晨辉, 蔺素珍, 李大威, 禄晓飞, 武杰. 基于孪生网络和Transformer的红外弱小目标跟踪方法[J]. 《计算机应用》唯一官方网站, 2024, 44(2): 563-571. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||