Enhanced-RCNN An Efficient Method for Learning Sentence Similarity

特点:非预训练,参数量少

1 input encoding

得到两个encoding,RNN Encoding,RCNN Encoding

1 BiGRU

a={a1,a2,,ala},a 是句子,la 是句子1的长度

得到RNN Encoding,¯¯¯¯pi统一表示¯¯¯ai,¯¯¯¯bi

2 CNN

在 BiGRU 编码的基础上,使用 CNN 来进行二次编码

结构如下,“newtork in network”,k 是卷积核的kernel size,比如k=1,卷积核为1×1

对于每个 CNN 单元,具体的计算过程如下:

得到 RCNN Encoding ˜pi

2 Interactive Sentence Representation

1 Soft-attention Alignment

attention:

加了attention的rnn encoding:

2 Interaction Modeling

¯¯¯¯p是rnn encoding

^是加了attention的rnn encoding

˜是rcnn encoding

最终得到Interactive Sentence Representation为oa,ob

3 Similarity Modeling

1 Fusion Layer

g是门控函数

2 Label Prediction

全连接层

4 loss

交叉熵

参考

https://sci-hub.st/10.1145/3366423.3379998

https://zhuanlan.zhihu.com/p/138061003


成熟的人眼里满是前途,稚嫩的人眼里满是爱恨情仇。

From《网易云热评》

Provider-星空下的约定