CS5720 - Week 6
Slide 114 of 120

Sequence-to-Sequence RNN

What is Seq2Seq?

A Sequence-to-Sequence (Seq2Seq) model is an RNN architecture that transforms one sequence into another sequence, where input and output sequences can have different lengths.
Key Components:

Encoder - Processes input sequence
Context Vector - Compressed representation
Decoder - Generates output sequence
Variable Lengths - Flexible input/output sizes
💡 Core Innovation
Seq2Seq models can handle tasks where the input and output have different lengths and structures - a breakthrough for machine translation!

Architecture Components

  • 📥
    Encoder RNN
    Reads and compresses the entire input sequence into a fixed-size context vector
  • 🎯
    Context Vector
    The final hidden state that captures the essence of the input sequence
  • 📤
    Decoder RNN
    Generates the output sequence one element at a time using the context

Seq2Seq in Action: Translation Example

Encoder
"Hello world"

Processing...

Context Vector
Decoder
Context Vector

Generating...

"Bonjour monde"
Click on components to explore how each part works in detail
Prepared by Dr. Gorkem Kar