Encoder-Decoder Framework › Visualizations
Language AI HandbookAll chapters Encoder-Decoder Framework › VisualizationsOne section · Sections in this chapter12 / 16 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable



The compression ratio plot shows concretely why the context vector bottleneck becomes severe for longer sequences. With a hidden dimension of 128, encoding a 5-token sentence gives about 25 dimensions per token. Encoding a 40-token sentence gives only about 3 dimensions per token. For a 100-token sentence, the model has fewer than 1.3 dimensions per token, which is almost certainly insufficient to represent all necessary information. This is precisely the regime where attention-based models gain their biggest advantages.

The teacher forcing tradeoff chart captures why the choice of forcing ratio matters. At ratio 1.0, training is highly stable because every decoder step receives correct context, but the model never learns to handle its own errors, creating a gap between training and deployment behavior. At ratio 0.0, the model practices on exactly the conditions it will face at inference, but training becomes very slow because early errors cascade through the sequence. Values around 0.5 to 0.75 offer a pragmatic balance for most applications.