CS5720 - Week 6
Slide 113 of 120

Many-to-Many RNN: Language Translation

Many-to-Many Translation Architecture

๐Ÿ‡ช๐Ÿ‡ธ Spanish (Source)
Hola
mundo
hermoso
โ†’
Encoder-Decoder RNN
Encoder
Eโ‚
Eโ‚‚
Eโ‚ƒ
Decoder
Dโ‚
Dโ‚‚
Dโ‚ƒ
โ†’
๐Ÿ‡บ๐Ÿ‡ธ English (Target)
Hello
beautiful
world
Multiple inputs โ†’ Processing โ†’ Multiple outputs with different sequence lengths

Key Concepts

  • ๐Ÿ”„ Encoder-Decoder Architecture
    Two RNNs working in sequence for translation
  • ๐Ÿ“ฆ Context Vector
    Fixed-size representation of source sentence
  • ๐Ÿ‘๏ธ Attention Mechanism
    Focus on relevant source words during generation
  • ๐ŸŒŸ Beam Search
    Efficient search for best translation sequences

Translation Challenges

  • ๐Ÿ”€ Word Order Differences
    Languages have different syntactic structures
  • ๐Ÿ“ Variable Sequence Lengths
    Source and target sentences have different lengths
  • โ“ Semantic Ambiguity
    Words can have multiple meanings in context
  • ๐Ÿ”ค Out-of-Vocabulary Words
    Handling unknown or rare words in translation

Translation Examples

Spanish โ†’ English
Easy
๐Ÿ‡ช๐Ÿ‡ธ "El gato estรก durmiendo en la cama"
๐Ÿ‡บ๐Ÿ‡ธ "The cat is sleeping on the bed"
French โ†’ English
Medium
๐Ÿ‡ซ๐Ÿ‡ท "Je voudrais une table pour deux personnes, s'il vous plaรฎt"
๐Ÿ‡บ๐Ÿ‡ธ "I would like a table for two people, please"
German โ†’ English
Hard
๐Ÿ‡ฉ๐Ÿ‡ช "Wegen des schlechten Wetters wurde das Spiel abgesagt"
๐Ÿ‡บ๐Ÿ‡ธ "Due to the bad weather, the game was cancelled"
Japanese โ†’ English
Hard
๐Ÿ‡ฏ๐Ÿ‡ต "็งใฏๆฏŽๆœใ‚ณใƒผใƒ’ใƒผใ‚’้ฃฒใฟใพใ™"
๐Ÿ‡บ๐Ÿ‡ธ "I drink coffee every morning"

Interactive Translation Demo

Explore how many-to-many RNNs handle language translation tasks

Prepared by Dr. Gorkem Kar