This is necessary because two different words might be attached to the same head node and the latter can be located in the sentence either before or after w i .
the sequence s i , required by the attention score function (Eq.