基于深度学习的机器阅读理解系统

 2022-05-22 08:05

论文总字数:50209字

摘 要

自然语言处理是人工智能领域中极其重要的一个分支,其最终目的是使得机器能够理解人类的自然语言。在自然语言处理领域中,机器阅读理解这一任务具有重要意义。近年来,深度学习被广泛应用于自然语言处理领域,并取得了巨大成功。

基于斯坦福问答数据集,本文构建了一个基于深度学习的机器阅读理解系统,其可以基于给定的文章与问题首先判断问题是否可回答,然后对于可回答的问题在文章中找到相应的答案。在该系统中,首先设计了一个机器阅读理解模型:CovedaNet,并以该模型为核心,设计了数据预处理模块、答案预测模块等功能模块。

对于该机器阅读理解模型,首先,构建了一个主模型用于同时预测问题的可回答性与答案区间,其中设计了一个注意力表示提取层用于对问题与文章之间的关系进行显示建模。接着,对于训练数据,使用数据增广技术增加训练集样本量,在平衡不同问题类别的样本数量的同时,将更多先验知识引入模型。最后,引入了验证机制,通过训练专门的验证模型对主模型已给出的预测结果进行进一步验证与更新,进一步提高了模型性能。本文中所设计的模型在斯坦福问答数据集的验证集上达到了EM 80.696与F1 83.527的评测得分。

关键词:深度学习,自然语言处理,机器阅读理解,注意力机制

Abstract

Natural Language Processing (NLP) is an extremely important branch in the field of Artificial Intelligence (AI). The ultimate goal is that machines can understand human natural language. In the field of natural language processing, the task of machine reading comprehension is of great significance. In recent years, deep learning has been widely used in the field of natural language processing and has achieved great success.

In this paper, based on the Stanford Question Answering Dataset (SQuAD), a machine learning comprehension system based on deep learning technologies is constructed, which can judge whether the question can be answered based on a given context and question, and find corresponding answer spans in the text for the answerable questions. In this system, a machine reading comprehension model: CovedaNet is designed, around which some functional modules such as the data preprocessing module and the answer prediction module are further designed.

For the machine reading comprehension model, a main model is firstly constructed to simultaneously predict whether a question is answerable and its answer span in the context, and a co-attention layer is further designed to explicitly model the relationship between the question and the context. For the training data, data augmentation technology is used to increase the sample size of the training set, and to introduce more prior knowledge into the model while balancing the number of samples in different question categories. Finally, a verification mechanism is introduced to further improve the model performance by training a verification model, which could verify and update the prediction results of the main model. The model designed in this paper achieved the scores of EM 80.696 and F1 83.527 on the development dataset of SQuAD 2.0.

KEY WORDS: Deep Learning, Natural Language Processing, Machine Reading Comprehension, Attention Mechanism

目 录

第一章 绪论 1

1.1 背景与意义 1

1.2 相关工作现状 2

1.2.1 自然语言处理相关工作现状 2

1.2.2 机器阅读理解相关工作现状 2

1.2.3 深度学习相关工作现状 5

1.3 主要工作内容 6

1.4 论文组织结构 7

第二章 相关理论和技术 8

2.1 词向量 8

2.1.1 One-hot 表示 8

2.1.2 分布式表示 8

2.2 循环神经网络(RNN)与长短期记忆神经网络(LSTM) 9

2.2.1循环神经网络 9

2.2.2长短期记忆神经网络 11

2.3 注意力机制 12

2.3.1 注意力机制概述 12

2.3.2 自注意力机制 13

2.4 预训练模型 13

2.4.1 概述 13

2.4.2 BERT 14

2.5本章小结 15

第三章 基于深度学习的机器阅读理解模型设计 16

3.1 基准模型设计 16

3.1.1 BERT预训练层 16

3.1.2 线性输出层 17

3.2 CovedaNet 模型设计 18

3.2.1 模型总体框架设计 18

3.2.2 数据增广 19

3.2.3 主模型网络结构设计 20

3.2.3 分类模型网络结构设计 23

3.2.4 验证机制 24

3.3 相关实验 28

3.3.1 SQuAD 数据集 28

3.3.2 实验评价指标 32

3.3.3 基准模型实验 32

3.3.4 CovedaNet 模型实验 33

3.4 本章小结 36

第四章 基于深度学习的机器阅读理解系统的设计与实现 37

4.1需求分析 37

4.2系统总体设计 37

4.2.1 系统架构设计 37

4.2.2 系统功能模块设计 39

4.2.3 系统并行处理机制设计 40

4.3系统详细设计 40

4.3.1 数据预处理模块设计 40

4.3.2 答案预测模块设计 42

4.3.3 结果可视化展示设计 42

4.4系统实现与测试 43

4.4.1 系统开发环境与实现工具 43

4.4.2 系统实现 44

4.4.3 系统测试 46

4.5 本章小结 49

第五章 总结与展望 50

5.1本文工作总结 50

5.2未来工作展望 50

参考文献 51

致谢 53

剩余内容已隐藏,请支付后下载全文,论文总字数:50209字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;