APP下载

基于BERT的短文本相似度判别模型

2021-04-13方子卿陈一飞

电脑知识与技术 2021年5期

方子卿 陈一飞

摘要:短文本的表示方法和特征提取方法是自然语言处理基础研究的一个重要方向,具有广泛的应用价值。本文提出了BERT_BLSTM_TCNN模型,该神经网络模型利用BERT的迁移学习,并在词向量编码阶段引入对抗训练方法,训练出包括句的语义和结构特征的且泛化性能更优的句特征,并将这些特征输入BLSTM_TCNN层中进行特征抽取以完成对短文本的语义层面上的相似判定。在相关数据集上的实验结果表明:与最先进的预训练模型相比,该模型在有着不错的判定准确率的同时还有参数量小易于训练的优点。

关键词:词向量模型;自然语言处理;短文本相似度;卷积神经网络;循环神经网络

Abstract: Short text representation methods and feature extraction methods are an important direction of basic research in natural language processing, and have a wide range of applications. This paper proposes the BERT_BLSTM_TCNN model. The neural network model uses BERT's transfer learning and introduces an adversarial training method in the word vector encoding stage to train sentence features that include the semantic and structural features of the sentence and have better generalization performance, and combine these The feature is input into the BLSTM_TCNN layer for feature extraction to complete the similarity determination on the semantic level of the short text. The experimental results on the relevant data set show that: compared with the most advanced pre-training model, this model has a good judgment accuracy rate and also has the advantages of small parameters and easy training.

Key words: word embedding model; natural language processing; short text similarity; convolutional neural networks; recurrent neural networks

近些年來随着个人计算机的普及和各种网络信息技术的快速进步,数字化的文本数量也随之呈现爆炸式的增长。其中很大一部分是短文本,如微信、微博等社交网络上的信息和博文、京东、淘宝等网络商城上关于出售商品的评价、电子政务平台里的群众意见反馈等。虽然数据量的激增对现行的信息处理系统是一种挑战,但大数据的出现也使得新方法的研究成为可能。如何将这些语料资源进行筛选分类,使之成为有用的、真正有价值的素材,成为最需要解决的核心问题。文本的相似度判定是自然语言处理领域中的一个基础任务,研究准确快速的相似度判定方法对信息的初步筛选分类和更进一步的处理都有重大意义。

文本相似度判定可以被看成是一种特殊的文本分类任务,即一个二分类(相似或者不相似)问题。……

登录APP查看全文