题名 | 基于 Attention 机制的短文本相似度计算 |
其他题名 | SIMILARITY CALCULATION OF SHORT TEXT BASED ON ATTENTION MECHANISM
|
姓名 | |
学号 | 11849384
|
学位类型 | 硕士
|
学位专业 | 应用统计
|
导师 | 李昕
|
论文答辩日期 | 2020-05-30
|
论文提交日期 | 2020-07-20
|
学位授予单位 | 哈尔滨工业大学
|
学位授予地点 | 深圳
|
摘要 | 文本相似度,即文本间语义的相似程度,并以此判断不同文本间是否表达 相同的语义。文本相似度,在智能客服、智能语音、搜索引擎、推荐系统等领 域具有广泛的应用。文本相似度计算有较长的研究历史,最初的方法都是基于 文本的统计信息,这类方法原理简单、易于实现,然而早期的方法无法准确理 解文本的语义信息。随着深度学习技术的成熟,大量神经网络模型被用于计算 文本相似度,并取得了良好的效果。 本文是基于中文的文本相似度计算,目前,该领域基于中文数据的文献相 对稀缺。同时本文聚焦于短文本,这类文本,内容短小,特征不明显,并且中 文存在着词兼类、分词等一些列的问题,也会影响文本匹配的结果。本文设计 了 BiGRU+Attention 机 制 的 模 型 , 用 于 计 算 中 文 文 本 相 似 度 , 旨 在 证 明 Attention 机 制 对 于 文 本 相 似 度 任 务 的 提 升 作 用 。 模 型 的 主 体 框 架 是 Encoder-Decoder,而 BiGRU 模型作为该框架两端的基础模型,能够解决长序列 依赖问题,并且能很好的捕捉双向语义信息,再配合 Attention 机制,可以提 升文本相似度任务的正确率。该模型中会适当的加入 Batch Normalization 层 和 Dropout 层,以提高模型收敛能力,防止过拟合。并采取 Attention 增强操 作,增强 Decoder 层的信息推导能力。 本文总共使用了四个数据集,并进行了四项实验,前三项实验都是基于 ATEC 比赛数据集,该数据包含 102477 条样本。由于该数据集正负样本分布不均衡, 实验采用 F1 Score 去衡量模型对于文本相似度任务的表现。由于样本不均衡对 模型的实验结果影响较大,为了尽可能消除样本不均衡的影响,后续实验在模 型的损失函数中调整了正负样本的权重,并改变了模型打标签的标准。实验结 果表明,一定程度上消除样本不均衡的影响,能显著的提高模型的泛化能力。 随后在词水平(word level)和字符水平(char level)分别建立模型,对比 模型的性能。实验结果显示,样本权重经过调整后,词水平和字符水平上,模 型泛化效果相差不大。 第四个实验是在其余三个数据集上进行的,这三个数据集是自然语言推断 常用数据集的汉化版。本文将所设计的模型与业界常用模型作对比,并列出了 模型训练所需的时间。实验结果显示,本文模型除了与 BERT 微调后的模型有一 定差距,与其他业界模型并无明显差别,同时能够更快的收敛。 |
其他摘要 | Text similarity is the degree of semantic similarity between texts. It’s used to evaluate whether different texts express the same semantic information. Text similarity calculation has a wide range of applications in the fields of intelligent customer service, search engines, and recommendation systems. Text similarity calculation has a long research history. The original method was based on the statistical information of the text. However, early methods could not accurately understand the semantic information of the text. Subsequently, people proposed to use deep learning methods to calculate similarity and achieved good performance. At present, most of the relevant references that use deep learning methods to calculate text similarity are based on English texts. The references that do Chinese text similarity calculations are relatively scarce. This paper designs a model of BiGRU + Attention mechanism, which is used to calculate the similarity of Chinese short text. The main framework of the model is Encoder-Decoder. The BiGRU model as the basic model at both ends of the framework can solve the problem of long-sequence dependence, and can well capture bidirectional semantic information. Add the attention mechanism to the model to improve the accuracy of text similarity tasks. In this model, the Batch Normalization layer and the Dropout layer will be added appropriately to improve the model convergence ability and prevent overfitting. Some methods will be taken to enhance the attention to boost the inference ability of the Decoder layer In this paper, a total of four data sets are used and four experiments are conducted. The first three experiments are based on the ATEC competition data set. Due to the uneven distribution of positive and negative samples, this experiment uses the F1 Score to compare the generalization ability of different models. In order to eliminate the effect of sample imbalance as much as possible, the weights of positive and negative samples are adjusted in the loss function. The experimental results show that after the sample weights are adjusted, the model generalization ability is greatly improved. Meanwhile, the model generalization effect is not much different at the word level and character level. The fourth experiment was carried out on the remaining three datasets. This article compares the designed model with commonly used models in the industry and lists the time required for model training. Experimental results show that the model in this paper can converge faster than other models. |
关键词 | |
其他关键词 | |
语种 | 中文
|
培养类别 | 联合培养
|
成果类型 | 学位论文 |
条目标识符 | http://sustech.caswiz.com/handle/2SGJ60CL/142638 |
专题 | 创新创业学院 |
作者单位 | 南方科技大学 |
推荐引用方式 GB/T 7714 |
余钊. 基于 Attention 机制的短文本相似度计算[D]. 深圳. 哈尔滨工业大学,2020.
|
条目包含的文件 | ||||||
文件名称/大小 | 文献类型 | 版本类型 | 开放类型 | 使用许可 | 操作 | |
基于Attention机制的短文本相似度(1834KB) | -- | -- | 限制开放 | -- | 请求全文 |
个性服务 |
原文链接 |
推荐该条目 |
保存到收藏夹 |
查看访问统计 |
导出为Endnote文件 |
导出为Excel格式 |
导出为Csv格式 |
Altmetrics Score |
谷歌学术 |
谷歌学术中相似的文章 |
[余钊]的文章 |
百度学术 |
百度学术中相似的文章 |
[余钊]的文章 |
必应学术 |
必应学术中相似的文章 |
[余钊]的文章 |
相关权益政策 |
暂无数据 |
收藏/分享 |
|
除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。
修改评论