【文本匹配】之 RE2论文详解

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(n1)+oi(n2)]

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值