Sequence-to-sequence with attention
What it is
An encoder RNN compresses the input, a decoder generates the output, and attention lets the decoder look back at every encoder state.
When to use it
Machine translation and any input-length-mismatch task; the direct ancestor of the transformer.
Caveats
The recurrent encoder and decoder still process tokens sequentially, so training is slow compared with transformers. Teacher forcing creates a mismatch between training and generation (exposure bias).
Key ideas
- Attention exists precisely because a single fixed vector cannot hold a long sentence
- This is the paper the transformer then stripped to attention alone
Related architectures
Original paper
Neural Machine Translation by Jointly Learning to Align and Translate (2014, arXiv)