计算机科学 ›› 2021, Vol. 48 ›› Issue (5): 247-253.doi: 10.11896/jsjkx.200800181

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

基于BERT和对抗训练的食品领域命名实体识别

董哲, 邵若琦, 陈玉梁, 翟维枫   

  1. 北方工业大学电气与控制工程学院 北京100144
  • 收稿日期:2020-08-27 修回日期:2020-10-16 出版日期:2021-05-15 发布日期:2021-05-09
  • 通讯作者: 董哲(dongzhe@ncut.edu.cn)
  • 基金资助:
    国家重点研发计划课题(2018YFC1602703);国家自然科学基金(61873006)

Named Entity Recognition in Food Field Based on BERT and Adversarial Training

DONG Zhe, SHAO Ruo-qi, CHEN Yu-liang, ZHAI Wei-feng   

  1. School of Electrical and Control Engineering,North China University of Technology,Beijing 100144,China
  • Received:2020-08-27 Revised:2020-10-16 Online:2021-05-15 Published:2021-05-09
  • About author:DONG Zhe,born in 1981,associate professor,is a member of China Computer Federation.His main research interests include machine learning,embedded operating system and networked control system.
  • Supported by:
    National Key R&D Program Project(2018YFC1602703) and National Natural Science Foundation of China(61873006).

摘要: 为了在食品领域从非结构化语料中抽取出有效的实体信息,提出了一种基于BERT(Bidirectional Encoder Representations from Transformers)和对抗训练的命名实体识别(Named Entity Recognition,NER)的方法。命名实体识别是一种典型的序列标注问题。目前,深度学习方法已经被广泛应用于该任务并取得了显著的成果,但食品领域等特定领域中的命名实体识别存在难以构建大量样本集、专用名词边界识别不准确等问题。针对这些问题,文中利用BERT得到字向量,以丰富语义的表示;并引入对抗训练,在有效防止中文分词任务私有信息的噪声的基础上,利用中文分词(Chinese Word Segmentation,CWS)和命名实体识别的共享信息来提高识别实体边界的精确率。在两类领域的语料上进行实验,这两类领域分别是中文食品安全案例和人民日报新闻。其中,中文食品安全案例用于训练命名实体识别任务,人民日报新闻用于训练中文分词任务。使用对抗训练来提高命名实体识别任务中实体(包括人名、地名、机构名、食品名称、添加剂名称)识别的精确度,实验结果表明,所提方法的精确率、召回率和F1值分别为95.46%,89.50%,92.38%,因此在食品领域边界不显著的中文命名实体识别任务上,该方法的了F1值得到提升。

关键词: BERT, BiLSTM, 对抗训练, 命名实体识别, 食品领域

Abstract: Aiming at extracting effective entity information from unstructured corpus in the field of food safety,a named entity recognition (NER) method based on BERT (Bidirectional Encoder Representations from Transformers) and adversarial training is proposed.NER is a typical sequence labeling problem.At present,deep learning methods have been widely used in this task and have achieved remarkable results.However,there are problems such as difficulty in constructing a large number of sample sets for NER in specific fields like the food field,and inaccurate recognition of proper noun boundaries.To solve these problems,BERT is used to get the word vector,which enriches the semantic representation.To optimize the NER task,adversarial training is introduced,which not only uses the shared information obtained from task training of Chinese word segmentation (CWS) and NER,but also prevents the private information of CWS task from generating noise.The experiment is based on the corpus of two categories,which are Chinese food safety cases and People's Daily news respectively.Among them,the Chinese food safety cases data set is used to train the NER task,and the “People's Daily” news data set is used to train the CWS task.We use adversarial trainingto improve the precision of the NER task for entity recognition (including name,location,organization,food name and additive).Experimental results show that the proposed method's Precision rate,Recall rate and F1 score are 95.46%,89.50% and 92.38% respectively.Therefore,this method has a high F1 score for Chinese NER task,where the boundary of a specific domain is indistinct.

Key words: Adversarial training, BERT, BiLSTM, Food field, Named entity recognition

中图分类号: 

  • TP181
