1) In 1st stage, the goal is to calculate pair-wise word similarities. 2) Each word in sentence a can be similar to several words in sentence b, and vice versa.
i) For each word wia in sentence a we compute a lb-dimensional vector of its similarities to words in sentence b, normalized via softmax so that all similarities are positive and sum to one.
ii) This is called allignment vector for the word.
3) We similarly compute an alignment vector for each word in ‘b’:
4) Now, for every word wia in sentence a we compute a vector wib by performing weighted-sum of the words in b that are aligned to wia.
5) Again, for every word wjb in sentence b we compute a vector wja by performing weighted-sum of the words in a that are aligned to wjb.