Multi-Granularity Hierarchical Attention Fusion Networks for Reading Comprehension机器阅读理解论文笔记

28 篇文章 3 订阅
26 篇文章 1 订阅

《Multi-Granularity Hierarchical Attention Fusion Networks for Reading Comprehension and Question Answering》

这篇文章是发表在2018年ACL上的,在SQuAD以及TriviaQA和SQuAD噪音数据集上得到了SOTA效果。

分以下四部分介绍:

  • Motivation
  • Model
  • Experiment
  • Discussion

1、Motivation

1、想法来源于人的思考过程。
First, people scan through the whole passage
Then with the question in mind, people make connection between passage and question, a rough answer span is then located from the passage(co-attention + self-attention + fusion)
Finally, to prevent from forgetting the question, people come back to the question and select a best answer(Bi-Linear Match)

2、在先前的模型中,BI-DAFMATCH-LSTM等获得question-awared passage representation之后,都在此基础上进去抽取,即使有DCN-Net 融合了文档的原始信息,也只是简单地concatenate,作者认为 the original representation and the aligned representation via attention can reflect the content semantics in different granularities.
Apply a particular fusion function after each attention function,so that different levels of semantics can be better incorporated.

2、Model

2.1 overview

输入:

  • 文档序列
  • 问题序列

输出:

  • 抽取的答案块
    在这里插入图片描述

2.2 Language Model & Encoder Layer

对于词向量的是glove,对于字符向量用的是elmo语言模型,为了使用上下文的信息,通过一个双向LSTM捕获时序信息。随后得到输出之后,再将字符向量进行连接,这里可以视为一个不同级别的词表示之间的残差网络[1]。
在这里插入图片描述

2.3 Hierarchical Attention & Fusion Layer

We propose a hierarchical attention structure by combining the co-attention and self-attention mechanism in a multi-hop style.

2.3.1 Co-attention & Fusion

矩阵S计算 shallow semantic similarity:
在这里插入图片描述
使用这一部的得分分别对行和列去进行归一化,然后再去做加权求和,得到融合问题的文档表示和融合文档的问题表示。

文档中的每个词和问题当中的所有词的得分:
在这里插入图片描述
在这里插入图片描述
t表示的是文档中的某一时刻词,j表示的是某一时刻的问题中的词。

同理可得到融入了文档信息的问题的表示:
在这里插入图片描述
此时我们使用一个特殊的融合单元,融合了原始的信息以及对齐后的表示,fusion kernel,可以有好几种形式,其中最简单的就是连接或者是相加,然后再加上线性或非线性变换。
在这里插入图片描述
在这里插入图片描述
考虑到原始上下文表示的重要性,引入一个门机制,将对齐的上下文表示和原始上下文表示进行融合。得到最终表示。
在这里插入图片描述
为了在不同粒度上,捕获表示之间的关系,设计了三种门函数
Scalar-based Fusion:
在这里插入图片描述
Vector-based Fusion:
在这里插入图片描述
Matrix-based Fusion:
在这里插入图片描述

2.3.2 Self-attention & Fusion

想法借鉴于这篇文章[2],关于推荐系统的,比如加入了国家信息,地理位置信息,时间信息还有APP的历史数据信息等。这里为了更好的阅读表示,手工特征(词级别的手工特征)也被加入。
在这里插入图片描述
在这一层当中我们单独去考虑问题和文档的语义表示。我们使用self attention,以便保留下全局序列信息,还能解决长距离依赖问题。
To allow for more freedom of the aligning process, we introduce a bilinear self-alignment attention function on the passage representation:
在这里插入图片描述
再过一个fusion function:
在这里插入图片描述
Finally, a bidirectional LSTM:
在这里插入图片描述
对于问题考虑到问题比较短,采用线性变换去对问题表示编码。首先把问题通过一个双向LSTM,然后使用一个线性的自对齐方式,再通过加权求和得到最后问题的表示。
在这里插入图片描述
在这里插入图片描述

2.4 Model & Output Layer

不像之前只通过文章的表示去预测开始和起始位置,我们在顶部用一个双线性匹配的函数去捕获文档D’'和问题q之前潜在的关系,which actually works as a multi-hop matching mechanism(这句话并不是很懂)
在这里插入图片描述
这样用的就不是指针网络了,但是效果还很好,文章后面说:
The output layer is application-specific, in MRC task, we use pointer networks to predict the start and end position of the answer, since it requires the model to find the sub-phrase of the passage to answer the question.

训练时:
在这里插入图片描述

3、Experiment

1、The proposed SLQA+ ensemble model achieves an EM score of 82.4 and F1 score of 88.6
在这里插入图片描述
2、Study the robustness of the proposed model
在这里插入图片描述
In the dataset, one or more sentences are appended to the original SQuAD context, aiming to mislead the trained models.

3、on the ablation, the bi-linear alignment plus fusion between passage and question is most critical
在这里插入图片描述
The reason may be that in top-level attention layer, the similar semantics between question and passage are strong evidence to locate the correct answer span.(这个解释觉得还是比较牵强,而且效果降了这么多,不理解)

4、关于fusion kernel,the vector-based fusion method performs best
原因可能是标量过于简单,矩阵又过于复杂,而向量正好较为合适
在这里插入图片描述

5、do the experiments on four common attention functions
在这里插入图片描述
bilinear attention which add ReLU after linearly transforming do the best

4、Discussion

优点:

  • 用了一个层级的attention,并且在每次attention之后加了一个fusion去融合信息表示。
  • 在输出层是使用双线性匹配函数,从实验结果来看效果很好。
  • 增加了ELMo字符向量信息

改进点:

  • 输出层不直接得到概率分布,而是使用融合信息后的表达再加上PGnet预测
  • 可以迁移到DuReader的数据集看看效果是否鲁棒

[1] Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018
[2] Heng-Tze Cheng, Levent Koc, Jeremiah Harmsen, Tal
Shaked, Tushar Chandra, Hrishi Aradhye, Glen Anderson, Greg Corrado, Wei Chai, Mustafa Ispir, et al. 2016. Wide & deep learning for recommender systems. In Proceedings of the 1st Workshop on Deep Learning for Recommender Systems

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

彭伟_02

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
>