← 🌐 Machine Learning & Neural Networks

🌐 Sequence-to-Sequence Translation with Attention

Decode step: 0
Attention focus:
Drag — rotate · Scroll — zoom

🌐 Sequence-to-Sequence Translation with Attention

The simulation animates an encoder RNN reading a source sentence word by word into a chain of hidden states, then a decoder generating the translated sentence step by step while an attention heatmap lights up showing which source words the decoder is weighting most heavily at each moment.

🔬 What It Demonstrates

The simulation animates an encoder RNN reading a source sentence word by word into a chain of hidden states, then a decoder generating the translated sentence step by step while an attention heatmap lights up showing which source words the decoder is weighting most heavily at each moment.

🎮 How to Use

Choose a sentence pair from the dropdown, use the speed slider to control how fast the encoder and decoder advance, and watch the attention heatmap update at each decoding step; press Rebuild to load a new sentence pair or Pause to freeze the animation and inspect the current attention weights.

💡 Did You Know?

The attention mechanism from this exact architecture, originally just a fix for the fixed-size context vector bottleneck in RNN translation, is the direct conceptual ancestor of the self-attention layers powering every modern large language model, after the 2017 Transformer paper removed the recurrence entirely and kept only the attention.