Many-to-Many and Low-Resource Translation › The N×N Problem

Michael BrenndoerferNovember 25, 20264 min read
Language AI HandbookAll chapters
Part 27 of 67Machine Translation and Speech Translation
Chapter 193Many-to-Many and Low-Resource Translation › The N×N Problem
Reading section 2 of 11 · The N×N Problem · 4 minSection 2 of 11 · 4 min

Section 2 of 11 · 4 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Start with a simple arithmetic fact. With NN languages, there are N(N−1)N(N-1) ordered translation directions. For N=10N=10, that is 90. For N=100N=100, it is 9,900. For N=200N=200, it is 39,800. Here each of the NN source languages has N−1N-1 possible targets, and French to German counts separately from German to French. The chart shows one curve for ordered directions and a second for bidirectional language pairs, which are half as numerous. If you deploy a separate checkpoint for each direction, this also gives the checkpoint count. A bilingual checkpoint that handles both directions changes the deployment count.

The arithmetic is easy to state but hard to feel. The figure below plots the direction count against the number of languages on log-log axes, so the curves approach slope two as the language count grows. The bidirectional-checkpoint curve stays a factor of two below the ordered-direction curve.

PythonIn [2]
CollapseExpand
import numpy as np

languages = np.array([2, 5, 10, 25, 50, 100, 200, 400], dtype=float)
ordered_directions = languages * (languages - 1)
bilingual_checkpoints = ordered_directions / 2.0
ratio_10_to_200 = ordered_directions[6] / ordered_directions[2]
VisualizationOut [3]
CollapseExpand
Log-log line chart of ordered directions and bilingual checkpoints versus the number of languages.
Ordered translation directions N(N-1) and the paired-checkpoint count N(N-1)/2 against the number of languages, on log-log axes. The series are parallel on the log axes and separated by a factor of two on the count scale. Going from 10 to 200 languages multiplies the ordered direction count by more than 400.

The vertical gap between the two lines is the saving from bidirectional checkpoints, and it is constant. For large inventories, serving twice as many languages raises the line by about a factor of four.

The quadratic growth is what makes the problem painful. Doubling the number of supported languages roughly quadruples the number of ordered directions. Going from ten languages to two hundred multiplies the language count by twenty and the direction count by more than four hundred. A separate checkpoint and pipeline for each direction then means maintaining tens of thousands of artifacts. The natural response is to ask how much of the work can be shared.

Parallel data availability varies by direction. In a 103-language study, Arivazhagan et al. report a gap of nearly five orders of magnitude between the best- and least-resourced languages in their corpus. Shared training improved some low-resource directions relative to bilingual baselines in their experiments. The result depends on the direction and the sampling recipe.

Language coverage tells you which languages a model accepts as input or can be asked to produce. Quality can still vary by direction. Check the directions you plan to serve with data from those directions.

Pivot translation gives you a two-stage baseline for an unseen pair. For example, translate the source into English, then translate that output into the target language. The two decoding passes run in sequence. Because the second model receives the first model’s output, a mistranslation in the first stage can carry through. A many-to-many model can also decode directly into the target language.

Use pivot translation as a quality baseline for each unseen direction. Compare direct and pivot output on the same inputs and measure serving cost under the same workload. A direct model may use one decoding pass where the pivot uses two.

Pivot translation

Pivot translation uses a third language between source and target. In a text-to-text pipeline, the output of the first hop becomes the input to the second.

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!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy