RE2 - Simple and Effective Text Matching with Richer Alignment Features
这篇论文来自阿里,19年的ACL论文。《Simple and Effective Text Matching with Richer Alignment Features》:https://arxiv.org/abs/1908.00300
Intro
很多深层网络只拥有一层alignment layer,导致模型需要很多额外的语义信息或手工特征或复杂alignment机制或后处理。
本文的创新点就在于用multiple alignment processes。
R - Residual vectors:previous aligned features
E - Embedding vectors:original point-wise features
E - Encoded vectors:contextual features
简称RE2
具体代表什么呢?让我们往下看。
Model
空白格子表示embedding vectors,斜线方格表示augmented residual connections,经过一个encoder生成的context vectors用黑色方格表示。如图所示,把这三个向量concat起来都放进alignment layer里,再用alignment layer的input和output都concat起来放入fusion layer中。一个block包含encoding、alignment和fusion三层,重复N次且每个block都是独立的参数。 fusion layer的output经过池化层,得到最后的固定长度向量。利用左右两侧的固定长度向量做预测,Loss采用交叉熵。
Augmented Residual Connections
为了给alignment layer(attention layer)提供更丰富的特征,RE2用了残差网络来连接连续的n个blocks。
The input of the n n n-th block x ( n ) x^{(n)} x(n)( n n n ≥ 2), is the concatenation of the input of the first block x ( 1 ) x^{(1)} x(1) and the summation of the output of previous two blocks (denoted by rectangles with diagonal stripes in Figure 1):
x i ( n ) = [ x i ( 1 ) ; o i ( n − 1 ) + o i ( n − 2 ) ] x^{(n)}_i=[x^{(1)}_i;o^{(n-1)}_i+o_i^{(n-2)}] xi(n)=[xi(1);oi(n−1)+oi(n−2)]
Alignment Layer
alignment的方法仍是采取点积(可指路上一篇【文本匹配】之 经典ESIM论文详读)。 F F F指identity function或单层前向神经网络,这个作为超参数自行指定。
e i j = F ( a i ) T F ( b j ) e_{ij}=F(a_i)^TF(b_j) eij=F(ai)TF(bj