论文强调将语法和句法信息相结合,来做NLI任务。
In many problems, syntax and semantics interact closely, as generally phrased in the slogan “the syntax and the semantics work together in tandem” (Barker and Jacobson, 2007), among others.
模型结构如下图:
给定两个句子 and ,这里是premise,是hypothesis。和都是-维的词向量,可通过预训练得到。目标是预测标签,来指示和的逻辑关系。
BLSTM对于序列顺序处理,当第时刻 和 第时刻计算如下:
为了构建premise和hypothesis的相关性,构建attention 权重矩阵,其中每个元素为。例如,在premise中的一个词的hidden state, (已经encode了自身和上下文信息),其与hypothesis中的语义相关性定义如下:
是 的加权求和。即在中与相关的内容表示为 。同理公式13也可以类似理解。