Many-to-Many and Low-Resource Translation › Worked Example
Language AI HandbookAll chapters Let’s build a synthetic task with four languages: English, French, German, and Spanish. A sentence contains six entries drawn from the same inventory of 20 concepts. Each language maps concepts to tokens using a fixed permutation. To construct the correct target, invert the source permutation and apply the target permutation.
We train on English-to-{French, German, Spanish} and {French, German, Spanish}-to-English. We hold out the six directions among French, German, and Spanish: fr→de, de→fr, fr→es, es→fr, de→es, and es→de. This toy resembles one part of the OPUS-100 setup. In that benchmark, all training pairs included English and pairs between other languages were available for zero-shot tests.
The toy uses one encoder and one decoder across directions and adds language embeddings to token embeddings. The token ID ranges also differ by language. The fixed permutations define a learnable mapping for each supervised direction. Held-out exact-match accuracy measures whether the model gives the correct output for unseen source and target combinations.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!