The attention context computation in the GRU can be re-factored as follows: Crucially, the hidden vector representation s j is only dependent on the source sentence, while a ij is dependent on the target hypothesis.
the original computation U c i requires total |T | × b multiplications per sentence, but the re-factored version U s j only requires total |S| multiplications.