In order to learn the weight matrix A, as presented in the introduction, we propose to leverage both semantic and syntactic structures of the input sentence.
for the semantic structure, we use the representation vectors from LSTMs for x i and x j (i.e., h i and h j ) as the features to compute the contribution score in the cell a sem ij of the semantic weight matrix A sem = (a sem ij ) i,j=1..n : Note that we omit the biases in the equations of this paper for convenience.