Three years before "Attention Is All You Need", Dzmitry Bahdanau, Kyunghyun Cho and Yoshua Bengio added attention to an RNN translation model, and the attention in my Transformer post grew out of that idea. This post is just that one idea, with very little code. The next post reads the paper properly and builds it in PyTorch.
The question
In 2014, why did neural translation models get worse as sentences got longer?
The usual model then had two RNNs. The encoder read the English sentence one word at a time and ended with a single vector, a fixed list of numbers. The decoder wrote the French sentence using only that vector. A three-word sentence and a fifty-word sentence both had to fit into a vector of the same size.
The paper's guess was that this fixed-length vector was the bottleneck, and their experiments backed it up: the older model's scores fell sharply on longer sentences.…