What does an encoder-decoder architecture provide, and where is it commonly applied?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Let's keep this real-world. Encoder-decoder is the "read the whole input, then write the whole output" pattern. Encoder digests the source sentence; decoder produces the target sentence token by token. Machine translation is the poster child—French in, English out. Think of it like a skilled interpreter: listen fully (encode), then speak the other language (decode). Boss wants automated support-article translation? That's encoder-decoder territory, not plain linear regression or k-means. Exam trap: any "two-stage" model gets labeled encoder-decoder incorrectly. Land the takeaway: encode input sequence, decode output sequence—common in MT. Keep rolling.
Full explanation below image
Full Explanation
Encoder-decoder architecture, often called sequence-to-sequence when both sides are sequences, separates understanding of the input from generation of the output. The encoder processes the source sequence—historically with unidirectional or bidirectional recurrent networks, and today often with Transformer encoder stacks—to produce contextual representations. The decoder then emits the target sequence step by step, conditioning on its previous outputs and on encoder states, via a final context vector in early models or via cross-attention in modern Transformers. Machine translation is the flagship application: variable-length text in one language becomes variable-length text in another. The same pattern appears in abstractive summarization, speech recognition that maps audio frames to text, and some dialogue response generators.
Linear regression predicts a scalar or low-dimensional continuous vector from fixed features and lacks this generative sequence structure. Standard image classification maps an image to a class index rather than producing a structured output sequence. Although some vision systems use encoder-decoder designs for dense prediction such as semantic segmentation, the classic examination association for encoder-decoder language is sequence transduction such as translation. Unsupervised clustering groups items by similarity without learning a supervised mapping from an input sequence to a generated output sequence, so it does not match the architecture or the application called out here.
Design principles include handling different input and output lengths, teacher forcing during training, and beam search or sampling at inference time. Attention improved the original bottlenecked sequence-to-sequence models by letting the decoder consult all encoder states instead of one overloaded vector. Evaluation often uses BLEU or related metrics for translation quality. A concise memory aid is that the encoder comprehends the source, the decoder produces the target, and translation is the textbook example. That framing cleanly separates encoder-decoder from regression, simple classification, and clustering distractors on certification-style questions while remaining faithful to how production translation systems are organized.