An encoder–decoder maps a variable-length input sequence to a variable-length output. In the 2014 sequence-to-sequence design, an LSTM encoder compressed the input into one fixed-size “thought vector”; a decoder used it to generate the output one word at a time. This enabled machine translation, but forced short and long sentences alike into the same-size representation. section 5.3
The fixed-vector bottleneck becomes more strained as sentences grow. Pointer Networks show a related encoder–decoder can instead use attention to select positions in the input, useful when outputs must come from the input rather than a fixed vocabulary. section 5.3 section 5.4









