To prevent deterioration of the translation performance for long source-language sentences, the attention-based NMT tries to capture the relation between the states in the encoder and the decoder, and the decoder generates the translations by referring to the history of the hidden states in the encoder.
the alignment score a i is calculated on the basis of the similarity between the decoder's hidden stateh i and each of the encoder's hidden states c = (h 1 , h 2 , .