[1]WU H,LV L,YU B H.Chinese Named Entity RecognitionBased on Transfer Learning and BiLSTM-CRF[J].Journal of Chinese Mini-Micro Computer Systems,2019,40(6):1142-1147.
[2]JIA Y,XU X.Chinese Named Entity Recognition Based onCNN-BiLSTM-CRF[C]//2018 IEEE 9th International Conference on Software Engineering and Service Science (ICSESS).Beijing,China,2018:1-4.
[3]CAI X,DONG S,HU J.A deep learning model incorporating part of speech and self-matching attention for named entity recognition of Chinese electronic medical records[J].BMC Medical Informatics and Decision Making,2019,19(S2):102-109.
[4]PENG N Y,MARK D.Improving named entity recognition for chinese social media with word segmentation representation learning[J].arXiv:1603.00786.
[5]CHEN P H,LIN C J,SCHLKOPF B.A Tutorial on ν-support vector machines[J].Applied Stochastic Models in Business and Industry,2005,21(2):111-136.
[6]ZHOU G,SU J.Named Entity Recognition using an HMM-based Chunk Tagger[C]//Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics.Philadelphia,PA,USA,2002.
[7]LAFFERTY J,MCCALLUM A,PEREIRA F C N.Conditional Random Fields:Probabilistic Models for Segmenting and Labeling Sequence Data[C]//Proceedings of the 18th International Conference on Machine Learning (ICML 2001).2001:282-289.
[8]HUANG Z,XU W,YU K.Bidirectional LSTM-CRF Models for Sequence Tagging[J].2015,arXiv:1508.01991.
[9]ZHANG J F,ZHANG Z S,WANG J,et al.Design of named entity recognition framework based on BLSTM-CRF in Chinese domain[J].Computing Technology and Automation,2019,38(3):117-121.
[10]ZHANG Y,YANG J.Chinese NER Using Lattice LSTM[C]//Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Long Papers).2018:1554-1564.
[11]ZHONG Q,TANG Y.An Attention-Based BILSTM-CRFfor Chinese Named Entity Recognition[C]//2020 IEEE 5th International Conference on Cloud Computing and Big Data Analytics (ICCCBDA).2020:550-555.
[12]MIKOLOV T,CHEN K,CORRADO G,et al.Efficient Estimation of Word Representations in Vector Space[J].2013,arXiv:1301.3781.
[13]XU G,MENG Y,ZHOU X,et al.Chinese Event DetectionBased on Multi-feature Fusion and BiLSTM[J].IEEE Access,2019(99):1-1.
[14]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.2019:4171-4186.
[15]CHEN X,SUN Y,ATHIWARATKUN B,et al.AdversarialDeep Averaging Networks for Cross-Lingual Sentiment Classification[J].Transactions of the Association for Computational Linguistics,2018,6:557-570.
[16]YANG Y S,ZHANG M S,CHEN W L,et al.Adversarial learning for chinese ner from crowd annotations[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2018.
[17]SHUI L C,LIU W Z,FENG Z M.Automatic image annotation based on generative confrontation network[J].Journal of Computer Applications,2019,39(7):2129-2133.
[18]BOUSMALIS K,TRIGEORGIS G,SILBERMAN N,et al.Domain separation networks[C]//Proceedings of the 30th International Conference on Neural Information Processing Systems.2016:343-35.
[19]YANG H M,LI L,YANG R D,et al.Recognition model ofnamed entities in electronic medical records based on two-way LSTM neural network[J].Journal of Clinical Rehabilitative Tissue Engineering Research,2018,22(20):3237-3242.
[20]SHEN L X,ZOU B W,YE J,et al.Negative focus recognition based on two-way LSTM and CRF fusion model[J].Journal of Chinese Information Processing,2019,33(1):25-34.
[21]LI J Y,YANG F.Text-level machine translation based on joint attention mechanism[J].Journal of Chinese Information Processing,2019,33(12):45-53.
[22]GRAVES A,JüRGEN S.Framewise phoneme classification with bidirectional LSTM and other neural network architectures[J].Neural Networks,2005,18(5/6):602-610.
[23]XU F,SONG Y H.Research on named entity recognition under massive food safety incidents[J].Science Research Management,2018,39(7):131-138.
[1] 于家畦, 康晓东, 白程程, 刘汉卿.
一种新的中文电子病历文本检索模型
New Text Retrieval Model of Chinese Electronic Medical Records
计算机科学, 2022, 49(6A): 32-38. https://doi.org/10.11896/jsjkx.210400198
[2] 杜晓明, 袁清波, 杨帆, 姚奕, 蒋祥.
军事指控保障领域命名实体识别语料库的构建
Construction of Named Entity Recognition Corpus in Field of Military Command and Control Support
计算机科学, 2022, 49(6A): 133-139. https://doi.org/10.11896/jsjkx.210400132
[3] 康雁, 吴志伟, 寇勇奇, 张兰, 谢思宇, 李浩.
融合Bert和图卷积的深度集成学习软件需求分类
Deep Integrated Learning Software Requirement Classification Fusing Bert and Graph Convolution
计算机科学, 2022, 49(6A): 150-158. https://doi.org/10.11896/jsjkx.210500065
[4] 余本功, 张子薇, 王惠灵.
一种融合多层次情感和主题信息的TS-AC-EWM在线商品排序方法
TS-AC-EWM Online Product Ranking Method Based on Multi-level Emotion and Topic Information
计算机科学, 2022, 49(6A): 165-171. https://doi.org/10.11896/jsjkx.210400238
[5] 徐国宁, 陈奕芃, 陈一鸣, 陈晋音, 温浩.
基于约束优化生成式对抗网络的数据去偏方法
Data Debiasing Method Based on Constrained Optimized Generative Adversarial Networks
计算机科学, 2022, 49(6A): 184-190. https://doi.org/10.11896/jsjkx.210400234
[6] 闫萌, 林英, 聂志深, 曹一凡, 皮欢, 张兰.
一种提高联邦学习模型鲁棒性的训练方法
Training Method to Improve Robustness of Federated Learning
计算机科学, 2022, 49(6A): 496-501. https://doi.org/10.11896/jsjkx.210400298
[7] 郭雨欣, 陈秀宏.
融合BERT词嵌入表示和主题信息增强的自动摘要模型
Automatic Summarization Model Combining BERT Word Embedding Representation and Topic Information Enhancement
计算机科学, 2022, 49(6): 313-318. https://doi.org/10.11896/jsjkx.210400101
[8] 刘凯, 张宏军, 陈飞琼.
基于领域适应嵌入的军事命名实体识别
Name Entity Recognition for Military Based on Domain Adaptive Embedding
计算机科学, 2022, 49(1): 292-297. https://doi.org/10.11896/jsjkx.201100007
[9] 羊洋, 陈伟, 张丹懿, 王丹妮, 宋爽.
对抗攻击威胁基于卷积神经网络的网络流量分类
Adversarial Attacks Threatened Network Traffic Classification Based on CNN
计算机科学, 2021, 48(7): 55-61. https://doi.org/10.11896/jsjkx.210100095
[10] 程思伟, 葛唯益, 王羽, 徐建.
BGCN:基于BERT和图卷积网络的触发词检测
BGCN:Trigger Detection Based on BERT and Graph Convolution Network
计算机科学, 2021, 48(7): 292-298. https://doi.org/10.11896/jsjkx.200500133
[11] 王丹妮, 陈伟, 羊洋, 宋爽.
基于高斯增强和迭代攻击的对抗训练防御方法
Defense Method of Adversarial Training Based on Gaussian Enhancement and Iterative Attack
计算机科学, 2021, 48(6A): 509-513. https://doi.org/10.11896/jsjkx.200800081
[12] 陈明豪, 祝跃飞, 芦斌, 翟懿, 李玎.
基于Attention-CNN的加密流量应用类型识别
Classification of Application Type of Encrypted Traffic Based on Attention-CNN
计算机科学, 2021, 48(4): 325-332. https://doi.org/10.11896/jsjkx.200900155
[13] 张栋, 陈文亮.
基于上下文相关字向量的中文命名实体识别
Chinese Named Entity Recognition Based on Contextualized Char Embeddings
计算机科学, 2021, 48(3): 233-238. https://doi.org/10.11896/jsjkx.191200074
[14] 余诗媛, 郭淑明, 黄瑞阳, 张建朋, 苏珂.
嵌套命名实体识别研究进展
Overview of Nested Named Entity Recognition
计算机科学, 2021, 48(11A): 1-10. https://doi.org/10.11896/jsjkx.201100165
[15] 陈德, 宋华珠, 张娟, 周泓林.
融合BERT和记忆网络的实体识别
Entity Recognition Fusing BERT and Memory Networks
计算机科学, 2021, 48(10): 91-97. https://doi.org/10.11896/jsjkx.200900015
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!