《BI-DIRECTIONAL ATTENTION FLOW FOR MACHINE COMPREHENSION》
Introduction
这篇论文也是比较经典的一篇,时间相对早期,发在2017ICLR。和另一篇论文《Machine Comprehension Using Match-LSTM and Answer Pointer》同期发表在该期刊上。
BiDAF用了层级的结构来表示不同粒度的表达(现在看起来该层级结构很简单),使用了双向Attention流,并且没有过早的压缩向量,损失信息(即对hidden state做加权求和)。
这里主要对文章不理解的地方做几点解释:
1、dynamic attention:解码一个词算一个attention,即传统NMT中的attention解码过程。
e t j = f ( h j , s t − 1 ) e_{tj} = f(h_j, s_{t-1}) etj=f(hj,st−1), s t = f ( s t − 1 , c t , y t − 1 ) s_t = f(s_{t-1}, c_t, y_{t-1}) st=f(st−1,ct,yt−1) , c t + 1 c_{t+1} ct+1依赖于 s t s_t st, s t s_t st又依赖 c t c_t ct,那么 c t + 1 c_{t+1} ct+1依赖于 c t c_t ct
而这篇文章是passage对question一次性做完attention,并不依赖于解码出前一个时刻然后在进行。
2、memory-less attention:即上,passage对question一次性做完attention,并不依赖于解码出前一个时刻然后在进行。
文章说这个的好处是使得attention不会受到之前的错误累计的影响。
还说到“leads to the division of labor between the attention layer and the modeling layer. ”不太理解。
问题是,之后的R-net提出的attention的计算方式就是在解码 s t s_t st 的时候考虑了 c t − 1 c_{t-1} ct−1。效果还比较好。
3、summarize the context paragraph into a fixed-size vector:即对hidden state做加权求和,这篇文章并没有对passage压缩(但是C2Q对question压缩了)成一个向量。(即使Q2C矩阵对passage进行了压缩,可是又平铺了len(passage),得到 H ′ H' H′)
Model
模型可以对照着看,还是比较好理解的。最后的表示由三个部分的来源,Encoder的上下文表示,Decoder的前文表示以及passage本身的表示。然后concatenate过LSTM+指针网络输出起止位置。
Experiment
Question
1、memory-less attention——“leads to the division of labor between the attention layer and the modeling layer. ”
不太理解。