《计算机应用》唯一官方网站 ›› 2021, Vol. 41 ›› Issue (12): 3637-3644.DOI: 10.11772/j.issn.1001-9081.2021010090
所属专题: 人工智能
收稿日期:
2021-01-18
修回日期:
2021-04-27
接受日期:
2021-04-29
发布日期:
2021-12-28
出版日期:
2021-12-10
通讯作者:
曾碧卿
作者简介:
姚博文(1997—),男,江西赣州人,硕士研究生,CCF会员,主要研究方向:自然语言处理、关系抽取基金资助:
Bowen YAO, Biqing ZENG(), Jian CAI, Meirong DING
Received:
2021-01-18
Revised:
2021-04-27
Accepted:
2021-04-29
Online:
2021-12-28
Published:
2021-12-10
Contact:
Biqing ZENG
About author:
YAO Bowen, born in 1997, M. S. candidate. His research interests include natural language processing, relation extraction.Supported by:
摘要:
关系抽取任务旨在从文本中抽取实体对之间的关系,是当前自然语言处理(NLP)领域的热门方向之一。针对中文人物关系抽取语料中语法结构复杂,无法有效学习文本语义特征的问题,提出一个基于预训练和多层次信息的中文人物关系抽取模型(CCREPMI)。该模型首先利用预训练模型较强的语义表征能力生成词向量,并将原始句子分成句子层次、实体层次和实体邻近层次分别进行特征提取,最终融合句子结构特征、实体含义以及实体与邻近词的依赖关系等信息进行关系分类预测。在中文人物关系数据集上的实验结果表明,该模型的精度达到81.5%,召回率达到82.3%,F1值达到81.9%,相比BERT和BERT-LSTM等基线模型有所提升。此外,该模型在SemEval2010-task8英文数据集上的F1值也达到了81.2%,表明它对英文语料具有一定的泛化能力。
中图分类号:
姚博文, 曾碧卿, 蔡剑, 丁美荣. 基于预训练和多层次信息的中文人物关系抽取模型[J]. 计算机应用, 2021, 41(12): 3637-3644.
Bowen YAO, Biqing ZENG, Jian CAI, Meirong DING. Chinese character relation extraction model based on pre-training and multi-level information[J]. Journal of Computer Applications, 2021, 41(12): 3637-3644.
参数描述 | 值 |
---|---|
批次大小 | 32 |
文本最大长度 | 85 |
学习率 | 5E-5 |
训练轮数 | 10 |
丢弃率 | 0.3 |
BiLSTM隐藏维度 | 768 |
BiLSTM层数 | 2 |
邻近词窗口长度 | 1 |
表1 超参数设置
Tab. 1 Hyperparameter setting
参数描述 | 值 |
---|---|
批次大小 | 32 |
文本最大长度 | 85 |
学习率 | 5E-5 |
训练轮数 | 10 |
丢弃率 | 0.3 |
BiLSTM隐藏维度 | 768 |
BiLSTM层数 | 2 |
邻近词窗口长度 | 1 |
实验环境 | 配置 |
---|---|
GPU | Tesla T4 |
操作系统 | Windows 10 |
开发语言 | Python3.6 |
深度学习框架 | Pytorch1.7 |
表2 实验环境
Tab. 2 Experiment environment
实验环境 | 配置 |
---|---|
GPU | Tesla T4 |
操作系统 | Windows 10 |
开发语言 | Python3.6 |
深度学习框架 | Pytorch1.7 |
模型 | 嵌入维度 | 精度/% | 召回率/% | F1值% |
---|---|---|---|---|
CCREPMI-BERT | 768 | 81.5 | 82.3 | 81.9 |
CCREPMI-BERT-wwm | 768 | 79.0 | 79.7 | 79.3 |
CCREPMI-ERNIE | 768 | 79.3 | 80.0 | 79.6 |
表3 不同预训练模型的结果对比
Tab. 3 Result comparison of different pre-trained models
模型 | 嵌入维度 | 精度/% | 召回率/% | F1值% |
---|---|---|---|---|
CCREPMI-BERT | 768 | 81.5 | 82.3 | 81.9 |
CCREPMI-BERT-wwm | 768 | 79.0 | 79.7 | 79.3 |
CCREPMI-ERNIE | 768 | 79.3 | 80.0 | 79.6 |
模型类别 | 模型 | 精度 | 召回率 | F1值 |
---|---|---|---|---|
基准模型 | CNN | 45.3 | 44.9 | 45.1 |
CRCNN | 52.1 | 46.1 | 48.9 | |
BiLSTM-Att | 58.3 | 57.6 | 57.9 | |
BERT-based | BERT | 72.5 | 73.7 | 73.0 |
BERT-LSTM | 73.3 | 74.3 | 73.7 | |
RBERT | 81.0 | 81.5 | 81.2 | |
本文模型 | CCREPMI-S | 80.6 | 81.2 | 80.6 |
CCREPMI-G | 81.1 | 81.9 | 81.5 | |
CCREPMI | 81.5 | 82.3 | 81.9 |
表4 不同模型的性能对比 ( %)
Tab. 4 Performance comparison of different models
模型类别 | 模型 | 精度 | 召回率 | F1值 |
---|---|---|---|---|
基准模型 | CNN | 45.3 | 44.9 | 45.1 |
CRCNN | 52.1 | 46.1 | 48.9 | |
BiLSTM-Att | 58.3 | 57.6 | 57.9 | |
BERT-based | BERT | 72.5 | 73.7 | 73.0 |
BERT-LSTM | 73.3 | 74.3 | 73.7 | |
RBERT | 81.0 | 81.5 | 81.2 | |
本文模型 | CCREPMI-S | 80.6 | 81.2 | 80.6 |
CCREPMI-G | 81.1 | 81.9 | 81.5 | |
CCREPMI | 81.5 | 82.3 | 81.9 |
模型 | F1值 |
---|---|
CNN | 78.9 |
MVRNN | 79.1 |
FCM | 80.6 |
CCREPMI | 81.2 |
表5 不同模型在英文数据集SemEval2010-task8上的实验结果对比 ( %)
Tab. 5 Results comparison of different models on English dataset SemEval2010-task8
模型 | F1值 |
---|---|
CNN | 78.9 |
MVRNN | 79.1 |
FCM | 80.6 |
CCREPMI | 81.2 |
1 | 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, Volume 1 (Long and Short Papers). Stroudsburg, PA: Association for Computational Linguistics, 2019: 4171-4186. 10.18653/v1/n19-1423 |
2 | RADFORD A, NARASIMHAN K, SALIMANS T.et al. Improving language understanding by generative pre-training[EB/OL]. [2020-09-07].. |
3 | SOCHER R, HUVAL B, MANNING C D, et al. Semantic compositionality through recursive matrix-vector spaces[C]// Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning. Stroudsburg, PA: Association for Computational Linguistics, 2012: 1201-1211. |
4 | ZENG D J, LIU K, LAI S W, et al. Relation classification via convolutional deep neural network[C]// Proceedings of the 25th International Conference on Computational Linguistics: Technical Papers. Stroudsburg, PA: Association for Computational Linguistics, 2014: 2335-2344. |
5 | SANTOS C N DOS, XIANG B, ZHOU B W. Classifying relations by ranking with convolutional neural networks[C]// Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics/ the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). Stroudsburg, PA: Association for Computational Linguistics, 2015: 626-634. 10.3115/v1/p15-1061 |
6 | XU Y, MOU L L, LI G, et al. Classifying relations via long short term memory networks along shortest dependency paths[C]// Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. Stroudsburg, PA: Association for Computational Linguistics, 2015: 1785-1794. 10.18653/v1/d15-1206 |
7 | LEE J, SEO S, CHOI Y S. Semantic relation classification via bidirectional LSTM networks with entity-aware attention using latent entity typing[J]. Symmetry, 2019, 11(6): No.785. 10.3390/sym11060785 |
8 | 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 Association for Computational Linguistics and the 4th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing. Stroudsburg, PA: Association for Computational Linguistics, 2009: 1003-1011. 10.3115/1690219.1690287 |
9 | LIN Y K, SHEN S Q, LIU Z Y, et al. Neural relation extraction with selective attention over instances[C]// Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg, PA: Association for Computational Linguistics, 2016: 2124-2133. 10.18653/v1/p16-1200 |
10 | PENG N Y, POON H, QUIRK C, et al. Cross-sentence n-ary relation extraction with graph LSTMs[J]. Transactions of the Association for Computational Linguistics, 2017, 5: 101-115. 10.1162/tacl_a_00049 |
11 | JI G L, LIU K, HE S Z, et al. Distant supervision for relation extraction with sentence-level attention and entity descriptions[C]// Proceedings of the 31st AAAI Conference on Artificial Intelligence. Palo Alto, CA: AAAI Press, 2017: 3060-3066. |
12 | LI Y, LONG G D, SHEN T, et al. Self-attention enhanced selective gate with entity-aware embedding for distantly supervised relation extraction[C]// Proceedings of the 34th AAAI Conference on Artificial Intelligence. Palo Alto, CA: AAAI Press, 2020: 8269-8276. 10.1609/aaai.v34i05.6342 |
13 | BANKO M, CAFARELLA M J, SODERLAND S, et al. Open information extraction from the Web[C]// Proceedings of the 20th International Joint Conference on Artificial Intelligence. Menlo Park, CA: AAAI Press, 2007: 2670-2676. 10.3115/1614164.1614177 |
14 | AKBIK A, LÖSER A. KrakeN: N-ary facts in open information extraction[C]// Proceedings of the 2012 Joint Workshop on Automatic Knowledge Base Construction and Web-scale Knowledge Extraction. Stroudsburg, PA: Association for Computational Linguistics, 2012: 52-56. |
15 | 王明波,王峥,邱秀连. 基于双向GRU和PCNN的人物关系抽取[J]. 电子设计工程, 2020, 28(10):160-165. 10.1109/access.2021.3078114 |
WANG M B, WANG Z, QIU X L. Character relationship extraction based on bidirectional GRU and PCNN[J]. Electronic Design Engineering, 2020, 28(10): 160-165. 10.1109/access.2021.3078114 | |
16 | 刘鉴,张怡,张勇. 基于双向LSTM和自注意力机制的中文关系抽取研究[J]. 山西大学学报(自然科学版), 2020, 43(1):8-13. |
LIU J, ZHANG Y, ZHANG Y. Chinese relationship extraction based on bidirectional LSTM and self-attention mechanism[J]. Journal of Shanxi University (Natural Science Edition), 2020, 43(1): 8-13 | |
17 | CUI Y M, CHE W X, LIU T, et al. Pre-training with whole word masking for Chinese BERT[EB/OL]. (2019-10-29) [2020-10-09]. . 10.1109/taslp.2021.3124365 |
18 | SUN Y, WANG S H, LI Y K, et al. ERNIE: enhanced representation through knowledge integration[EB/OL]. (2019-04-19) [2020-09-11].. |
19 | ZHOU P, SHI W, TIAN J, et al. Attention-based bidirectional long short-term memory networks for relation classification[C]// Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). Stroudsburg, PA: Association for Computational Linguistics, 2016: 207-212. 10.18653/v1/p16-2034 |
20 | SHI P, LIN J. Simple BERT models for relation extraction and semantic role labeling[EB/OL]. (2019-04-10) [2020-09-21].. |
21 | WU S C, HE Y F. Enriching pre-trained language model with entity information for relation classification[C]// Proceedings of the 28th ACM International Conference on Information and Knowledge Management. New York: ACM, 2019: 2361-2364. 10.1145/3357384.3358119 |
[1] | 潘烨新, 杨哲. 基于多级特征双向融合的小目标检测优化模型[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2871-2877. |
[2] | 帅奇, 王海瑞, 朱贵富. 基于双向对比训练的中文故事结尾生成模型[J]. 《计算机应用》唯一官方网站, 2024, 44(9): 2683-2688. |
[3] | 赵宇博, 张丽萍, 闫盛, 侯敏, 高茂. 基于改进分段卷积神经网络和知识蒸馏的学科知识实体间关系抽取[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2421-2429. |
[4] | 薛凯鹏, 徐涛, 廖春节. 融合自监督和多层交叉注意力的多模态情感分析网络[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2387-2392. |
[5] | 李晨阳, 张龙, 郑秋生, 钱少华. 基于扩散序列的多元可控文本生成[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2414-2420. |
[6] | 张全梅, 黄润萍, 滕飞, 张海波, 周南. 融合异构信息的自动国际疾病分类编码方法[J]. 《计算机应用》唯一官方网站, 2024, 44(8): 2476-2482. |
[7] | 刘瑞华, 郝子赫, 邹洋杨. 基于多层级精细特征融合的步态识别算法[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2250-2257. |
[8] | 陆潜慧, 张羽, 王梦灵, 吴庭伟, 单玉忠. 基于改进循环池化网络的核电装备质量文本分类模型[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2034-2040. |
[9] | 毛典辉, 李学博, 刘峻岭, 张登辉, 颜文婧. 基于并行异构图和序列注意力机制的中文实体关系抽取模型[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2018-2025. |
[10] | 唐媛, 陈艳平, 扈应, 黄瑞章, 秦永彬. 基于多尺度混合注意力卷积神经网络的关系抽取模型[J]. 《计算机应用》唯一官方网站, 2024, 44(7): 2011-2017. |
[11] | 于右任, 张仰森, 蒋玉茹, 黄改娟. 融合多粒度语言知识与层级信息的中文命名实体识别模型[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1706-1712. |
[12] | 刘越, 刘芳, 武奥运, 柴秋月, 王天笑. 基于自注意力机制与图卷积的3D目标检测网络[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1972-1977. |
[13] | 刘耀, 李雨萌, 宋苗苗. 基于业务流程的认知图谱[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1699-1705. |
[14] | 赵征宇, 罗景, 涂新辉. 基于多粒度语义融合的信息检索方法[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1775-1780. |
[15] | 魏超, 陈艳平, 王凯, 秦永彬, 黄瑞章. 基于掩码提示与门控记忆网络校准的关系抽取方法[J]. 《计算机应用》唯一官方网站, 2024, 44(6): 1713-1719. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||