An encoder-decoder architecture has two parts: the encoder turns input into a compact or abstract representation, and the decoder uses that representation to produce or reconstruct output. section 7.0
The same pattern supports different tasks:
- In an autoencoder, the encoder compresses an image into a latent representation and the decoder reconstructs it; one example maps 784-pixel handwritten digits to 20-value vectors. section 7.0
- In machine translation, the encoder represents an English phrase and the decoder constructs a French translation. section 7.0
- Text-to-image Transformers can encode an image into a compact, low-dimensional probability distribution and decode from it. section 7.0
The representation and the work performed by each part vary across models. In an autoencoder, reconstruction error is a central training objective; the architecture also appears in variational autoencoders and Transformers. section 7.0













